Documentation ¶
Index ¶
- 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) *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
func (*WebServer) StartHTTPServer ¶
StartHTTPServer starts the http server
Click to show internal directories.
Click to hide internal directories.