events

package
v0.33.18-check-local-c... Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: AGPL-3.0 Imports: 3 Imported by: 6

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 events to a list of subscribers.

func NewDistributor

func NewDistributor() *Distributor

NewDistributor returns a new events distributor.

func (*Distributor) AddConsumer

func (d *Distributor) AddConsumer(consumer protocol.Consumer)

func (*Distributor) BlockFinalized

func (d *Distributor) BlockFinalized(block *flow.Header)

func (*Distributor) BlockProcessable

func (d *Distributor) BlockProcessable(block *flow.Header, certifyingQC *flow.QuorumCertificate)

func (*Distributor) EpochCommittedPhaseStarted

func (d *Distributor) EpochCommittedPhaseStarted(epoch uint64, first *flow.Header)

func (*Distributor) EpochEmergencyFallbackTriggered added in v0.29.0

func (d *Distributor) EpochEmergencyFallbackTriggered()

func (*Distributor) EpochSetupPhaseStarted

func (d *Distributor) EpochSetupPhaseStarted(epoch uint64, first *flow.Header)

func (*Distributor) EpochTransition

func (d *Distributor) EpochTransition(newEpoch uint64, first *flow.Header)

type Heights

type Heights interface {

	// OnHeight registers the callback for the given height.
	OnHeight(height uint64, callback func())
}

Heights enables subscribing to specific heights. The callback is invoked when the given height is finalized.

type Noop

type Noop struct{}

Noop is a no-op implementation of protocol.Consumer.

func NewNoop

func NewNoop() *Noop

func (Noop) ActiveClustersChanged added in v0.31.0

func (n Noop) ActiveClustersChanged(flow.ChainIDList)

func (Noop) BlockFinalized

func (n Noop) BlockFinalized(*flow.Header)

func (Noop) BlockProcessable

func (n Noop) BlockProcessable(*flow.Header, *flow.QuorumCertificate)

func (Noop) EpochCommittedPhaseStarted

func (n Noop) EpochCommittedPhaseStarted(uint64, *flow.Header)

func (Noop) EpochEmergencyFallbackTriggered added in v0.29.0

func (n Noop) EpochEmergencyFallbackTriggered()

func (Noop) EpochSetupPhaseStarted

func (n Noop) EpochSetupPhaseStarted(uint64, *flow.Header)

func (Noop) EpochTransition

func (n Noop) EpochTransition(uint64, *flow.Header)

type OnViewCallback added in v0.20.0

type OnViewCallback func(*flow.Header)

OnViewCallback is the type of callback triggered by view events.

type Views added in v0.20.0

type Views interface {
	// OnView registers the callback for the given view.
	OnView(view uint64, callback OnViewCallback)
}

Views enables subscribing to specific views. The callback is invoked when the first block of the given view is finalized.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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