Documentation ¶ Index ¶ func ServeWithTimeout(ctx context.Context, timeout time.Duration, srv *http.Server) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func ServeWithTimeout ¶ func ServeWithTimeout(ctx context.Context, timeout time.Duration, srv *http.Server) ServeWithTimeout is a wrapper around http.Server that gracefully shuts down the server when a SIGINT/SIGTERM is received OR the provided context is canceled. Types ¶ This section is empty. Source Files ¶ View all Source files graceful.go Click to show internal directories. Click to hide internal directories.