audit

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Report

type Report struct {
	// contains filtered or unexported fields
}

Report tracks the progress of auditing container data.

func NewReport

func NewReport(cid *container.ID) *Report

NewReport creates and returns blank Report instance.

func (*Report) Complete

func (r *Report) Complete()

Complete completes audit report.

func (*Report) FailedPoR

func (r *Report) FailedPoR(sg *object.ID)

FailedPoR updates list of failed storage groups.

func (*Report) PassedPoR

func (r *Report) PassedPoR(sg *object.ID)

PassedPoR updates list of passed storage groups.

func (*Report) Result

func (r *Report) Result() *audit.Result

Result forms the structure of the data audit result.

func (*Report) SetPDPResults

func (r *Report) SetPDPResults(passed, failed [][]byte)

SetPDPResults sets lists of nodes according to their PDP results.

func (*Report) SetPlacementCounters

func (r *Report) SetPlacementCounters(hit, miss, fail uint32)

SetPlacementCounters sets counters of compliance with placement.

func (*Report) SetPoRCounters

func (r *Report) SetPoRCounters(requests, retries uint32)

SetPoRCounters sets amounts of head requests and retries at PoR audit stage.

type Reporter

type Reporter interface {
	WriteReport(r *Report) error
}

Reporter is an interface of the entity that records the data audit report.

type Task

type Task struct {
	// contains filtered or unexported fields
}

Task groups groups the container audit parameters.

func (*Task) AuditContext

func (t *Task) AuditContext() context.Context

AuditContext returns context of the audit of the current epoch.

func (*Task) ContainerID

func (t *Task) ContainerID() *container.ID

ContainerID returns identifier of the container under audit.

func (*Task) ContainerNodes

func (t *Task) ContainerNodes() netmap.ContainerNodes

ContainerNodes returns nodes in the container under audit.

func (*Task) ContainerStructure

func (t *Task) ContainerStructure() *container.Container

ContainerStructure returns structure of the container under audit.

func (*Task) NetworkMap

func (t *Task) NetworkMap() *netmap.Netmap

NetworkMap returns network map of audit epoch.

func (*Task) Reporter

func (t *Task) Reporter() Reporter

Reporter returns audit report writer.

func (*Task) StorageGroupList

func (t *Task) StorageGroupList() []*object.ID

StorageGroupList returns list of storage groups from container under audit.

func (*Task) WithAuditContext

func (t *Task) WithAuditContext(ctx context.Context) *Task

WithAuditContext sets context of the audit of the current epoch.

func (*Task) WithContainerID

func (t *Task) WithContainerID(cid *container.ID) *Task

WithContainerID sets identifier of the container under audit.

func (*Task) WithContainerNodes

func (t *Task) WithContainerNodes(cnrNodes netmap.ContainerNodes) *Task

WithContainerNodes sets nodes in the container under audit.

func (*Task) WithContainerStructure

func (t *Task) WithContainerStructure(cnr *container.Container) *Task

WithContainerStructure sets structure of the container under audit.

func (*Task) WithNetworkMap

func (t *Task) WithNetworkMap(nm *netmap.Netmap) *Task

WithNetworkMap sets network map of audit epoch.

func (*Task) WithReporter

func (t *Task) WithReporter(r Reporter) *Task

WithReporter sets audit report writer.

func (*Task) WithStorageGroupList

func (t *Task) WithStorageGroupList(sgList []*object.ID) *Task

WithStorageGroupList sets list of storage groups from container under audit.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL