Documentation ¶
Index ¶
- type Distributor
- func (d *Distributor) AddConsumer(consumer protocol.Consumer)
- func (d *Distributor) BlockFinalized(block *flow.Header)
- func (d *Distributor) BlockProcessable(block *flow.Header, certifyingQC *flow.QuorumCertificate)
- func (d *Distributor) EpochCommittedPhaseStarted(epoch uint64, first *flow.Header)
- func (d *Distributor) EpochEmergencyFallbackTriggered()
- func (d *Distributor) EpochSetupPhaseStarted(epoch uint64, first *flow.Header)
- func (d *Distributor) EpochTransition(newEpoch uint64, first *flow.Header)
- type EventLogger
- type Heights
- type Noop
- func (n Noop) ActiveClustersChanged(flow.ChainIDList)
- func (n Noop) BlockFinalized(*flow.Header)
- func (n Noop) BlockProcessable(*flow.Header, *flow.QuorumCertificate)
- func (n Noop) EpochCommittedPhaseStarted(uint64, *flow.Header)
- func (n Noop) EpochEmergencyFallbackTriggered()
- func (n Noop) EpochSetupPhaseStarted(uint64, *flow.Header)
- func (n Noop) EpochTransition(uint64, *flow.Header)
- type OnViewCallback
- type Views
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 implements the `protocol.Consumer` interface for ingesting notifications emitted by the protocol state. It distributes the notifications to all registered consumers.
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 EventLogger ¶ added in v0.35.17
type EventLogger struct { Noop // satisfy protocol events consumer interface // contains filtered or unexported fields }
func NewEventLogger ¶ added in v0.35.17
func NewEventLogger(logger zerolog.Logger) *EventLogger
func (EventLogger) EpochCommittedPhaseStarted ¶ added in v0.35.17
func (p EventLogger) EpochCommittedPhaseStarted(currentEpochCounter uint64, header *flow.Header)
func (EventLogger) EpochSetupPhaseStarted ¶ added in v0.35.17
func (p EventLogger) EpochSetupPhaseStarted(currentEpochCounter uint64, header *flow.Header)
func (EventLogger) EpochTransition ¶ added in v0.35.17
func (p EventLogger) EpochTransition(newEpochCounter uint64, header *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 (Noop) ActiveClustersChanged ¶ added in v0.31.0
func (n Noop) ActiveClustersChanged(flow.ChainIDList)
func (Noop) BlockFinalized ¶
func (Noop) BlockProcessable ¶
func (n Noop) BlockProcessable(*flow.Header, *flow.QuorumCertificate)
func (Noop) EpochCommittedPhaseStarted ¶
func (Noop) EpochEmergencyFallbackTriggered ¶ added in v0.29.0
func (n Noop) EpochEmergencyFallbackTriggered()
type OnViewCallback ¶ added in v0.20.0
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.
Click to show internal directories.
Click to hide internal directories.