Documentation ¶
Index ¶
- type Version
- type WebServer
- func (webserver *WebServer) AddRoute(route string, handler func(http.ResponseWriter, *http.Request), ...)
- func (webserver *WebServer) ConfigureStandardRoutes()
- func (webserver *WebServer) SetupTriggerRoute(handlerForTrigger func(http.ResponseWriter, *http.Request))
- func (webserver *WebServer) StartHTTPServer(errChannel chan error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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:
- in: body name: Data Event description: | This is the data that will processed the configured pipeline. Typically this is an EdgeX event as described below, however, it can ingest other forms of data if a custom Target Type (https://github.com/edgexfoundry/app-functions-sdk-go/blob/master/README.md#target-type) is being used. required: true schema: "$ref": "#/definitions/Event"
Responses:
'200': description: Get current version schema: "$ref": "#/definitions/Version"
func (*WebServer) StartHTTPServer ¶
StartHTTPServer starts the http server