pubsub

package
v0.14.9-error-printing Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: AGPL-3.0 Imports: 4 Imported by: 10

Documentation

Index

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)

Jump to

Keyboard shortcuts

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