Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootstrapNodeInfo ¶
type BootstrapNodeInfo struct {
Host string // ip or hostname
Port uint
NetworkPublicKey crypto.PublicKey // the network public key of the bootstrap peer
}
BootstrapNodeInfo contains the details about the upstream bootstrap peer the consensus follower uses
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config contains the configurable fields for a `ConsensusFollower`.
type ConsensusFollower ¶
type ConsensusFollower interface {
// Run starts the consensus follower.
Run(context.Context)
// AddOnBlockFinalizedConsumer adds a new block finalization subscriber.
AddOnBlockFinalizedConsumer(pubsub.OnBlockFinalizedConsumer)
}
ConsensusFollower is a standalone module run by third parties which provides a mechanism for observing the block chain. It maintains a set of subscribers and delivers block proposals broadcasted by the consensus nodes to each one.
type ConsensusFollowerImpl ¶
type ConsensusFollowerImpl struct {
// contains filtered or unexported fields
}
func NewConsensusFollower ¶
func NewConsensusFollower( nodeID flow.Identifier, bootstapIdentities []BootstrapNodeInfo, bindAddr string, opts ...Option, ) (*ConsensusFollowerImpl, error)
NewConsensusFollower creates a new consensus follower.
func (*ConsensusFollowerImpl) AddOnBlockFinalizedConsumer ¶
func (cf *ConsensusFollowerImpl) AddOnBlockFinalizedConsumer(consumer pubsub.OnBlockFinalizedConsumer)
AddOnBlockFinalizedConsumer adds a new block finalization subscriber.
func (*ConsensusFollowerImpl) Run ¶
func (cf *ConsensusFollowerImpl) Run(ctx context.Context)
Run starts the consensus follower.
Click to show internal directories.
Click to hide internal directories.