diff --git a/cmd/neofs-node/accounting.go b/cmd/neofs-node/accounting.go index 28f7cb484..fe9373fe1 100644 --- a/cmd/neofs-node/accounting.go +++ b/cmd/neofs-node/accounting.go @@ -33,9 +33,12 @@ func initAccountingService(c *cfg) { accountingTransportGRPC.New( accountingService.NewSignService( c.key, - accountingService.NewExecutionService( - accounting.NewExecutor(balanceMorphWrapper), - new(session.ResponseMetaHeader), + accountingService.NewResponseService( + accountingService.NewExecutionService( + accounting.NewExecutor(balanceMorphWrapper), + new(session.ResponseMetaHeader), + ), + c.respSvc, ), ), ), diff --git a/cmd/neofs-node/config.go b/cmd/neofs-node/config.go index 582bafd7d..fbf963f13 100644 --- a/cmd/neofs-node/config.go +++ b/cmd/neofs-node/config.go @@ -24,6 +24,7 @@ import ( "github.com/nspcc-dev/neofs-node/pkg/morph/event" "github.com/nspcc-dev/neofs-node/pkg/network" tokenStorage "github.com/nspcc-dev/neofs-node/pkg/services/session/storage" + "github.com/nspcc-dev/neofs-node/pkg/services/util/response" "github.com/nspcc-dev/neofs-node/pkg/util/logger" "github.com/nspcc-dev/neofs-node/pkg/util/profiler" "github.com/pkg/errors" @@ -124,6 +125,8 @@ type cfg struct { profiler profiler.Profiler workers []worker + + respSvc *response.Service } type cfgGRPC struct { @@ -257,6 +260,7 @@ func initCfg(path string) *cfg { enableReflectService: viperCfg.GetBool(cfgReflectService), }, localAddr: netAddr, + respSvc: response.NewService(), } initLocalStorage(c) diff --git a/cmd/neofs-node/container.go b/cmd/neofs-node/container.go index 71e05a776..de2b12624 100644 --- a/cmd/neofs-node/container.go +++ b/cmd/neofs-node/container.go @@ -32,9 +32,12 @@ func initContainerService(c *cfg) { containerTransportGRPC.New( containerService.NewSignService( c.key, - containerService.NewExecutionService( - containerMorph.NewExecutor(cnrClient), - new(session.ResponseMetaHeader), + containerService.NewResponseService( + containerService.NewExecutionService( + containerMorph.NewExecutor(cnrClient), + new(session.ResponseMetaHeader), + ), + c.respSvc, ), ), ), diff --git a/cmd/neofs-node/netmap.go b/cmd/neofs-node/netmap.go index 2c7946a6d..fdc3df1d7 100644 --- a/cmd/neofs-node/netmap.go +++ b/cmd/neofs-node/netmap.go @@ -44,9 +44,12 @@ func initNetmapService(c *cfg) { netmapTransportGRPC.New( netmapService.NewSignService( c.key, - netmapService.NewExecutionService( - c.cfgNodeInfo.info, - c.apiVersion, + netmapService.NewResponseService( + netmapService.NewExecutionService( + c.cfgNodeInfo.info, + c.apiVersion, + ), + c.respSvc, ), ), ), diff --git a/cmd/neofs-node/object.go b/cmd/neofs-node/object.go index 906df233f..29a34c1b1 100644 --- a/cmd/neofs-node/object.go +++ b/cmd/neofs-node/object.go @@ -333,18 +333,21 @@ func initObjectService(c *cfg) { acl.WithNextService( objectService.NewSignService( c.key, - objectService.NewTransportSplitter( - c.cfgGRPC.maxChunkSize, - c.cfgGRPC.maxAddrAmount, - &objectSvc{ - put: sPutV2, - search: sSearchV2, - head: sHeadV2, - rng: sRangeV2, - get: sGetV2, - rngHash: sRangeHashV2, - delete: sDeleteV2, - }, + objectService.NewResponseService( + objectService.NewTransportSplitter( + c.cfgGRPC.maxChunkSize, + c.cfgGRPC.maxAddrAmount, + &objectSvc{ + put: sPutV2, + search: sSearchV2, + head: sHeadV2, + rng: sRangeV2, + get: sGetV2, + rngHash: sRangeHashV2, + delete: sDeleteV2, + }, + ), + c.respSvc, ), ), ), diff --git a/cmd/neofs-node/session.go b/cmd/neofs-node/session.go index 8432f227f..3dc6cf2fc 100644 --- a/cmd/neofs-node/session.go +++ b/cmd/neofs-node/session.go @@ -15,9 +15,12 @@ func initSessionService(c *cfg) { sessionTransportGRPC.New( sessionSvc.NewSignService( c.key, - sessionSvc.NewExecutionService( - c.privateTokenStore, - new(session.ResponseMetaHeader), + sessionSvc.NewResponseService( + sessionSvc.NewExecutionService( + c.privateTokenStore, + new(session.ResponseMetaHeader), + ), + c.respSvc, ), ), ),