[#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

@ -17,6 +17,12 @@ type Context struct {
task *audit.Task
report *audit.Report
// consider adding mutex to access caches
sgMembersCache map[int][]*object.ID
placementCache map[string][]netmap.Nodes
}
// ContextPrm groups components required to conduct data audit checks.
@ -77,6 +83,10 @@ func (c *Context) containerID() *container.ID {
func (c *Context) init() {
c.report = audit.NewReport(c.containerID())
c.sgMembersCache = make(map[int][]*object.ID)
c.placementCache = make(map[string][]netmap.Nodes)
c.log = c.log.With(
zap.Stringer("container ID", c.task.ContainerID()),
)