Documentation ¶
Index ¶
- Constants
- type APIServerState
- func (server *APIServerState) APIHandleFuncs() (routes []*rest.Route)
- func (server *APIServerState) APIHandleGetGraph(w rest.ResponseWriter, req *rest.Request)
- func (server *APIServerState) APIHandleNewDataset(w rest.ResponseWriter, req *rest.Request)
- func (server *APIServerState) APIHandleNewTransform(w rest.ResponseWriter, req *rest.Request)
- func (server *APIServerState) APIHandleUpdateTransform(w rest.ResponseWriter, req *rest.Request)
- func (server *APIServerState) Close()
- func (server *APIServerState) Start() (errChan chan error)
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
Click to show internal directories.
Click to hide internal directories.