Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface {
Disconnect()
Subscribe(topic string) error
Unsubscribe(topic string)
Receiver() chan *Message
Send(topic string, data interface{}) error
}
interface Client manages a single connection to the router. You can create a single client that has multiple subscriptions if you want to deal with resolving the route, or you could create a client per subscription if you want to listen to multiple channels. Note that subscribing and unsubscribing on a client is not thread safe.
Click to show internal directories.
Click to hide internal directories.