refactoring: more refactoring to break import cycles

This commit is contained in:
Derrick Hammer 2024-01-29 21:03:10 -05:00
parent 3b3a50e419
commit 0ee96599f1
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 8 additions and 7 deletions

View File

@ -216,11 +216,9 @@ func (s *StorageService) DownloadBytesByHash(hash *encoding.Multihash) ([]byte,
types.StorageLocationTypeFull, types.StorageLocationTypeFull,
types.StorageLocationTypeFile, types.StorageLocationTypeFile,
}, },
ServiceParams: ServiceParams{ Logger: s.logger,
Logger: s.logger, Config: s.config,
Config: s.config, Db: s.db,
Db: s.db,
},
}) })
err := dlUriProvider.Start() err := dlUriProvider.Start()
if err != nil { if err != nil {

View File

@ -3,10 +3,11 @@ package provider
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"git.lumeweb.com/LumeWeb/libs5-go/config"
"git.lumeweb.com/LumeWeb/libs5-go/encoding" "git.lumeweb.com/LumeWeb/libs5-go/encoding"
"git.lumeweb.com/LumeWeb/libs5-go/service"
"git.lumeweb.com/LumeWeb/libs5-go/storage" "git.lumeweb.com/LumeWeb/libs5-go/storage"
"git.lumeweb.com/LumeWeb/libs5-go/types" "git.lumeweb.com/LumeWeb/libs5-go/types"
bolt "go.etcd.io/bbolt"
"go.uber.org/zap" "go.uber.org/zap"
"sync" "sync"
"time" "time"
@ -195,5 +196,7 @@ type StorageLocationProviderParams struct {
Services storage.StorageLocationProviderServices Services storage.StorageLocationProviderServices
Hash *encoding.Multihash Hash *encoding.Multihash
LocationTypes []types.StorageLocationType LocationTypes []types.StorageLocationType
service.ServiceParams Logger *zap.Logger
Config *config.NodeConfig
Db *bolt.DB
} }