Documentation
¶
Overview ¶
Package httpserver composes application and management HTTP handlers and serves them independently.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewManagement ¶ added in v0.4.0
func NewManagement(routes ManagementRoutes) http.Handler
NewManagement constructs the standard operational route handler.
Types ¶
type Config ¶
type Config struct {
// Application serves application and API traffic.
Application http.Handler
// Management serves operational traffic such as health, readiness, and metrics.
Management http.Handler
// RoutePrefix mounts public routes beneath the deployment prefix; management routes remain unprefixed.
RoutePrefix string
}
Config supplies public and operational routes and the application deployment prefix.
type Handlers ¶
type Handlers struct {
// Application is served on the public listener.
Application http.Handler
// Management is served on the operational listener when configured.
Management http.Handler
}
Handlers contains the assembled application and management handlers.
type ManagementRoutes ¶ added in v0.4.0
type ManagementRoutes struct {
// Health serves process liveness checks at /healthz.
Health http.Handler
// Readiness serves dependency readiness checks at /readyz.
Readiness http.Handler
// Metrics optionally serves metrics exposition at /metrics.
Metrics http.Handler
}
ManagementRoutes contains the operational endpoints served outside application middleware.
Click to show internal directories.
Click to hide internal directories.