webserver

package
v1.0.0-dev.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version added in v1.0.0

type Version struct {
	Version    string `json:"version"`
	SDKVersion string `json:"sdk_version"`
}

swagger:model

type WebServer

type WebServer struct {
	Config        *common.ConfigurationStruct
	LoggingClient logger.LoggingClient
	// contains filtered or unexported fields
}

WebServer handles the webserver configuration

func NewWebServer added in v1.0.0

func NewWebServer(config *common.ConfigurationStruct, lc logger.LoggingClient, router *mux.Router) *WebServer

NewWebserver returns a new instance of *WebServer

func (*WebServer) AddRoute added in v1.0.0

func (webserver *WebServer) AddRoute(route string, handler func(http.ResponseWriter, *http.Request), methods ...string)

AddRoute enables support to leverage the existing webserver to add routes.

func (*WebServer) ConfigureStandardRoutes

func (webserver *WebServer) ConfigureStandardRoutes()

ConfigureStandardRoutes loads up some default routes

func (*WebServer) SetupTriggerRoute

func (webserver *WebServer) SetupTriggerRoute(handlerForTrigger func(http.ResponseWriter, *http.Request))

SetupTriggerRoute adds a route to handle trigger pipeline from HTTP request swagger:operation POST /trigger Trigger Trigger

Trigger

Available when HTTPTrigger is specified as the binding in configuration. This API provides a way to initiate and start processing the defined pipeline using the data submitted.

--- produces: - application/json consumes: - application/json parameters:

Responses:

'200':
  description: Get current version
  schema:
    "$ref": "#/definitions/Version"

func (*WebServer) StartHTTPServer

func (webserver *WebServer) StartHTTPServer(errChannel chan error)

StartHTTPServer starts the http server

Jump to

Keyboard shortcuts

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