channel

package
Version: v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2014 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(name string)

func Create

func Create(name string) string

Create will generate a token and create a new channel over which messages will be sent.

func CreateStream

func CreateStream(name string) string

CreateStream will generate a token and create a new channel over which messages streams (ie build output) are sent.

func Read

func Read(ws *websocket.Conn)

func Send

func Send(name string, message string) error

Send sends a message on the named channel.

func SendBytes

func SendBytes(name string, value []byte) error

SendBytes send a message in byte format on the named channel.

func SendJSON

func SendJSON(name string, value interface{}) error

SendJSON sends a JSON-encoded value on the named channel.

func Token

func Token(name string) string

Token will generate a token, but will not create a new channel.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL