From 1bce2a4e55ab08d3c1ff54e0f5542a7c15a1e98a Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 19 Nov 2020 11:24:02 +0300 Subject: [PATCH] [#186] object/search: Use new storage engine for work Signed-off-by: Leonard Lyubich --- pkg/services/object/search/local.go | 6 +++--- pkg/services/object/search/service.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/services/object/search/local.go b/pkg/services/object/search/local.go index 7a221db09..3d4800c32 100644 --- a/pkg/services/object/search/local.go +++ b/pkg/services/object/search/local.go @@ -5,7 +5,7 @@ import ( "github.com/nspcc-dev/neofs-api-go/pkg/container" objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - "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/search/query" "github.com/pkg/errors" ) @@ -13,7 +13,7 @@ import ( type localStream struct { query query.Query - storage *localstore.Storage + storage *engine.StorageEngine cid *container.ID } @@ -22,7 +22,7 @@ func (s *localStream) stream(ctx context.Context, ch chan<- []*objectSDK.ID) err fs := s.query.ToSearchFilters() fs.AddObjectContainerIDFilter(objectSDK.MatchStringEqual, s.cid) - addrList, err := s.storage.Select(fs) + addrList, err := engine.Select(s.storage, fs) if err != nil { return errors.Wrapf(err, "(%T) could not select objects from local storage", s) } diff --git a/pkg/services/object/search/service.go b/pkg/services/object/search/service.go index 0a5bd3972..e66b2bb2b 100644 --- a/pkg/services/object/search/service.go +++ b/pkg/services/object/search/service.go @@ -8,7 +8,7 @@ import ( "github.com/nspcc-dev/neofs-api-go/pkg/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/network" "github.com/nspcc-dev/neofs-node/pkg/network/cache" objutil "github.com/nspcc-dev/neofs-node/pkg/services/object/util" @@ -26,7 +26,7 @@ type Option func(*cfg) type cfg struct { keyStorage *objutil.KeyStorage - localStore *localstore.Storage + localStore *engine.StorageEngine cnrSrc container.Source @@ -78,7 +78,7 @@ func WithKeyStorage(v *objutil.KeyStorage) Option { } } -func WithLocalStorage(v *localstore.Storage) Option { +func WithLocalStorage(v *engine.StorageEngine) Option { return func(c *cfg) { c.localStore = v }