[#78] Using client.Object from sdk

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2021-06-15 11:51:42 +03:00
parent ee078eabcc
commit fba29a9a66
5 changed files with 11 additions and 44 deletions

View file

@ -115,12 +115,8 @@ func (n *layer) Owner(ctx context.Context) *owner.ID {
// Get NeoFS Object by refs.Address (should be used by auth.Center).
func (n *layer) Get(ctx context.Context, address *object.Address) (*object.Object, error) {
conn, tok, err := n.pool.Connection()
if err != nil {
return nil, err
}
ops := new(client.GetObjectParams).WithAddress(address)
return conn.GetObject(ctx, ops, client.WithSession(tok))
return n.pool.GetObject(ctx, ops)
}
// GetBucketInfo returns bucket info by name.