Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { Done chan struct{} // contains filtered or unexported fields }
Connection represents an open connection to the hub.
func NewConnection ¶
func NewConnection(name string) (*Connection, error)
NewConnection connects to the hub and registers this pack.
func (*Connection) Listen ¶
func (c *Connection) Listen(pat string, cb func(key string, val interface{}))
Listen to a topic (may have wildcards) and call the provided callback
func (*Connection) Send ¶
func (c *Connection) Send(key string, val interface{})
Send a key/value message to the hub.
Click to show internal directories.
Click to hide internal directories.