clients

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2017 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCP

type TCP struct {
	// contains filtered or unexported fields
}

TCP represents a TCP connection to the mist server

func New

func New(host, authtoken string) (*TCP, error)

New attempts to connect to a running mist server at the clients specified host and port.

func (*TCP) Close

func (c *TCP) Close()

Close closes the client data channel and the connection to the server

func (*TCP) List

func (c *TCP) List() error

List requests a list from the server of the tags this client is subscribed to

func (*TCP) ListAll added in v1.1.1

func (c *TCP) ListAll() error

listall related List requests a list from the server of the tags this client is subscribed to

func (*TCP) Messages

func (c *TCP) Messages() <-chan mist.Message

Messages ...

func (*TCP) Ping

func (c *TCP) Ping() error

Ping the server

func (*TCP) Publish

func (c *TCP) Publish(tags []string, data string) error

Publish sends a message to the mist server to be published to all subscribed clients

func (*TCP) PublishAfter

func (c *TCP) PublishAfter(tags []string, data string, delay time.Duration) error

PublishAfter sends a message to the mist server to be published to all subscribed clients after a specified delay

func (*TCP) Subscribe

func (c *TCP) Subscribe(tags []string) error

Subscribe takes the specified tags and tells the server to subscribe to updates on those tags, returning the tags and an error or nil

func (*TCP) Unsubscribe

func (c *TCP) Unsubscribe(tags []string) error

Unsubscribe takes the specified tags and tells the server to unsubscribe from updates on those tags, returning an error or nil

func (*TCP) Who added in v1.1.1

func (c *TCP) Who() error

who related Who requests connection/subscriber stats from the server

Jump to

Keyboard shortcuts

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