From 5f65ec0265e396891b3906044d97bdfe100dc050 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 23 Dec 2020 12:47:40 +0300 Subject: [PATCH] [#271] audit/report: Add PoR related setters Signed-off-by: Alex Vanin --- pkg/services/audit/report.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/services/audit/report.go b/pkg/services/audit/report.go index 2989604a2..bf23ab14f 100644 --- a/pkg/services/audit/report.go +++ b/pkg/services/audit/report.go @@ -3,6 +3,7 @@ package audit import ( "github.com/nspcc-dev/neofs-api-go/pkg/audit" "github.com/nspcc-dev/neofs-api-go/pkg/container" + "github.com/nspcc-dev/neofs-api-go/pkg/object" ) // Report tracks the progress of auditing container data. @@ -36,3 +37,13 @@ func (r *Report) Result() *audit.Result { func (r *Report) Complete() { r.res.SetComplete(true) } + +// PassedPoR updates list of passed storage groups. +func (r *Report) PassedPoR(sg *object.ID) { + r.res.SetPassSG(append(r.res.PassSG(), sg)) +} + +// FailedPoR updates list of failed storage groups. +func (r *Report) FailedPoR(sg *object.ID) { + r.res.SetFailSG(append(r.res.FailSG(), sg)) +}