Documentation ¶
Overview ¶
Package events - Pub-Sub in go with event caching
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventCallback ¶
type EventData ¶
type EventData interface{}
EventData is a generic event data can be typed and registered with tendermint/go-amino via concrete implementation of this interface.
type EventSwitch ¶
type EventSwitch interface { Fireable AddListenerForEvent(listenerID, eventValue string, cb EventCallback) error }
EventSwitch is the interface for synchronous pubsub, where listeners subscribe to certain events and, when an event is fired (see Fireable), notified via a callback function.
Listeners are added by calling AddListenerForEvent function. They can be removed by calling either RemoveListenerForEvent or RemoveListener (for all events).
func NewEventSwitch ¶
func NewEventSwitch() EventSwitch
type Eventable ¶
type Eventable interface {
SetEventSwitch(evsw EventSwitch)
}
Eventable is the interface reactors and other modules must export to become eventable.
Click to show internal directories.
Click to hide internal directories.