[#146] pool: Set private key in object HEAD/DELETE

Use call private key parameterized in `HeadObject` / `DeleteObject`
methods of `Pool` as corresponding key for `ObjectHead` / `ObjectDelete`
methods of `Client`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-02-21 15:10:16 +03:00 committed by LeL
parent e1c73fd43d
commit 66bc59da5c

View file

@ -820,6 +820,8 @@ func (p *pool) DeleteObject(ctx context.Context, addr address.Address, opts ...C
prm.ByID(*obj) prm.ByID(*obj)
} }
prm.UseKey(*cc.key)
return p.callWithRetry(&cc, func() error { return p.callWithRetry(&cc, func() error {
_, err := cc.client.ObjectDelete(ctx, prm) _, err := cc.client.ObjectDelete(ctx, prm)
if err != nil { if err != nil {
@ -919,6 +921,8 @@ func (p *pool) HeadObject(ctx context.Context, addr address.Address, opts ...Cal
prm.ByID(*obj) prm.ByID(*obj)
} }
prm.UseKey(*cc.key)
var obj object.Object var obj object.Object
err = p.callWithRetry(&cc, func() error { err = p.callWithRetry(&cc, func() error {