[#43] cmd/neofs-node: Use morph wrappers as data sources
Morph wrappers are being uses as sources for containers and snapshots of network map. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
1914b4dbad
commit
8585e147d0
3 changed files with 30 additions and 21 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/container"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper"
|
||||
containerTransportGRPC "github.com/nspcc-dev/neofs-node/pkg/network/transport/container/grpc"
|
||||
containerService "github.com/nspcc-dev/neofs-node/pkg/services/container"
|
||||
containerMorph "github.com/nspcc-dev/neofs-node/pkg/services/container/morph"
|
||||
|
@ -21,6 +22,11 @@ func initContainerService(c *cfg) {
|
|||
cnrClient, err := container.New(staticClient)
|
||||
fatalOnErr(err)
|
||||
|
||||
wrap, err := wrapper.New(cnrClient)
|
||||
fatalOnErr(err)
|
||||
|
||||
c.cfgObject.cnrStorage = wrap // use RPC node as source of containers
|
||||
|
||||
metaHdr := new(session.ResponseMetaHeader)
|
||||
xHdr := new(session.XHeader)
|
||||
xHdr.SetKey("test X-Header key")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue