[#1231] Update new SDK Client interface

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2022-03-11 18:24:11 +03:00 committed by Alex Vanin
parent 697c12a5e9
commit b6720d5f97
14 changed files with 158 additions and 82 deletions

View file

@ -2,6 +2,7 @@ package cmd
import (
"github.com/mr-tron/base58"
"github.com/nspcc-dev/neofs-api-go/v2/rpc/client"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
controlSvc "github.com/nspcc-dev/neofs-node/pkg/services/control/server"
"github.com/nspcc-dev/neofs-sdk-go/util/signature"
@ -45,7 +46,11 @@ func restoreShard(cmd *cobra.Command, _ []string) {
cli, err := getControlSDKClient(key)
exitOnErr(cmd, err)
resp, err := control.RestoreShard(cli.Raw(), req)
var resp *control.RestoreShardResponse
err = cli.ExecRaw(func(client *client.Client) error {
resp, err = control.RestoreShard(client, req)
return err
})
exitOnErr(cmd, errf("rpc error: %w", err))
sign := resp.GetSignature()