Documentation ¶
Index ¶
- Variables
- func NewKeysHandler(args ArgsKeysHandler) (*keysHandler, error)
- func NewManagedPeersHolder(args ArgsManagedPeersHolder) (*managedPeersHolder, error)
- func NewManagedPeersMonitor(args ArgManagedPeersMonitor) (*managedPeersMonitor, error)
- type ArgManagedPeersMonitor
- type ArgsKeysHandler
- type ArgsManagedPeersHolder
- type CurrentEpochProvider
- type NodesCoordinator
- type ShardProvider
Constants ¶
This section is empty.
Variables ¶
var ErrDuplicatedKey = errors.New("duplicated key found")
ErrDuplicatedKey signals that a key is already managed by the node
var ErrEmptyPeerID = errors.New("empty peer ID")
ErrEmptyPeerID signals that an empty peer ID was provided
var ErrInvalidKey = errors.New("invalid key")
ErrInvalidKey signals that an invalid key was provided
var ErrInvalidValue = errors.New("invalid value")
ErrInvalidValue signals that an invalid value was provided
var ErrMissingPublicKeyDefinition = errors.New("missing public key definition")
ErrMissingPublicKeyDefinition signals that a public key definition is missing
var ErrNilEpochProvider = errors.New("nil epoch provider")
ErrNilEpochProvider signals that a nil epoch provider has been provided
var ErrNilKeyGenerator = errors.New("nil key generator")
ErrNilKeyGenerator signals that a nil key generator was provided
var ErrNilManagedPeersHolder = errors.New("nil managed peers holder")
ErrNilManagedPeersHolder signals that a nil managed peers holder was provided
var ErrNilNodesCoordinator = errors.New("nil nodes coordinator")
ErrNilNodesCoordinator signals that a nil nodes coordinator has been provided
var ErrNilP2PKeyConverter = errors.New("nil p2p key converter")
ErrNilP2PKeyConverter signals that a nil p2p key converter has been provided
var ErrNilPrivateKey = errors.New("nil private key")
ErrNilPrivateKey signals that a nil private key was provided
var ErrNilShardProvider = errors.New("nil shard provider")
ErrNilShardProvider signals that a nil shard provider has been provided
Functions ¶
func NewKeysHandler ¶
func NewKeysHandler(args ArgsKeysHandler) (*keysHandler, error)
NewKeysHandler will create a new instance of type keysHandler
func NewManagedPeersHolder ¶
func NewManagedPeersHolder(args ArgsManagedPeersHolder) (*managedPeersHolder, error)
NewManagedPeersHolder creates a new instance of a managed peers holder
func NewManagedPeersMonitor ¶
func NewManagedPeersMonitor(args ArgManagedPeersMonitor) (*managedPeersMonitor, error)
NewManagedPeersMonitor returns a new instance of managedPeersMonitor
Types ¶
type ArgManagedPeersMonitor ¶
type ArgManagedPeersMonitor struct { ManagedPeersHolder common.ManagedPeersHolder NodesCoordinator NodesCoordinator ShardProvider ShardProvider EpochProvider CurrentEpochProvider }
ArgManagedPeersMonitor is the DTO used to create a new instance of managedPeersMonitor
type ArgsKeysHandler ¶
type ArgsKeysHandler struct { ManagedPeersHolder common.ManagedPeersHolder PrivateKey crypto.PrivateKey Pid core.PeerID }
ArgsKeysHandler is the argument DTO struct for the NewKeysHandler constructor function
type ArgsManagedPeersHolder ¶
type ArgsManagedPeersHolder struct { KeyGenerator crypto.KeyGenerator P2PKeyGenerator crypto.KeyGenerator MaxRoundsOfInactivity int PrefsConfig config.Preferences P2PKeyConverter p2p.P2PKeyConverter }
ArgsManagedPeersHolder represents the argument for the managed peers holder
type CurrentEpochProvider ¶
CurrentEpochProvider defines a component able to provide current epoch
type NodesCoordinator ¶
type NodesCoordinator interface { GetAllEligibleValidatorsPublicKeys(epoch uint32) (map[uint32][][]byte, error) GetAllWaitingValidatorsPublicKeys(epoch uint32) (map[uint32][][]byte, error) IsInterfaceNil() bool }
NodesCoordinator provides Validator methods needed for the peer processing
type ShardProvider ¶
ShardProvider defines a component able to provide self shard