http

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2013 License: AGPL-3.0, AGPL-3.0-or-later Imports: 11 Imported by: 2

Documentation

Overview

Package http implements the HTTP interface for GoDrone.

It currently handles serving the HTML UI and related assets, as well as WebSocket clients.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.1.0

type Config struct {
	Control        *control.Control
	Log            log.Interface
	Version        string
	ControlTimeout time.Duration
	MaxAngle       int
}

Config holds the arguments required to create a Handler.

type Handler added in v0.1.0

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

Handler provides a http.Handler.

func NewHandler

func NewHandler(c Config) *Handler

NewHandler returns a new handler.

func (*Handler) ServeHTTP added in v0.1.0

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements the http.Handler interface. It acts as a router dispatching websocket / asset requests.

func (*Handler) Update added in v0.1.0

func (h *Handler) Update(n navboard.Data, a attitude.Attitude)

Update informs all connected clients about new navboard.Data and attitude.Data.

Directories

Path Synopsis
Package fs holds the assets for the HTML UI.
Package fs holds the assets for the HTML UI.

Jump to

Keyboard shortcuts

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