hub

package
v0.0.0-...-1e78b31 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Remove

func Remove(channel, ID string)

func Send

func Send(channel string, message *Message) (err error)

Types

type Message

type Message struct {
	Type    MessageType
	Payload interface{}
}

type MessageType

type MessageType uint8
const (
	MessageTypeNotification MessageType = iota
	MessageTypeError
	MessageTypeSuccess
	MessageTypeNewChannel
)

type WSClient

type WSClient struct {
	ID      string
	Channel string
	Conn    *websocket.Conn
}

func Add

func Add(ID, channel string, conn *websocket.Conn) *WSClient

Jump to

Keyboard shortcuts

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