context fs

This commit is contained in:
royalcat 2024-03-21 00:47:51 +03:00
parent fd3beea874
commit 7b1863109c
25 changed files with 593 additions and 349 deletions
cmd/tstor

View file

@ -125,7 +125,10 @@ func run(configPath string) error {
c.AddDhtNodes(conf.TorrentClient.DHTNodes)
defer c.Close()
ts, err := service.NewService(conf.SourceDir, conf.TorrentClient, c, st, excludedFilesStore, infoBytesStore, conf.TorrentClient.AddTimeout, conf.TorrentClient.ReadTimeout)
ts, err := service.NewService(
conf.SourceDir, conf.TorrentClient,
c, st, excludedFilesStore, infoBytesStore,
)
if err != nil {
return fmt.Errorf("error creating service: %w", err)
}