forked from TrueCloudLab/frostfs-node
[#1731] services/control: Replicate object over network in EvacuateShard RPC
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
a49137349b
commit
4e043a801c
8 changed files with 121 additions and 11 deletions
|
@ -3,9 +3,11 @@ package control
|
|||
import (
|
||||
"crypto/ecdsa"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/container"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/netmap"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/replicator"
|
||||
)
|
||||
|
||||
// Server is an entity that serves
|
||||
|
@ -47,6 +49,10 @@ type cfg struct {
|
|||
|
||||
netMapSrc netmap.Source
|
||||
|
||||
cnrSrc container.Source
|
||||
|
||||
replicator *replicator.Replicator
|
||||
|
||||
nodeState NodeState
|
||||
|
||||
treeService TreeService
|
||||
|
@ -102,6 +108,20 @@ func WithNetMapSource(netMapSrc netmap.Source) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithContainerSource returns option to set container storage.
|
||||
func WithContainerSource(cnrSrc container.Source) Option {
|
||||
return func(c *cfg) {
|
||||
c.cnrSrc = cnrSrc
|
||||
}
|
||||
}
|
||||
|
||||
// WithReplicator returns option to set network map storage.
|
||||
func WithReplicator(r *replicator.Replicator) Option {
|
||||
return func(c *cfg) {
|
||||
c.replicator = r
|
||||
}
|
||||
}
|
||||
|
||||
// WithNodeState returns option to set node network state component.
|
||||
func WithNodeState(state NodeState) Option {
|
||||
return func(c *cfg) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue