forked from TrueCloudLab/frostfs-node
[#505] morph/container: Change get container API
Make `Get` method of the wrapper over Container contract's client to accept binary container ID. Create `Get` function similar to the previous `Get` variation. Use this function in Container service server in the place where `Get` method was used. Additionally implement `AsContainerSource` function which allows to simply compose container Source interface from the wrapper. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
6310535b3c
commit
83c27f6e8a
6 changed files with 33 additions and 19 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"github.com/nspcc-dev/neofs-api-go/pkg/container"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/netmap"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/network"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/audit"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/object_manager/storagegroup"
|
||||
|
@ -49,7 +50,7 @@ func (ap *Processor) processStartAudit(epoch uint64) {
|
|||
auditCtx, ap.prevAuditCanceler = context.WithCancel(context.Background())
|
||||
|
||||
for i := range containers {
|
||||
cnr, err := ap.containerClient.Get(containers[i]) // get container structure
|
||||
cnr, err := wrapper.Get(ap.containerClient, containers[i]) // get container structure
|
||||
if err != nil {
|
||||
log.Error("can't get container info, ignore",
|
||||
zap.Stringer("cid", containers[i]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue