audit

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const ProcessorPoolSize = 1

ProcessorPoolSize limits pool size for audit Processor. Processor manages audit tasks and fills queue for the next epoch. This process must not be interrupted by a new audit epoch, so we limit the pool size for the processor to one.

Variables

View Source
var ErrInvalidIRNode = errors.New("node is not in the inner ring list")

Functions

func Select

func Select(ids []cid.ID, epoch, index, size uint64) []cid.ID

Types

type EpochSource added in v0.29.0

type EpochSource interface {
	// EpochCounter must return current epoch number.
	EpochCounter() uint64
}

EpochSource is an interface that provides actual epoch information.

type Indexer

type Indexer interface {
	InnerRingIndex() int
	InnerRingSize() int
}

Indexer is a callback interface for inner ring global state.

type Params

type Params struct {
	Log              *zap.Logger
	NetmapClient     *nmClient.Client
	ContainerClient  *cntClient.Client
	IRList           Indexer
	SGSource         storagegroup.SGSource
	RPCSearchTimeout time.Duration
	TaskManager      TaskManager
	Reporter         audit.Reporter
	Key              *ecdsa.PrivateKey
	EpochSource      EpochSource
}

Params of the processor constructor.

type Processor

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

Processor of events related to data audit.

func New

func New(p *Params) (*Processor, error)

New creates audit processor instance.

func (*Processor) ListenerNotificationHandlers added in v0.25.0

func (ap *Processor) ListenerNotificationHandlers() []event.NotificationHandlerInfo

ListenerNotificationHandlers for the 'event.Listener' event producer.

func (*Processor) ListenerNotificationParsers added in v0.25.0

func (ap *Processor) ListenerNotificationParsers() []event.NotificationParserInfo

ListenerNotificationParsers for the 'event.Listener' event producer.

func (*Processor) StartAuditHandler

func (ap *Processor) StartAuditHandler() event.Handler

StartAuditHandler for the internal event producer.

func (*Processor) TimersHandlers

func (ap *Processor) TimersHandlers() []event.NotificationHandlerInfo

TimersHandlers for the 'Timers' event producer.

type Start

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

Start is an event to start a new round of data audit.

func NewAuditStartEvent

func NewAuditStartEvent(epoch uint64) Start

func (Start) Epoch

func (a Start) Epoch() uint64

func (Start) MorphEvent

func (a Start) MorphEvent()

MorphEvent implements the Event interface.

type TaskManager

type TaskManager interface {
	PushTask(*audit.Task) error

	// Must skip all tasks planned for execution and
	// return their number.
	Reset() int
}

Jump to

Keyboard shortcuts

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