factory

package
v1.999.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStatusHandlersFactory

func NewStatusHandlersFactory() (*statusHandlerUtilsFactory, error)

NewStatusHandlersFactory will return the status handler factory

Types

type FileLoggingHandler

type FileLoggingHandler interface {
	ChangeFileLifeSpan(newDuration time.Duration, newSizeInMB uint64) error
	Close() error
	IsInterfaceNil() bool
}

FileLoggingHandler will handle log file rotation

type HeaderIntegrityVerifierHandler

type HeaderIntegrityVerifierHandler interface {
	Verify(header data.HeaderHandler) error
	GetVersion(epoch uint32) string
	IsInterfaceNil() bool
}

HeaderIntegrityVerifierHandler is the interface needed to check that a header's integrity is correct

type HeaderSigVerifierHandler

type HeaderSigVerifierHandler interface {
	VerifyRandSeed(header data.HeaderHandler) error
	VerifyLeaderSignature(header data.HeaderHandler) error
	VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error
	VerifySignature(header data.HeaderHandler) error
	IsInterfaceNil() bool
}

HeaderSigVerifierHandler is the interface needed to check that a header's signature is correct

type HeaderVersionHandler

type HeaderVersionHandler interface {
	GetVersion(epoch uint32) string
	Verify(hdr data.HeaderHandler) error
	IsInterfaceNil() bool
}

HeaderVersionHandler handles the header version

type P2PAntifloodHandler

type P2PAntifloodHandler interface {
	CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
	CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32) error
	ResetForTopic(topic string)
	SetMaxMessagesForTopic(topic string, maxNum uint32)
	IsInterfaceNil() bool
}

P2PAntifloodHandler defines the behavior of a component able to signal that the system is too busy (or flooded) processing p2p messages

type StatusHandlerUtilsFactory

type StatusHandlerUtilsFactory interface {
	Create(marshalizer marshal.Marshalizer, converter typeConverters.Uint64ByteSliceConverter) (StatusHandlersUtils, error)
}

StatusHandlerUtilsFactory is the factory for statusHandler utils

type StatusHandlersUtils

type StatusHandlersUtils interface {
	StatusHandler() core.AppStatusHandler
	Metrics() external.StatusMetricsHandler
	UpdateStorerAndMetricsForPersistentHandler(store storage.Storer) error
	IsInterfaceNil() bool
}

StatusHandlersUtils provides some functionality for statusHandlers TODO: find a better naming

type VersionedHeaderFactory

type VersionedHeaderFactory interface {
	Create(epoch uint32) data.HeaderHandler
	IsInterfaceNil() bool
}

VersionedHeaderFactory creates versioned headers

Jump to

Keyboard shortcuts

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