rename daemons
Some checks failed
docker / build-docker (push) Failing after 29s

This commit is contained in:
royalcat 2024-10-27 01:19:16 +03:00
parent 3e948f55a2
commit ff38d10fbf
43 changed files with 27 additions and 27 deletions

View file

@ -27,11 +27,11 @@ models:
Torrent: Torrent:
extraFields: extraFields:
T: T:
type: "*git.kmsign.ru/royalcat/tstor/src/sources/torrent.Controller" type: "*git.kmsign.ru/royalcat/tstor/src/daemons/torrent.Controller"
TorrentFile: TorrentFile:
extraFields: extraFields:
F: F:
type: "*git.kmsign.ru/royalcat/tstor/src/sources/torrent.FileController" type: "*git.kmsign.ru/royalcat/tstor/src/daemons/torrent.FileController"
TorrentPeer: TorrentPeer:
extraFields: extraFields:
F: F:
@ -45,7 +45,7 @@ models:
TorrentFS: TorrentFS:
extraFields: extraFields:
FS: FS:
type: "*git.kmsign.ru/royalcat/tstor/src/sources/torrent.TorrentFS" type: "*git.kmsign.ru/royalcat/tstor/src/daemons/torrent.TorrentFS"
ResolverFS: ResolverFS:
extraFields: extraFields:
FS: FS:

View file

@ -17,10 +17,10 @@ import (
wnfs "git.kmsign.ru/royalcat/tstor/pkg/go-nfs" wnfs "git.kmsign.ru/royalcat/tstor/pkg/go-nfs"
"git.kmsign.ru/royalcat/tstor/pkg/rlog" "git.kmsign.ru/royalcat/tstor/pkg/rlog"
"git.kmsign.ru/royalcat/tstor/src/config" "git.kmsign.ru/royalcat/tstor/src/config"
"git.kmsign.ru/royalcat/tstor/src/daemons"
"git.kmsign.ru/royalcat/tstor/src/daemons/qbittorrent"
"git.kmsign.ru/royalcat/tstor/src/daemons/ytdlp"
"git.kmsign.ru/royalcat/tstor/src/delivery" "git.kmsign.ru/royalcat/tstor/src/delivery"
"git.kmsign.ru/royalcat/tstor/src/sources"
"git.kmsign.ru/royalcat/tstor/src/sources/qbittorrent"
"git.kmsign.ru/royalcat/tstor/src/sources/ytdlp"
"git.kmsign.ru/royalcat/tstor/src/telemetry" "git.kmsign.ru/royalcat/tstor/src/telemetry"
"git.kmsign.ru/royalcat/tstor/src/vfs" "git.kmsign.ru/royalcat/tstor/src/vfs"
"github.com/go-git/go-billy/v5/osfs" "github.com/go-git/go-billy/v5/osfs"
@ -109,7 +109,7 @@ func run(configPath string) error {
return fmt.Errorf("error creating qbittorrent daemon: %w", err) return fmt.Errorf("error creating qbittorrent daemon: %w", err)
} }
sfs := sources.NewHostedFS( sfs := daemons.NewHostedFS(
vfs.NewCtxBillyFs("/", ctxbilly.WrapFileSystem(sourceFs)), vfs.NewCtxBillyFs("/", ctxbilly.WrapFileSystem(sourceFs)),
qtdaemon, ytdlpsrv, qtdaemon, ytdlpsrv,
) )

View file

@ -25,7 +25,7 @@ import (
"go.opentelemetry.io/otel" "go.opentelemetry.io/otel"
) )
var trace = otel.Tracer("git.kmsign.ru/royalcat/tstor/src/sources/qbittorrent") var trace = otel.Tracer("git.kmsign.ru/royalcat/tstor/src/daemons/qbittorrent")
type Daemon struct { type Daemon struct {
proc *os.Process proc *os.Process

View file

@ -1,10 +1,10 @@
package sources package daemons
import ( import (
"context" "context"
"git.kmsign.ru/royalcat/tstor/src/sources/qbittorrent" "git.kmsign.ru/royalcat/tstor/src/daemons/qbittorrent"
"git.kmsign.ru/royalcat/tstor/src/sources/ytdlp" "git.kmsign.ru/royalcat/tstor/src/daemons/ytdlp"
"git.kmsign.ru/royalcat/tstor/src/vfs" "git.kmsign.ru/royalcat/tstor/src/vfs"
) )

View file

@ -27,7 +27,7 @@ import (
"github.com/royalcat/kv" "github.com/royalcat/kv"
) )
const instrument = "git.kmsign.ru/royalcat/tstor/sources/torrent" const instrument = "git.kmsign.ru/royalcat/tstor/daemons/torrent"
var ( var (
tracer = otel.Tracer(instrument, trace.WithInstrumentationAttributes(attribute.String("component", "torrent-daemon"))) tracer = otel.Tracer(instrument, trace.WithInstrumentationAttributes(attribute.String("component", "torrent-daemon")))

View file

@ -1055,17 +1055,17 @@ interface Progress {
current: Int! current: Int!
total: Int! total: Int!
}`, BuiltIn: false}, }`, BuiltIn: false},
{Name: "../../../graphql/sources/qbittorrent_query.graphql", Input: `type QBitTorrentDaemonQuery { {Name: "../../../graphql/daemons/qbittorrent_query.graphql", Input: `type QBitTorrentDaemonQuery {
torrents: [QTorrent!]! @resolver torrents: [QTorrent!]! @resolver
} }
`, BuiltIn: false}, `, BuiltIn: false},
{Name: "../../../graphql/sources/qbittorrent_types.graphql", Input: `type QTorrent { {Name: "../../../graphql/daemons/qbittorrent_types.graphql", Input: `type QTorrent {
name: String! name: String!
hash: String! hash: String!
sourceFiles: [String!]! @resolver sourceFiles: [String!]! @resolver
} }
`, BuiltIn: false}, `, BuiltIn: false},
{Name: "../../../graphql/sources/torrent_mutation.graphql", Input: `type TorrentDaemonMutation { {Name: "../../../graphql/daemons/torrent_mutation.graphql", Input: `type TorrentDaemonMutation {
validateTorrent(filter: TorrentFilter!): Boolean! @resolver validateTorrent(filter: TorrentFilter!): Boolean! @resolver
setTorrentPriority( setTorrentPriority(
infohash: String! infohash: String!
@ -1084,7 +1084,7 @@ type DownloadTorrentResponse {
task: Task task: Task
} }
`, BuiltIn: false}, `, BuiltIn: false},
{Name: "../../../graphql/sources/torrent_query.graphql", Input: `type TorrentDaemonQuery { {Name: "../../../graphql/daemons/torrent_query.graphql", Input: `type TorrentDaemonQuery {
torrents(filter: TorrentsFilter): [Torrent!]! @resolver torrents(filter: TorrentsFilter): [Torrent!]! @resolver
clientStats: TorrentClientStats! @resolver clientStats: TorrentClientStats! @resolver
statsHistory(since: DateTime!, infohash: String): [TorrentStats!]! @resolver statsHistory(since: DateTime!, infohash: String): [TorrentStats!]! @resolver
@ -1114,7 +1114,7 @@ input TorrentFilter @oneOf {
# pathGlob: String! # pathGlob: String!
} }
`, BuiltIn: false}, `, BuiltIn: false},
{Name: "../../../graphql/sources/torrent_types.graphql", Input: `type Torrent { {Name: "../../../graphql/daemons/torrent_types.graphql", Input: `type Torrent {
name: String! @resolver name: String! @resolver
infohash: String! infohash: String!
bytesCompleted: Int! bytesCompleted: Int!

View file

@ -3,7 +3,7 @@ package model
import ( import (
"context" "context"
"git.kmsign.ru/royalcat/tstor/src/sources/torrent" "git.kmsign.ru/royalcat/tstor/src/daemons/torrent"
"git.kmsign.ru/royalcat/tstor/src/vfs" "git.kmsign.ru/royalcat/tstor/src/vfs"
) )

View file

@ -3,7 +3,7 @@ package model
import ( import (
"context" "context"
"git.kmsign.ru/royalcat/tstor/src/sources/torrent" "git.kmsign.ru/royalcat/tstor/src/daemons/torrent"
atorrent "github.com/anacrolix/torrent" atorrent "github.com/anacrolix/torrent"
) )

View file

@ -5,7 +5,7 @@ package model
import ( import (
"time" "time"
"git.kmsign.ru/royalcat/tstor/src/sources/torrent" "git.kmsign.ru/royalcat/tstor/src/daemons/torrent"
"git.kmsign.ru/royalcat/tstor/src/vfs" "git.kmsign.ru/royalcat/tstor/src/vfs"
torrent1 "github.com/anacrolix/torrent" torrent1 "github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/types" "github.com/anacrolix/torrent/types"

View file

@ -1,8 +1,8 @@
package resolver package resolver
import ( import (
"git.kmsign.ru/royalcat/tstor/src/sources/qbittorrent" "git.kmsign.ru/royalcat/tstor/src/daemons/qbittorrent"
"git.kmsign.ru/royalcat/tstor/src/sources/torrent" "git.kmsign.ru/royalcat/tstor/src/daemons/torrent"
"git.kmsign.ru/royalcat/tstor/src/vfs" "git.kmsign.ru/royalcat/tstor/src/vfs"
"github.com/go-git/go-billy/v5" "github.com/go-git/go-billy/v5"
) )

View file

@ -10,9 +10,9 @@ import (
"strings" "strings"
"time" "time"
"git.kmsign.ru/royalcat/tstor/src/daemons/torrent"
graph "git.kmsign.ru/royalcat/tstor/src/delivery/graphql" graph "git.kmsign.ru/royalcat/tstor/src/delivery/graphql"
"git.kmsign.ru/royalcat/tstor/src/delivery/graphql/model" "git.kmsign.ru/royalcat/tstor/src/delivery/graphql/model"
"git.kmsign.ru/royalcat/tstor/src/sources/torrent"
tinfohash "github.com/anacrolix/torrent/types/infohash" tinfohash "github.com/anacrolix/torrent/types/infohash"
) )

View file

@ -7,8 +7,8 @@ import (
"git.kmsign.ru/royalcat/tstor/pkg/rlog" "git.kmsign.ru/royalcat/tstor/pkg/rlog"
"git.kmsign.ru/royalcat/tstor/src/config" "git.kmsign.ru/royalcat/tstor/src/config"
"git.kmsign.ru/royalcat/tstor/src/sources/qbittorrent" "git.kmsign.ru/royalcat/tstor/src/daemons/qbittorrent"
"git.kmsign.ru/royalcat/tstor/src/sources/torrent" "git.kmsign.ru/royalcat/tstor/src/daemons/torrent"
"git.kmsign.ru/royalcat/tstor/src/vfs" "git.kmsign.ru/royalcat/tstor/src/vfs"
echopprof "github.com/labstack/echo-contrib/pprof" echopprof "github.com/labstack/echo-contrib/pprof"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"

View file

@ -4,10 +4,10 @@ import (
"context" "context"
"net/http" "net/http"
"git.kmsign.ru/royalcat/tstor/src/daemons/qbittorrent"
"git.kmsign.ru/royalcat/tstor/src/daemons/torrent"
graph "git.kmsign.ru/royalcat/tstor/src/delivery/graphql" graph "git.kmsign.ru/royalcat/tstor/src/delivery/graphql"
"git.kmsign.ru/royalcat/tstor/src/delivery/graphql/resolver" "git.kmsign.ru/royalcat/tstor/src/delivery/graphql/resolver"
"git.kmsign.ru/royalcat/tstor/src/sources/qbittorrent"
"git.kmsign.ru/royalcat/tstor/src/sources/torrent"
"git.kmsign.ru/royalcat/tstor/src/vfs" "git.kmsign.ru/royalcat/tstor/src/vfs"
"github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql"
"github.com/99designs/gqlgen/graphql/handler" "github.com/99designs/gqlgen/graphql/handler"