Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
ListenAndServe is like Serve but it first creates a listen socket for srv.Addr and serves on that. Along with the error conditions for Serve, ListenAndServe may also return an error if listening fails.
func ListenAndServeTLS ¶
ListenAndServeTLS is like ServeTLS but it first creates a listen socket for srv.Addr and serves on that. Along with the error conditions for Serve, ListenAndServe may also return an error if listening fails. certFile and keyFile have the same meaning as for http.ListenAndServeTLS.
func Serve ¶
Serve returns a process implementation that serves the given HTTP server on the given listener until the process context is cancelled or hits its deadline.
Once the context is done, it will instruct the server to shut down and return only after shutdown has completed.
The Handler field in srv is replaced with a wrapper that attaches the process context to the request.
The process will fail (return an error) if listening fails or if shutdown fails. A successful shutdown is not an error.
Types ¶
This section is empty.