Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher func(Event, SubscriberFn) error
Dispatcher dispatches an event to a subscriber function. Usually, it converts the event and subscriber from generic to specific types and then calls the specific subscriber function with the specific event information
type PubSub ¶
type PubSub struct {
// contains filtered or unexported fields
}
PubSub is a simple emitter of data transfer events
func (*PubSub) Subscribe ¶
func (ps *PubSub) Subscribe(subscriberFn SubscriberFn) Unsubscribe
Subscribe adds the given subscriber to the list of subscribers for this Pubsub
type SubscriberFn ¶
type SubscriberFn interface{}
SubscriberFn is a function that receives events from a dispatcher
type Unsubscribe ¶
type Unsubscribe func()
Unsubscribe is a function returned from subscribe that can be used to terminate the subscription
Click to show internal directories.
Click to hide internal directories.