[#186] object/put: 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:29:38 +03:00 committed by Alex Vanin
parent 14442a0801
commit 2be8f154a0
2 changed files with 6 additions and 6 deletions

View file

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