Documentation ¶
Index ¶
- type EventBus
- func (b *EventBus) NumClientSubscriptions(clientID string) int
- func (b *EventBus) NumClients() int
- func (b *EventBus) Observe(ctx context.Context, observe func(tmpubsub.Message) error, ...) error
- func (b *EventBus) OnStart(ctx context.Context) error
- func (b *EventBus) OnStop()
- func (b *EventBus) Publish(eventValue string, eventData types.EventData) error
- func (b *EventBus) PublishEventBlockSyncStatus(data types.EventDataBlockSyncStatus) error
- func (b *EventBus) PublishEventCompleteProposal(data types.EventDataCompleteProposal) error
- func (b *EventBus) PublishEventEvidenceValidated(evidence types.EventDataEvidenceValidated) error
- func (b *EventBus) PublishEventLock(data types.EventDataRoundState) error
- func (b *EventBus) PublishEventNewBlock(data types.EventDataNewBlock) error
- func (b *EventBus) PublishEventNewBlockHeader(data types.EventDataNewBlockHeader) error
- func (b *EventBus) PublishEventNewEvidence(evidence types.EventDataNewEvidence) error
- func (b *EventBus) PublishEventNewRound(data types.EventDataNewRound) error
- func (b *EventBus) PublishEventNewRoundStep(data types.EventDataRoundState) error
- func (b *EventBus) PublishEventPolka(data types.EventDataRoundState) error
- func (b *EventBus) PublishEventRelock(data types.EventDataRoundState) error
- func (b *EventBus) PublishEventStateSyncStatus(data types.EventDataStateSyncStatus) error
- func (b *EventBus) PublishEventTimeoutPropose(data types.EventDataRoundState) error
- func (b *EventBus) PublishEventTimeoutWait(data types.EventDataRoundState) error
- func (b *EventBus) PublishEventTx(data types.EventDataTx) error
- func (b *EventBus) PublishEventValidBlock(data types.EventDataRoundState) error
- func (b *EventBus) PublishEventValidatorSetUpdates(data types.EventDataValidatorSetUpdates) error
- func (b *EventBus) PublishEventVote(data types.EventDataVote) error
- func (b *EventBus) SubscribeWithArgs(ctx context.Context, args tmpubsub.SubscribeArgs) (Subscription, error)
- func (b *EventBus) Unsubscribe(ctx context.Context, args tmpubsub.UnsubscribeArgs) error
- func (b *EventBus) UnsubscribeAll(ctx context.Context, subscriber string) error
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventBus ¶
type EventBus struct { service.BaseService // contains filtered or unexported fields }
EventBus is a common bus for all events going through the system. It is a type-aware wrapper around an underlying pubsub server. All events should be published via the bus.
func NewDefault ¶
NewDefault returns a new event bus with default options.
func (*EventBus) NumClientSubscriptions ¶
func (*EventBus) NumClients ¶
func (*EventBus) PublishEventBlockSyncStatus ¶
func (b *EventBus) PublishEventBlockSyncStatus(data types.EventDataBlockSyncStatus) error
func (*EventBus) PublishEventCompleteProposal ¶
func (b *EventBus) PublishEventCompleteProposal(data types.EventDataCompleteProposal) error
func (*EventBus) PublishEventEvidenceValidated ¶
func (b *EventBus) PublishEventEvidenceValidated(evidence types.EventDataEvidenceValidated) error
func (*EventBus) PublishEventLock ¶
func (b *EventBus) PublishEventLock(data types.EventDataRoundState) error
func (*EventBus) PublishEventNewBlock ¶
func (b *EventBus) PublishEventNewBlock(data types.EventDataNewBlock) error
func (*EventBus) PublishEventNewBlockHeader ¶
func (b *EventBus) PublishEventNewBlockHeader(data types.EventDataNewBlockHeader) error
func (*EventBus) PublishEventNewEvidence ¶
func (b *EventBus) PublishEventNewEvidence(evidence types.EventDataNewEvidence) error
func (*EventBus) PublishEventNewRound ¶
func (b *EventBus) PublishEventNewRound(data types.EventDataNewRound) error
func (*EventBus) PublishEventNewRoundStep ¶
func (b *EventBus) PublishEventNewRoundStep(data types.EventDataRoundState) error
func (*EventBus) PublishEventPolka ¶
func (b *EventBus) PublishEventPolka(data types.EventDataRoundState) error
func (*EventBus) PublishEventRelock ¶
func (b *EventBus) PublishEventRelock(data types.EventDataRoundState) error
func (*EventBus) PublishEventStateSyncStatus ¶
func (b *EventBus) PublishEventStateSyncStatus(data types.EventDataStateSyncStatus) error
func (*EventBus) PublishEventTimeoutPropose ¶
func (b *EventBus) PublishEventTimeoutPropose(data types.EventDataRoundState) error
func (*EventBus) PublishEventTimeoutWait ¶
func (b *EventBus) PublishEventTimeoutWait(data types.EventDataRoundState) error
func (*EventBus) PublishEventTx ¶
func (b *EventBus) PublishEventTx(data types.EventDataTx) error
PublishEventTx publishes tx event with events from Result. Note it will add predefined keys (EventTypeKey, TxHashKey). Existing events with the same keys will be overwritten.
func (*EventBus) PublishEventValidBlock ¶
func (b *EventBus) PublishEventValidBlock(data types.EventDataRoundState) error
func (*EventBus) PublishEventValidatorSetUpdates ¶
func (b *EventBus) PublishEventValidatorSetUpdates(data types.EventDataValidatorSetUpdates) error
func (*EventBus) PublishEventVote ¶
func (b *EventBus) PublishEventVote(data types.EventDataVote) error
func (*EventBus) SubscribeWithArgs ¶
func (b *EventBus) SubscribeWithArgs(ctx context.Context, args tmpubsub.SubscribeArgs) (Subscription, error)
func (*EventBus) Unsubscribe ¶
Click to show internal directories.
Click to hide internal directories.