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:
extraFields:
T:
type: "*git.kmsign.ru/royalcat/tstor/src/sources/torrent.Controller"
type: "*git.kmsign.ru/royalcat/tstor/src/daemons/torrent.Controller"
TorrentFile:
extraFields:
F:
type: "*git.kmsign.ru/royalcat/tstor/src/sources/torrent.FileController"
type: "*git.kmsign.ru/royalcat/tstor/src/daemons/torrent.FileController"
TorrentPeer:
extraFields:
F:
@ -45,7 +45,7 @@ models:
TorrentFS:
extraFields:
FS:
type: "*git.kmsign.ru/royalcat/tstor/src/sources/torrent.TorrentFS"
type: "*git.kmsign.ru/royalcat/tstor/src/daemons/torrent.TorrentFS"
ResolverFS:
extraFields:
FS:

View file

@ -17,10 +17,10 @@ import (
wnfs "git.kmsign.ru/royalcat/tstor/pkg/go-nfs"
"git.kmsign.ru/royalcat/tstor/pkg/rlog"
"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/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/vfs"
"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)
}
sfs := sources.NewHostedFS(
sfs := daemons.NewHostedFS(
vfs.NewCtxBillyFs("/", ctxbilly.WrapFileSystem(sourceFs)),
qtdaemon, ytdlpsrv,
)

View file

@ -25,7 +25,7 @@ import (
"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 {
proc *os.Process

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -10,9 +10,9 @@ import (
"strings"
"time"
"git.kmsign.ru/royalcat/tstor/src/daemons/torrent"
graph "git.kmsign.ru/royalcat/tstor/src/delivery/graphql"
"git.kmsign.ru/royalcat/tstor/src/delivery/graphql/model"
"git.kmsign.ru/royalcat/tstor/src/sources/torrent"
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/src/config"
"git.kmsign.ru/royalcat/tstor/src/sources/qbittorrent"
"git.kmsign.ru/royalcat/tstor/src/sources/torrent"
"git.kmsign.ru/royalcat/tstor/src/daemons/qbittorrent"
"git.kmsign.ru/royalcat/tstor/src/daemons/torrent"
"git.kmsign.ru/royalcat/tstor/src/vfs"
echopprof "github.com/labstack/echo-contrib/pprof"
"github.com/labstack/echo/v4"

View file

@ -4,10 +4,10 @@ import (
"context"
"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"
"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"
"github.com/99designs/gqlgen/graphql"
"github.com/99designs/gqlgen/graphql/handler"