auditor

package
v0.0.0-...-79ba347 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: GPL-3.0 Imports: 19 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 {
	// GetHeader must return object header from the container node.
	GetHeader(GetHeaderPrm) (*object.Object, error)

	// GetRangeHash must return homomorphic Tillich-Zemor hash of payload range of the
	// object stored in container node.
	GetRangeHash(GetRangeHashPrm) ([]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.

type GetHeaderPrm

type GetHeaderPrm struct {
	NodeIsRelay bool
	// contains filtered or unexported fields
}

GetHeaderPrm groups parameter of GetHeader operation.

type GetRangeHashPrm

type GetRangeHashPrm struct {
	Range *object.Range
	// contains filtered or unexported fields
}

GetRangeHashPrm groups parameter of GetRangeHash operation.

Jump to

Keyboard shortcuts

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