Chunk manager init
This commit is contained in:
@@ -8,12 +8,13 @@ import (
|
||||
"bazil.org/fuse/fs"
|
||||
"github.com/debridmediamanager.com/zurg/internal/config"
|
||||
"github.com/debridmediamanager.com/zurg/internal/torrent"
|
||||
"github.com/debridmediamanager.com/zurg/pkg/chunk"
|
||||
"github.com/debridmediamanager.com/zurg/pkg/logutil"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func Mount(mountpoint string, c config.ConfigInterface, t *torrent.TorrentManager) error {
|
||||
func Mount(mountpoint string, cfg config.ConfigInterface, tMgr *torrent.TorrentManager, cMgr *chunk.Manager) error {
|
||||
rlog := logutil.NewLogger()
|
||||
log := rlog.Named("zfs")
|
||||
|
||||
@@ -36,10 +37,11 @@ func Mount(mountpoint string, c config.ConfigInterface, t *torrent.TorrentManage
|
||||
uid: uint32(unix.Geteuid()),
|
||||
gid: uint32(unix.Getegid()),
|
||||
umask: os.FileMode(0),
|
||||
c: c,
|
||||
t: t,
|
||||
c: cfg,
|
||||
t: tMgr,
|
||||
log: log,
|
||||
initTime: time.Now(),
|
||||
chunk: cMgr,
|
||||
}
|
||||
|
||||
if err := srv.Serve(filesys); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user