forked from TrueCloudLab/frostfs-node
[#271] service/audit: Implement PoR
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
5f65ec0265
commit
a5320408a5
4 changed files with 115 additions and 4 deletions
|
@ -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()),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue