Documentation
¶
Overview ¶
Graceful shutdown of an HTTP server.
Run starts the scope, waits for SIGINT/SIGTERM or a Shutdown call, then stops everything in reverse order with a bounded context. The server's OnDrain calls http.Server.Shutdown, which stops accepting connections and waits for in-flight requests until the stop context expires. Draining runs before anything is torn down, so those requests still have their scopes.
Click to show internal directories.
Click to hide internal directories.