forked from TrueCloudLab/frostfs-node
[#84] Run netmap service in neofs-node app
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
20c27d0542
commit
dee1d81b04
4 changed files with 41 additions and 13 deletions
|
@ -1,12 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
v2netmap "github.com/nspcc-dev/neofs-api-go/v2/netmap"
|
||||
crypto "github.com/nspcc-dev/neofs-crypto"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap/wrapper"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func initMorphComponents(c *cfg) {
|
||||
|
@ -31,13 +28,3 @@ func initMorphComponents(c *cfg) {
|
|||
c.cfgObject.netMapStorage = wrap
|
||||
c.cfgNetmap.wrapper = wrap
|
||||
}
|
||||
|
||||
func bootstrapNode(c *cfg) {
|
||||
peerInfo := new(v2netmap.NodeInfo)
|
||||
peerInfo.SetAddress(c.localAddr.String())
|
||||
peerInfo.SetPublicKey(crypto.MarshalPublicKey(&c.key.PublicKey))
|
||||
peerInfo.SetAttributes(c.cfgNodeInfo.attributes)
|
||||
|
||||
err := c.cfgNetmap.wrapper.AddPeer(peerInfo)
|
||||
fatalOnErr(errors.Wrap(err, "bootstrap error"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue