netmap

package
v0.42.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlphabetState added in v0.18.0

type AlphabetState interface {
	IsAlphabet() bool
}

AlphabetState is a callback interface for inner ring global state.

type EpochState

type EpochState interface {
	SetEpochCounter(uint64)
	EpochCounter() uint64
	SetEpochDuration(uint64)
	EpochDuration() uint64
}

EpochState is a callback interface for inner ring global state.

type EpochTimerReseter

type EpochTimerReseter interface {
	ResetEpochTimer(uint32) error
}

EpochTimerReseter is a callback interface for tickers component.

type NodeValidator added in v0.15.0

type NodeValidator interface {
	// Verify must verify NodeInfo structure.
	//
	// Must return an error if NodeInfo input is invalid.
	Verify(netmap.NodeInfo) error
}

NodeValidator wraps basic method of checking the correctness of information about the node and its finalization for adding to the network map.

type Params

type Params struct {
	Log              *zap.Logger
	PoolSize         int
	NetmapClient     *nmClient.Client
	EpochTimer       EpochTimerReseter
	EpochState       EpochState
	AlphabetState    AlphabetState
	CleanupEnabled   bool
	CleanupThreshold uint64 // in epochs
	ContainerWrapper *container.Client

	HandleAudit             event.Handler
	AuditSettlementsHandler event.Handler
	AlphabetSyncHandler     event.Handler
	NotaryDepositHandler    event.Handler

	NodeValidator NodeValidator

	NodeStateSettings state.NetworkSettings
}

Params of the processor constructor.

type Processor

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

Processor of events produced by network map contract and new epoch ticker, because it is related to contract.

func New

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

New creates network map contract processor instance.

func (*Processor) HandleNewEpochTick added in v0.15.0

func (np *Processor) HandleNewEpochTick(ev event.Event)

func (*Processor) ListenerNotaryHandlers added in v0.25.0

func (np *Processor) ListenerNotaryHandlers() []event.NotaryHandlerInfo

ListenerNotaryHandlers for the 'event.Listener' event producer.

func (*Processor) ListenerNotaryParsers added in v0.25.0

func (np *Processor) ListenerNotaryParsers() []event.NotaryParserInfo

ListenerNotaryParsers for the 'event.Listener' event producer.

func (*Processor) ListenerNotificationHandlers added in v0.25.0

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

ListenerNotificationHandlers for the 'event.Listener' event producer.

func (*Processor) ListenerNotificationParsers added in v0.25.0

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

ListenerNotificationParsers for the 'event.Listener' event producer.

func (*Processor) TimersHandlers

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

TimersHandlers for the 'Timers' event producer.

Directories

Path Synopsis
state
Package state collects functionality for verifying states of network map members.
Package state collects functionality for verifying states of network map members.

Jump to

Keyboard shortcuts

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