storage rework

This commit is contained in:
royalcat 2024-06-15 01:14:44 +03:00
parent 06153d61c9
commit e9df8925d1
49 changed files with 1825 additions and 1303 deletions
cmd/tstor

View file

@ -100,7 +100,10 @@ func run(configPath string) error {
if err != nil {
return err
}
ytdlpsrv := ytdlp.NewService("./ytdlp")
ytdlpsrv, err := ytdlp.NewService("./ytdlp")
if err != nil {
return err
}
sfs := sources.NewHostedFS(
vfs.NewCtxBillyFs("/", ctxbilly.WrapFileSystem(sourceFs)),
@ -157,7 +160,7 @@ func run(configPath string) error {
return
}
log.Info(ctx, "starting NFS server", slog.String("address", listener.Addr().String()))
handler, err := nfs.NewNFSv3Handler(sfs)
handler, err := nfs.NewNFSv3Handler(sfs, conf.Mounts.NFS)
if err != nil {
log.Error(ctx, "failed to create NFS handler", rlog.Error(err))
return