processor

package
v1.3.40 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDirectConnectionsProcessor

func NewDirectConnectionsProcessor(args ArgDirectConnectionsProcessor) (*directConnectionsProcessor, error)

NewDirectConnectionsProcessor creates a new instance of directConnectionsProcessor

func NewPeerAuthenticationRequestsProcessor

func NewPeerAuthenticationRequestsProcessor(args ArgPeerAuthenticationRequestsProcessor) (*peerAuthenticationRequestsProcessor, error)

NewPeerAuthenticationRequestsProcessor creates a new instance of peerAuthenticationRequestsProcessor

Types

type ArgDirectConnectionsProcessor

type ArgDirectConnectionsProcessor struct {
	Messenger                 p2p.Messenger
	Marshaller                marshal.Marshalizer
	ShardCoordinator          sharding.Coordinator
	DelayBetweenNotifications time.Duration
	NodesCoordinator          NodesCoordinator
}

ArgDirectConnectionsProcessor represents the arguments for the direct connections processor

type ArgPeerAuthenticationRequestsProcessor

type ArgPeerAuthenticationRequestsProcessor struct {
	RequestHandler          process.RequestHandler
	NodesCoordinator        heartbeat.NodesCoordinator
	PeerAuthenticationPool  storage.Cacher
	ShardId                 uint32
	Epoch                   uint32
	MinPeersThreshold       float32
	DelayBetweenRequests    time.Duration
	MaxTimeout              time.Duration
	MaxMissingKeysInRequest uint32
	Randomizer              dataRetriever.IntRandomizer
}

ArgPeerAuthenticationRequestsProcessor represents the arguments for the peer authentication request processor

type NodesCoordinator

type NodesCoordinator interface {
	GetOwnPublicKey() []byte
	GetValidatorWithPublicKey(publicKey []byte) (nodesCoord.Validator, uint32, error)
	IsInterfaceNil() bool
}

NodesCoordinator defines the operations for a struct that is able to determine if a key is a validator or not

Jump to

Keyboard shortcuts

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