A GracefulServer maintains a WaitGroup that counts how many in-flight requests the server is handling. When it receives a shutdown signal, it stops accepting new requests but does not actually shut down until all in-flight requests terminate.

GracefulServer embeds the underlying net/http.Server making its non-override methods and properties avaiable.

It must be initialized by calling NewWithServer.

GracefulServer is referenced in 1 repository