forked from TrueCloudLab/frostfs-node
[#294] putsvc: Refactor service constructor
Pass required deps as args. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
1420b8b9ea
commit
800a685e84
2 changed files with 30 additions and 70 deletions
|
@ -313,14 +313,14 @@ func createPutSvc(c *cfg, keyStorage *util.KeyStorage) *putsvc.Service {
|
|||
}
|
||||
|
||||
return putsvc.NewService(
|
||||
putsvc.WithKeyStorage(keyStorage),
|
||||
putsvc.WithClientConstructor(c.putClientCache),
|
||||
putsvc.WithMaxSizeSource(newCachedMaxObjectSizeSource(c)),
|
||||
putsvc.WithObjectStorage(os),
|
||||
putsvc.WithContainerSource(c.cfgObject.cnrSource),
|
||||
putsvc.WithNetworkMapSource(c.netMapSource),
|
||||
putsvc.WithNetmapKeys(c),
|
||||
putsvc.WithNetworkState(c.cfgNetmap.state),
|
||||
keyStorage,
|
||||
c.putClientCache,
|
||||
newCachedMaxObjectSizeSource(c),
|
||||
os,
|
||||
c.cfgObject.cnrSource,
|
||||
c.netMapSource,
|
||||
c,
|
||||
c.cfgNetmap.state,
|
||||
putsvc.WithWorkerPools(c.cfgObject.pool.putRemote, c.cfgObject.pool.putLocal),
|
||||
putsvc.WithLogger(c.log),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue