Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCouldNotMarshalEvent = errors.New("could not marshal event")
ErrCouldNotMarshalEvent is when an event could not be marshaled into BSON.
View Source
var ErrCouldNotUnmarshalEvent = errors.New("could not unmarshal event")
ErrCouldNotUnmarshalEvent is when an event could not be unmarshaled into a concrete type.
Functions ¶
This section is empty.
Types ¶
type EventPublisher ¶
type EventPublisher struct { *local.EventPublisher // contains filtered or unexported fields }
EventPublisher is an event bus that notifies registered EventHandlers of published events. It will use the SimpleEventHandlingStrategy by default.
func NewEventPublisher ¶
func NewEventPublisher(projectID, appID string) (*EventPublisher, error)
NewEventPublisher creates a EventPublisher.
func (*EventPublisher) Close ¶
func (b *EventPublisher) Close() error
Close exits the receive goroutine by unsubscribing to all channels.
func (*EventPublisher) Errors ¶
func (b *EventPublisher) Errors() <-chan Error
Errors returns an error channel where async handling errors are sent.
func (*EventPublisher) HandleEvent ¶
HandleEvent implements the HandleEvent method of the eventhorizon.EventPublisher interface.
Click to show internal directories.
Click to hide internal directories.