Documentation
¶
Overview ¶
Package httpserver runs an HTTP service with the probes, metrics, tracing, request logging and graceful shutdown every LabFlow service needs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Addr string
// ShutdownDelay keeps serving, with readiness failing, so load balancers
// stop routing before connections drain.
ShutdownDelay time.Duration
ShutdownTimeout time.Duration
// Public marks an internet-facing service: an inbound traceparent becomes
// a span link instead of the parent, so clients cannot choose trace IDs.
Public bool
}
Config holds the listener and shutdown settings.
func ConfigFromEnv ¶
ConfigFromEnv reads HTTP_ADDR, SHUTDOWN_DELAY and SHUTDOWN_TIMEOUT.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves app behind /healthz, /readyz and /metrics.
Click to show internal directories.
Click to hide internal directories.