appContext

package
v0.0.0-...-703a8e5 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2016 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerContext

type ServerContext struct {
	persistence.UserRepository
	routing.Switchboard
}

ServerContext maintains the map of controller IDs and their corresponding channels linked to the active websocket

func NewServerContext

func NewServerContext(persistenceBackend persistence.Backend) *ServerContext

NewServerContext returns a pointer to a new instance

func (*ServerContext) HTTPConn

func (sCtx *ServerContext) HTTPConn(w http.ResponseWriter, r *http.Request)

HTTPConn receives requests via http and routes them to the correct Raspberry Pi websocket connection

func (*ServerContext) WebsocketConn

func (sCtx *ServerContext) WebsocketConn(ws *websocket.Conn)

WebsocketConn manages websocket connections coming from the Raspberry Pis and user devices

Jump to

Keyboard shortcuts

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