Documentation
¶
Overview ¶
package http handles serving HTTP(s) requests, HTTP middleware, and defines common handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigHTTP ¶
ConfigHTTP is the configuration for the http server.
func (*ConfigHTTP) ServeHTTP ¶
func (c *ConfigHTTP) ServeHTTP(ctx context.Context, addr string, handlers HandlerMapping) error
ServeHTTP sets up all the HTTP routes using a stdlib mux and starts the http server, which will block. App functionality is instrumented in Prometheus and OpenTelemetry.
type ConfigHTTPS ¶
type ConfigHTTPS struct {
Logger logr.Logger
TrustedProxies []string
TLSCerts []tls.Certificate
}
ConfigHTTPS is the configuration for the HTTPS server.
func (*ConfigHTTPS) ServeHTTPS ¶
func (c *ConfigHTTPS) ServeHTTPS(ctx context.Context, addrPort string, handlers HandlerMapping) error
ServeHTTPS sets up all the HTTP routes using a stdlib mux and starts the https server, which will block. App functionality is instrumented in Prometheus and OpenTelemetry.
type HandlerMapping ¶
type HandlerMapping map[string]http.HandlerFunc
HandlerMapping is a map of routes to http.HandlerFuncs.
type HealthCheck ¶
func (HealthCheck) HandlerFunc ¶
func (h HealthCheck) HandlerFunc(log logr.Logger) http.HandlerFunc
Click to show internal directories.
Click to hide internal directories.