Documentation ¶
Index ¶
- type Distributor
- func (p *Distributor) AddConsumer(consumer hotstuff.Consumer)
- func (p *Distributor) OnBlockIncorporated(block *model.Block)
- func (p *Distributor) OnDoubleProposeDetected(block1, block2 *model.Block)
- func (p *Distributor) OnDoubleVotingDetected(vote1, vote2 *model.Vote)
- func (p *Distributor) OnEnteringView(view uint64, leader flow.Identifier)
- func (p *Distributor) OnEventProcessed()
- func (p *Distributor) OnFinalizedBlock(block *model.Block)
- func (p *Distributor) OnForkChoiceGenerated(curView uint64, selectedQC *flow.QuorumCertificate)
- func (p *Distributor) OnInvalidVoteDetected(vote *model.Vote)
- func (p *Distributor) OnProposingBlock(proposal *model.Proposal)
- func (p *Distributor) OnQcConstructedFromVotes(qc *flow.QuorumCertificate)
- func (p *Distributor) OnQcIncorporated(qc *flow.QuorumCertificate)
- func (p *Distributor) OnQcTriggeredViewChange(qc *flow.QuorumCertificate, newView uint64)
- func (p *Distributor) OnReachedTimeout(timeout *model.TimerInfo)
- func (p *Distributor) OnReceiveProposal(currentView uint64, proposal *model.Proposal)
- func (p *Distributor) OnReceiveVote(currentView uint64, vote *model.Vote)
- func (p *Distributor) OnStartingTimeout(timerInfo *model.TimerInfo)
- func (p *Distributor) OnVoting(vote *model.Vote)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Distributor ¶
type Distributor struct {
// contains filtered or unexported fields
}
Distributor distributes notifications to a list of subscribers (event consumers).
It allows thread-safe subscription of multiple consumers to events.
func NewDistributor ¶
func NewDistributor() *Distributor
func (*Distributor) AddConsumer ¶
func (p *Distributor) AddConsumer(consumer hotstuff.Consumer)
AddConsumer adds an a event consumer to the Distributor
func (*Distributor) OnBlockIncorporated ¶
func (p *Distributor) OnBlockIncorporated(block *model.Block)
func (*Distributor) OnDoubleProposeDetected ¶
func (p *Distributor) OnDoubleProposeDetected(block1, block2 *model.Block)
func (*Distributor) OnDoubleVotingDetected ¶
func (p *Distributor) OnDoubleVotingDetected(vote1, vote2 *model.Vote)
func (*Distributor) OnEnteringView ¶
func (p *Distributor) OnEnteringView(view uint64, leader flow.Identifier)
func (*Distributor) OnEventProcessed ¶
func (p *Distributor) OnEventProcessed()
func (*Distributor) OnFinalizedBlock ¶
func (p *Distributor) OnFinalizedBlock(block *model.Block)
func (*Distributor) OnForkChoiceGenerated ¶
func (p *Distributor) OnForkChoiceGenerated(curView uint64, selectedQC *flow.QuorumCertificate)
func (*Distributor) OnInvalidVoteDetected ¶
func (p *Distributor) OnInvalidVoteDetected(vote *model.Vote)
func (*Distributor) OnProposingBlock ¶
func (p *Distributor) OnProposingBlock(proposal *model.Proposal)
func (*Distributor) OnQcConstructedFromVotes ¶
func (p *Distributor) OnQcConstructedFromVotes(qc *flow.QuorumCertificate)
func (*Distributor) OnQcIncorporated ¶
func (p *Distributor) OnQcIncorporated(qc *flow.QuorumCertificate)
func (*Distributor) OnQcTriggeredViewChange ¶
func (p *Distributor) OnQcTriggeredViewChange(qc *flow.QuorumCertificate, newView uint64)
func (*Distributor) OnReachedTimeout ¶
func (p *Distributor) OnReachedTimeout(timeout *model.TimerInfo)
func (*Distributor) OnReceiveProposal ¶
func (p *Distributor) OnReceiveProposal(currentView uint64, proposal *model.Proposal)
func (*Distributor) OnReceiveVote ¶
func (p *Distributor) OnReceiveVote(currentView uint64, vote *model.Vote)
func (*Distributor) OnStartingTimeout ¶
func (p *Distributor) OnStartingTimeout(timerInfo *model.TimerInfo)
func (*Distributor) OnVoting ¶
func (p *Distributor) OnVoting(vote *model.Vote)
Click to show internal directories.
Click to hide internal directories.