connect

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2015 License: MIT Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL