Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
Bus intemediates publishers and subscribers via an event interface.
func (*Bus) Subscribe ¶
func (b *Bus) Subscribe(t Type, f Subscriber) func()
Subscribe to all events of a type. Returns an Unsubscribe function.
type Subscriber ¶
type Subscriber func(Typer)
Subscriber is anything that is subscribed to an event type.
Click to show internal directories.
Click to hide internal directories.