forked from TrueCloudLab/frostfs-node
[#1278] acl: Return netmap.Source interface
Application can provide cached netmap source in this case. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
cf119e4ca9
commit
7ed84d1755
3 changed files with 7 additions and 7 deletions
|
@ -358,7 +358,7 @@ func initObjectService(c *cfg) {
|
|||
aclSvc := v2.New(
|
||||
v2.WithLogger(c.log),
|
||||
v2.WithIRFetcher(irFetcher),
|
||||
v2.WithNetmapClient(c.cfgNetmap.wrapper),
|
||||
v2.WithNetmapSource(c.cfgNetmap.wrapper),
|
||||
v2.WithContainerSource(
|
||||
c.cfgObject.cnrSource,
|
||||
),
|
||||
|
|
|
@ -2,7 +2,7 @@ package v2
|
|||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/container"
|
||||
netmapClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/netmap"
|
||||
objectSvc "github.com/nspcc-dev/neofs-node/pkg/services/object"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
@ -14,9 +14,9 @@ func WithLogger(v *zap.Logger) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithNetmapClient return option to set
|
||||
// netmap client.
|
||||
func WithNetmapClient(v *netmapClient.Client) Option {
|
||||
// WithNetmapSource return option to set
|
||||
// netmap source.
|
||||
func WithNetmapSource(v netmap.Source) Option {
|
||||
return func(c *cfg) {
|
||||
c.nm = v
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/container"
|
||||
netmapClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/netmap"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/object"
|
||||
cidSDK "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||
eaclSDK "github.com/nspcc-dev/neofs-sdk-go/eacl"
|
||||
|
@ -63,7 +63,7 @@ type cfg struct {
|
|||
|
||||
irFetcher InnerRingFetcher
|
||||
|
||||
nm *netmapClient.Client
|
||||
nm netmap.Source
|
||||
|
||||
next object.ServiceServer
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue