[#186] object/search: Use new storage engine for work

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-19 11:24:02 +03:00 committed by Alex Vanin
parent aa9eb2eaf2
commit 1bce2a4e55
2 changed files with 6 additions and 6 deletions

View file

@ -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)
}

View file

@ -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
}