[#186] object/acl: Use new storage engine for work
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
046206f670
commit
953387a1e5
4 changed files with 9 additions and 9 deletions
|
@ -17,7 +17,7 @@ import (
|
|||
crypto "github.com/nspcc-dev/neofs-crypto"
|
||||
core "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/localstore"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl"
|
||||
eaclV2 "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl/v2"
|
||||
"github.com/pkg/errors"
|
||||
|
@ -84,7 +84,7 @@ type eACLCfg struct {
|
|||
|
||||
eACL *eacl.Validator
|
||||
|
||||
localStorage *localstore.Storage
|
||||
localStorage *engine.StorageEngine
|
||||
|
||||
state netmap.State
|
||||
}
|
||||
|
|
|
@ -5,11 +5,11 @@ import (
|
|||
|
||||
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/object"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/localstore"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
)
|
||||
|
||||
type localStorage struct {
|
||||
ls *localstore.Storage
|
||||
ls *engine.StorageEngine
|
||||
}
|
||||
|
||||
func (s *localStorage) Head(addr *objectSDK.Address) (*object.Object, error) {
|
||||
|
@ -17,5 +17,5 @@ func (s *localStorage) Head(addr *objectSDK.Address) (*object.Object, error) {
|
|||
return nil, io.ErrUnexpectedEOF
|
||||
}
|
||||
|
||||
return s.ls.Head(addr)
|
||||
return engine.Head(s.ls, addr)
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package v2
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/localstore"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
)
|
||||
|
||||
func WithObjectStorage(v ObjectStorage) Option {
|
||||
|
@ -10,7 +10,7 @@ func WithObjectStorage(v ObjectStorage) Option {
|
|||
}
|
||||
}
|
||||
|
||||
func WithLocalObjectStorage(v *localstore.Storage) Option {
|
||||
func WithLocalObjectStorage(v *engine.StorageEngine) Option {
|
||||
return func(c *cfg) {
|
||||
c.storage = &localStorage{
|
||||
ls: v,
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"github.com/nspcc-dev/neofs-api-go/v2/object"
|
||||
"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/localstore"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl"
|
||||
)
|
||||
|
||||
|
@ -37,7 +37,7 @@ func WithEACLValidatorOptions(v ...eacl.Option) Option {
|
|||
}
|
||||
|
||||
// WithLocalStorage returns options to set local object storage.
|
||||
func WithLocalStorage(v *localstore.Storage) Option {
|
||||
func WithLocalStorage(v *engine.StorageEngine) Option {
|
||||
return func(c *cfg) {
|
||||
c.localStorage = v
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue