[#271] audit/report: Add PoR related setters

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-12-23 12:47:40 +03:00 committed by Alex Vanin
parent 85773c419b
commit 5f65ec0265

View file

@ -3,6 +3,7 @@ package audit
import ( import (
"github.com/nspcc-dev/neofs-api-go/pkg/audit" "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/container"
"github.com/nspcc-dev/neofs-api-go/pkg/object"
) )
// Report tracks the progress of auditing container data. // Report tracks the progress of auditing container data.
@ -36,3 +37,13 @@ func (r *Report) Result() *audit.Result {
func (r *Report) Complete() { func (r *Report) Complete() {
r.res.SetComplete(true) 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))
}