*: drop old sdk dependecies, bump neofs-api-go version
I'm not sure it works, but it's enough code-wise for now. We're reusing some http-gw components here that are to be moved into sdk-go in future. Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
parent
dbe65ae602
commit
d19ce03072
15 changed files with 263 additions and 163 deletions
|
@ -42,7 +42,15 @@ func (n *layer) containerInfo(ctx context.Context, cid *container.ID) (*BucketIn
|
|||
}
|
||||
)
|
||||
|
||||
if res, err = n.cli.Container().Get(ctx, cid); err != nil {
|
||||
conn, _, err := n.cli.ConnectionArtifacts()
|
||||
if err != nil {
|
||||
n.log.Error("failed to get connection from the pool",
|
||||
zap.String("request_id", rid),
|
||||
zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
res, err = conn.GetContainer(ctx, cid)
|
||||
if err != nil {
|
||||
n.log.Error("could not fetch container",
|
||||
zap.Stringer("cid", cid),
|
||||
zap.String("request_id", rid),
|
||||
|
@ -84,7 +92,15 @@ func (n *layer) containerList(ctx context.Context) ([]*BucketInfo, error) {
|
|||
rid = api.GetRequestID(ctx)
|
||||
)
|
||||
|
||||
if res, err = n.cli.Container().List(ctx, own); err != nil {
|
||||
conn, _, err := n.cli.ConnectionArtifacts()
|
||||
if err != nil {
|
||||
n.log.Error("failed to get connection from the pool",
|
||||
zap.String("request_id", rid),
|
||||
zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
res, err = conn.ListContainers(ctx, own)
|
||||
if err != nil {
|
||||
n.log.Error("could not fetch container",
|
||||
zap.String("request_id", rid),
|
||||
zap.Error(err))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue