Documentation ¶
Index ¶
- type WebServer
- func (webserver *WebServer) AddRoute(routePath string, handler func(http.ResponseWriter, *http.Request), ...) error
- func (webserver *WebServer) ConfigureCors()
- func (webserver *WebServer) SetCustomConfigInfo(customConfig interfaces.UpdatableConfig)
- func (webserver *WebServer) SetupTriggerRoute(path string, handlerForTrigger func(http.ResponseWriter, *http.Request))
- func (webserver *WebServer) StartWebServer(errChannel chan error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebServer ¶
type WebServer struct {
// contains filtered or unexported fields
}
WebServer handles the webserver configuration
func NewWebServer ¶
NewWebServer returns a new instance of *WebServer
func (*WebServer) AddRoute ¶
func (webserver *WebServer) AddRoute(routePath string, handler func(http.ResponseWriter, *http.Request), methods ...string) error
AddRoute enables support to leverage the existing webserver to add routes.
func (*WebServer) ConfigureCors ¶ added in v3.1.0
func (webserver *WebServer) ConfigureCors()
ConfigureCors sets up the middleware for CORS
func (*WebServer) SetCustomConfigInfo ¶
func (webserver *WebServer) SetCustomConfigInfo(customConfig interfaces.UpdatableConfig)
SetCustomConfigInfo sets the custom configurations
func (*WebServer) SetupTriggerRoute ¶
func (webserver *WebServer) SetupTriggerRoute(path string, handlerForTrigger func(http.ResponseWriter, *http.Request))
SetupTriggerRoute adds a route to handle trigger pipeline from REST request
func (*WebServer) StartWebServer ¶
StartWebServer starts the web server
Click to show internal directories.
Click to hide internal directories.