webserver

package
v0.0.0-...-76dc376 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2015 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VersionEndpoint

func VersionEndpoint(version string) func(w http.ResponseWriter, r *http.Request)

VersionEndpoint is the endpoint providing the version of this piece of software

Types

type Autopilot

type Autopilot struct {
	Enabled       bool    `json:"enabled"`
	HeadingOffset float64 `json:"headingOffset"`
	SetPoint      float64 `json:"setPoint"`
	Course        float64 `json:"course"`
	Speed         float64 `json:"speed"`
}

Autopilot is the serializable structure used to get the autopilot state

type Control

type Control struct {
	Enabled       bool    `json:"enabled"`
	HeadingOffset float64 `json:"headingOffset"`
}

Control is the serializable structure used to change the autopilot state

type Webserver

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

Webserver is a web server component exposing both static files (static/) and the api (api/)

func New

func New(version string) *Webserver

New creates a new Webserver

func (*Webserver) SetDashboard

func (ws *Webserver) SetDashboard(dashboard queryable)

SetDashboard sets the Dashboard where the Webserver will get the LED state from

func (*Webserver) SetPanicChan

func (ws *Webserver) SetPanicChan(panicChan chan interface{})

SetPanicChan sets the channel where panics are sent

func (*Webserver) SetPilot

func (ws *Webserver) SetPilot(p pilotable)

SetPilot sets the Pilot used by the Webserver

func (*Webserver) SetTracer

func (ws *Webserver) SetTracer(p tracer)

SetTracer sets the Tracer used by the Webserver

func (*Webserver) Start

func (ws *Webserver) Start()

Start the webserver (non-blocking)

Jump to

Keyboard shortcuts

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