From 2be8f154a01a1f7fbc5bc24bef5e78a4c167356a Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 19 Nov 2020 11:29:38 +0300 Subject: [PATCH] [#186] object/put: Use new storage engine for work Signed-off-by: Leonard Lyubich --- pkg/services/object/put/local.go | 6 +++--- pkg/services/object/put/service.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/services/object/put/local.go b/pkg/services/object/put/local.go index b30275e9..2055b47b 100644 --- a/pkg/services/object/put/local.go +++ b/pkg/services/object/put/local.go @@ -2,13 +2,13 @@ package putsvc import ( "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" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/transformer" "github.com/pkg/errors" ) type localTarget struct { - storage *localstore.Storage + storage *engine.StorageEngine obj *object.RawObject @@ -30,7 +30,7 @@ func (t *localTarget) Write(p []byte) (n int, err error) { } func (t *localTarget) Close() (*transformer.AccessIdentifiers, error) { - if err := t.storage.Put(t.obj.Object()); err != nil { + if err := engine.Put(t.storage, t.obj.Object()); err != nil { return nil, errors.Wrapf(err, "(%T) could not put object to local storage", t) } diff --git a/pkg/services/object/put/service.go b/pkg/services/object/put/service.go index 958f7855..73faad8f 100644 --- a/pkg/services/object/put/service.go +++ b/pkg/services/object/put/service.go @@ -7,7 +7,7 @@ import ( "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/core/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/network" "github.com/nspcc-dev/neofs-node/pkg/network/cache" objutil "github.com/nspcc-dev/neofs-node/pkg/services/object/util" @@ -35,7 +35,7 @@ type cfg struct { maxSizeSrc MaxSizeSource - localStore *localstore.Storage + localStore *engine.StorageEngine cnrSrc container.Source @@ -98,7 +98,7 @@ func WithMaxSizeSource(v MaxSizeSource) Option { } } -func WithLocalStorage(v *localstore.Storage) Option { +func WithLocalStorage(v *engine.StorageEngine) Option { return func(c *cfg) { c.localStore = v }