Documentation ¶
Overview ¶
Package hub provides a simple event dispatcher for publish/subscribe pattern.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub is an event dispatcher, publishes events to the subscribers which are subscribed for a specific event type. Optimized for publish calls. The handlers may be called in order different than they are registered.
var DefaultHub Hub
DefaultHub is the default Hub used by Publish and Subscribe.
Click to show internal directories.
Click to hide internal directories.