[#83] cmd/neofs-node: Use response services in application
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
0341773318
commit
3065a7363b
6 changed files with 43 additions and 24 deletions
|
@ -33,10 +33,13 @@ func initAccountingService(c *cfg) {
|
|||
accountingTransportGRPC.New(
|
||||
accountingService.NewSignService(
|
||||
c.key,
|
||||
accountingService.NewResponseService(
|
||||
accountingService.NewExecutionService(
|
||||
accounting.NewExecutor(balanceMorphWrapper),
|
||||
new(session.ResponseMetaHeader),
|
||||
),
|
||||
c.respSvc,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -32,10 +32,13 @@ func initContainerService(c *cfg) {
|
|||
containerTransportGRPC.New(
|
||||
containerService.NewSignService(
|
||||
c.key,
|
||||
containerService.NewResponseService(
|
||||
containerService.NewExecutionService(
|
||||
containerMorph.NewExecutor(cnrClient),
|
||||
new(session.ResponseMetaHeader),
|
||||
),
|
||||
c.respSvc,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -44,10 +44,13 @@ func initNetmapService(c *cfg) {
|
|||
netmapTransportGRPC.New(
|
||||
netmapService.NewSignService(
|
||||
c.key,
|
||||
netmapService.NewResponseService(
|
||||
netmapService.NewExecutionService(
|
||||
c.cfgNodeInfo.info,
|
||||
c.apiVersion,
|
||||
),
|
||||
c.respSvc,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -333,6 +333,7 @@ func initObjectService(c *cfg) {
|
|||
acl.WithNextService(
|
||||
objectService.NewSignService(
|
||||
c.key,
|
||||
objectService.NewResponseService(
|
||||
objectService.NewTransportSplitter(
|
||||
c.cfgGRPC.maxChunkSize,
|
||||
c.cfgGRPC.maxAddrAmount,
|
||||
|
@ -346,6 +347,8 @@ func initObjectService(c *cfg) {
|
|||
delete: sDeleteV2,
|
||||
},
|
||||
),
|
||||
c.respSvc,
|
||||
),
|
||||
),
|
||||
),
|
||||
acl.WithLocalStorage(ls),
|
||||
|
|
|
@ -15,10 +15,13 @@ func initSessionService(c *cfg) {
|
|||
sessionTransportGRPC.New(
|
||||
sessionSvc.NewSignService(
|
||||
c.key,
|
||||
sessionSvc.NewResponseService(
|
||||
sessionSvc.NewExecutionService(
|
||||
c.privateTokenStore,
|
||||
new(session.ResponseMetaHeader),
|
||||
),
|
||||
c.respSvc,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue