Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackPool ¶
type CallbackPool struct {
// contains filtered or unexported fields
}
func (*CallbackPool) Add ¶
func (cp *CallbackPool) Add(callback *func(Event))
Pushes a new callback into the array of listeners for the pool.
func (*CallbackPool) Remove ¶
func (cp *CallbackPool) Remove(callback *func(Event))
Removes a callback from the array of registered callbacks if it exists.
type EventBus ¶
type EventBus struct {
// contains filtered or unexported fields
}
func (*EventBus) Destroy ¶
func (e *EventBus) Destroy()
Destroy removes all the event listeners that have been registered for any topic. Also stops the worker pool to close that routine.
func (*EventBus) On ¶
On adds a callback function that will be executed each time one of the events using the topic name is called.
func (*EventBus) PublishJson ¶
PublishJson publishes a JSON message to a given topic.
Click to show internal directories.
Click to hide internal directories.