websocket

package
v0.0.0-...-3a56a5c Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(router *mux.Router)

Start starts the socket

Types

type NotificationType

type NotificationType string

NotificationType use to switch over different types of notifications.

const (
	// EncoderState represents an event for an encoder changing state.
	EncoderState NotificationType = "encoderState"
	// CaptionerState represents an event for an captioner changing state.
	CaptionerState NotificationType = "captionerState"
	// NetworkState represents an event for a network changing state
	NetworkState NotificationType = "networkState"
)

type SocketMessage

type SocketMessage struct {
	Reference *int
	Payload   interface{}
}

SocketMessage A message to be emitted over all open websockets

func (SocketMessage) Send

func (message SocketMessage) Send()

Send emits the receiver as a message across all websocket connections.

Jump to

Keyboard shortcuts

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