Documentation ¶
Index ¶
Constants ¶
View Source
const ( // WebsocketInstructionAck Code used to acknowledge a previous message WebsocketInstructionAck websocketInstruction = 0 // WebsocketInstructionHello Code used to send a healthcheck keepalive WebsocketInstructionHello websocketInstruction = 1 // WebsocketInstructionTriggerUpdate Code received to trigger a config update WebsocketInstructionTriggerUpdate websocketInstruction = 2 )
View Source
const ConfigErrorReportingEnabled = "error_reporting_enabled"
View Source
const ConfigErrorReportingEnvironment = "error_reporting_environment"
View Source
const ConfigLogLevel = "log_level"
Variables ¶
This section is empty.
Functions ¶
func LoggingHandler ¶
LoggingHandler provides an http.Handler which logs requests to the HTTP server
func SetUserAgent ¶
func SetUserAgent(inner http.RoundTripper, userAgent string) http.RoundTripper
Types ¶
type APIController ¶
type APIController struct {
// contains filtered or unexported fields
}
APIController main controller which connects to the authentik api via http and ws
func NewAPIController ¶
func NewAPIController(pbURL url.URL, token string) *APIController
NewAPIController initialise new API Controller instance from URL and API token
func (*APIController) Shutdown ¶
func (ac *APIController) Shutdown()
Shutdown Gracefully stops all workers, disconnects from websocket
func (*APIController) Start ¶
func (a *APIController) Start() error
Start Starts all handlers, non-blocking
func (*APIController) UpdateIfRequired ¶
func (a *APIController) UpdateIfRequired() error
UpdateIfRequired Updates the HTTP Server config if required, automatically swaps the handlers
type Server ¶
type Server struct { Handlers map[string]*providerBundle // contains filtered or unexported fields }
Server represents an HTTP server
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP()
ServeHTTP constructs a net.Listener and starts handling HTTP requests
func (*Server) ServeHTTPS ¶
func (s *Server) ServeHTTPS()
ServeHTTPS constructs a net.Listener and starts handling HTTPS requests
Click to show internal directories.
Click to hide internal directories.