forked from TrueCloudLab/frostfs-node
[#186] object/head: Use new storage engine for work
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2be8f154a0
commit
046206f670
2 changed files with 5 additions and 5 deletions
|
@ -4,16 +4,16 @@ import (
|
|||
"context"
|
||||
|
||||
"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/pkg/errors"
|
||||
)
|
||||
|
||||
type localHeader struct {
|
||||
storage *localstore.Storage
|
||||
storage *engine.StorageEngine
|
||||
}
|
||||
|
||||
func (h *localHeader) head(ctx context.Context, prm *Prm, handler func(*object.Object)) error {
|
||||
head, err := h.storage.Head(prm.addr)
|
||||
head, err := engine.Head(h.storage, prm.addr)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "(%T) could not get header from local storage", h)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue