auditor

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerCommunicator

type ContainerCommunicator interface {
	// Must return storage group structure stored in object from container.
	GetSG(*audit.Task, *object.ID) (*storagegroup.StorageGroup, error)

	// Must return object header from the container node.
	GetHeader(*audit.Task, *netmap.Node, *object.ID, bool) (*object.Object, error)

	// Must return homomorphic Tillich-Zemor hash of payload range of the
	// object stored in container node.
	GetRangeHash(*audit.Task, *netmap.Node, *object.ID, *object.Range) ([]byte, error)
}

ContainerCommunicator is an interface of component of communication with container nodes.

type Context

type Context struct {
	ContextPrm
	// contains filtered or unexported fields
}

Context represents container data audit execution context.

func NewContext

func NewContext(prm ContextPrm) *Context

NewContext creates, initializes and returns Context.

func (*Context) Execute

func (c *Context) Execute()

Execute audits container data.

func (*Context) WithPDPWorkerPool

func (c *Context) WithPDPWorkerPool(pool util.WorkerPool) *Context

WithPDPWorkerPool sets worker pool for PDP pairs processing.

func (*Context) WithPoRWorkerPool

func (c *Context) WithPoRWorkerPool(pool util.WorkerPool) *Context

WithPoRWorkerPool sets worker pool for PoR SG processing.

func (*Context) WithTask

func (c *Context) WithTask(t *audit.Task) *Context

WithTask sets container audit parameters.

type ContextPrm

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

ContextPrm groups components required to conduct data audit checks.

func (*ContextPrm) SetContainerCommunicator

func (p *ContextPrm) SetContainerCommunicator(cnrCom ContainerCommunicator)

SetContainerCommunicator sets component of communication with container nodes.

func (*ContextPrm) SetLogger

func (p *ContextPrm) SetLogger(l *logger.Logger)

SetLogger sets logging component.

func (*ContextPrm) SetMaxPDPSleep

func (p *ContextPrm) SetMaxPDPSleep(dur time.Duration)

SetMaxPDPSleep sets maximum sleep interval between range hash requests. as part of PDP check.

Jump to

Keyboard shortcuts

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