componentHandler

package
v1.0.124 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgHeartbeat

type ArgHeartbeat struct {
	HeartbeatConfig          config.HeartbeatConfig
	PrefsConfig              config.PreferencesConfig
	Marshalizer              marshal.Marshalizer
	Messenger                heartbeat.P2PMessenger
	ShardCoordinator         sharding.Coordinator
	NodesCoordinator         sharding.NodesCoordinator
	AppStatusHandler         core.AppStatusHandler
	Storer                   storage.Storer
	ValidatorStatistics      heartbeat.ValidatorStatisticsProcessor
	KeyGenerator             crypto.KeyGenerator
	SingleSigner             crypto.SingleSigner
	PrivKey                  crypto.PrivateKey
	HardforkTrigger          heartbeat.HardforkTrigger
	AntifloodHandler         heartbeat.P2PAntifloodHandler
	PeerBlackListHandler     heartbeat.BlackListHandler
	ValidatorPubkeyConverter core.PubkeyConverter
	EpochStartTrigger        sharding.EpochHandler
	EpochStartRegistration   sharding.EpochStartEventNotifier
	Timer                    heartbeat.Timer
	GenesisTime              time.Time
	VersionNumber            string
	PeerShardMapper          heartbeat.NetworkShardingCollector
	SizeCheckDelta           uint32
	ValidatorsProvider       peerProcess.ValidatorsProvider
}

ArgHeartbeat represents the heartbeat creation argument

type HeartbeatHandler

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

HeartbeatHandler is the struct used to manage heartbeat subsystem consisting of a heartbeat sender and monitor wired on a dedicated p2p topic

func NewHeartbeatHandler

func NewHeartbeatHandler(arg ArgHeartbeat) (*HeartbeatHandler, error)

NewHeartbeatHandler will create a heartbeat handler containing both a monitor and a sender

func (*HeartbeatHandler) Close

func (hbh *HeartbeatHandler) Close() error

Close will close the endless running go routine

func (*HeartbeatHandler) IsInterfaceNil

func (hbh *HeartbeatHandler) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*HeartbeatHandler) Monitor

func (hbh *HeartbeatHandler) Monitor() *process.Monitor

Monitor returns the monitor component

func (*HeartbeatHandler) Sender

func (hbh *HeartbeatHandler) Sender() *process.Sender

Sender returns the sender component

Jump to

Keyboard shortcuts

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