[#891] getSvc: Refactor Get service V2 creation

Use arguments for mandatory fields.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-01-12 10:05:29 +03:00
parent 394f086fe2
commit 52ffa9f164
3 changed files with 24 additions and 59 deletions

View file

@ -372,13 +372,12 @@ func createGetService(c *cfg, keyStorage *util.KeyStorage, traverseGen *util.Tra
func createGetServiceV2(c *cfg, sGet *getsvc.Service, keyStorage *util.KeyStorage) *getsvcV2.Service {
return getsvcV2.NewService(
getsvcV2.WithInternalService(sGet),
getsvcV2.WithKeyStorage(keyStorage),
getsvcV2.WithEpochSource(c.netMapSource),
getsvcV2.WithClientSource(c.clientCache),
getsvcV2.WithContainerSource(c.cfgObject.cnrSource),
getsvcV2.WithNetmapSource(c.netMapSource),
getsvcV2.WithNetmapAnnouncedKeys(c),
sGet,
keyStorage,
c.clientCache,
c.netMapSource,
c,
c.cfgObject.cnrSource,
getsvcV2.WithLogger(c.log),
)
}