From aa9eb2eaf2e852c7cb39e3ddc18dff3b0c3db63a Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 19 Nov 2020 11:22:43 +0300 Subject: [PATCH] [#186] policer: Use new storage engine for work Signed-off-by: Leonard Lyubich --- pkg/services/policer/policer.go | 4 ++-- pkg/services/policer/queue.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/services/policer/policer.go b/pkg/services/policer/policer.go index fdc594c85..cd92bfdc4 100644 --- a/pkg/services/policer/policer.go +++ b/pkg/services/policer/policer.go @@ -5,7 +5,7 @@ import ( "time" "github.com/nspcc-dev/neofs-node/pkg/core/container" - "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" headsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/head" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement" @@ -108,7 +108,7 @@ func WithLogger(v *logger.Logger) Option { } // WithLocalStorage returns option to set local object storage of Policer. -func WithLocalStorage(v *localstore.Storage) Option { +func WithLocalStorage(v *engine.StorageEngine) Option { return func(c *cfg) { c.jobQueue.localStorage = v } diff --git a/pkg/services/policer/queue.go b/pkg/services/policer/queue.go index 0b06b51c1..6149d121b 100644 --- a/pkg/services/policer/queue.go +++ b/pkg/services/policer/queue.go @@ -2,11 +2,11 @@ package policer import ( "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" ) type jobQueue struct { - localStorage *localstore.Storage + localStorage *engine.StorageEngine } var jobFilter object.SearchFilters @@ -17,7 +17,7 @@ func (q *jobQueue) Select(limit int) ([]*object.Address, error) { // It is recommended to make changes after updating the metabase // FIXME: add the ability to limit Select result - res, err := q.localStorage.Select(getJobFilter()) + res, err := engine.Select(q.localStorage, getJobFilter()) if err != nil { return nil, err }