[#271] service/audit: Implement PoR

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-12-23 12:54:34 +03:00 committed by Alex Vanin
parent 5f65ec0265
commit a5320408a5
4 changed files with 115 additions and 4 deletions

View file

@ -90,6 +90,7 @@ func (c *ClientCache) GetSG(task *audit.Task, id *object.ID) (*storagegroup.Stor
cctx, cancel := context.WithTimeout(task.AuditContext(), c.sgTimeout)
obj, err := cli.GetObject(cctx, getParams)
cancel()
if err != nil {
@ -135,6 +136,7 @@ func (c *ClientCache) GetHeader(task *audit.Task, node *netmap.Node, id *object.
cctx, cancel := context.WithTimeout(task.AuditContext(), c.headTimeout)
head, err := cli.GetObjectHeader(cctx, headParams, client.WithTTL(1))
cancel()
if err != nil {