api

package
v0.0.0-...-c51984e Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2014 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

View Source
const (
	APILOGTAG     = "API"
	GRAPHROOT     = "/graph"
	TRANSFORMROOT = "/transform"
	DATASETROOT   = "/dataset"
)
View Source
const (
	LOGTAG                   = "API-Server"
	DEFAULT_API_PORT         = 8080
	SERVER_CLOSE_PANIC_ERROR = "Closing webserver, ignore panic"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServerState

type APIServerState struct {
	Port int

	Store           persist.PersistStorage
	ResourceHandler rest.ResourceHandler
	// contains filtered or unexported fields
}

func New

func New(port int, store persist.PersistStorage) *APIServerState

func (*APIServerState) APIHandleFuncs

func (server *APIServerState) APIHandleFuncs() (routes []*rest.Route)

func (*APIServerState) APIHandleGetGraph

func (server *APIServerState) APIHandleGetGraph(w rest.ResponseWriter, req *rest.Request)

func (*APIServerState) APIHandleNewDataset

func (server *APIServerState) APIHandleNewDataset(w rest.ResponseWriter, req *rest.Request)

func (*APIServerState) APIHandleNewTransform

func (server *APIServerState) APIHandleNewTransform(w rest.ResponseWriter, req *rest.Request)

func (*APIServerState) APIHandleUpdateTransform

func (server *APIServerState) APIHandleUpdateTransform(w rest.ResponseWriter, req *rest.Request)

func (*APIServerState) Close

func (server *APIServerState) Close()

Used to halt server due to non-trivial gracefull server stopping

func (*APIServerState) Start

func (server *APIServerState) Start() (errChan chan error)

Start api server with ability to shutdown

Jump to

Keyboard shortcuts

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