Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Unsubscribe ¶
func Unsubscribe(sub Subscription)
Unsubscribe unsubribes the given Subscription from its topic.
Types ¶
type HandlerFunc ¶
HandlerFunc is the function being called when receiving an event.
type Subscription ¶
type Subscription struct { Topic string CreatedAt int64 Fn HandlerFunc }
Subscription represents a handler subscribed to a specific topic.
func Subscribe ¶
func Subscribe(topic string, h HandlerFunc) Subscription
Subscribe a HandlerFunc to the given topic. A Subscription is being returned that can be used to unsubscribe from the topic.
Click to show internal directories.
Click to hide internal directories.