Go for DevOps
You're viewing a free preview. Sign in free to read every script.
Why this exists Any service you run in Kubernetes or behind a load balancer needs the same skeleton: health endpoints, logging, timeouts, and the ability to finish in flight requests when told to stop. Go's standard…
A Small HTTP Service with Health Endpoints, Metrics and Graceful Shutdown
A production-shaped service in the standard library: routing, request logging middleware with slog, liveness and readiness endpoints, a simple metrics page, server timeouts, and shutting down cleanly on SIGTERM so Kubernetes rollouts do not drop requests.
Sign in free to read this script, along with the rest of the library.
Sign in free