Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPServer ¶
HTTPServer wraps an http.Server to listen asynchronously and allow stopping it.
func NewHTTPServer ¶
func NewHTTPServer(s *http.Server) *HTTPServer
NewHTTPServer wraps the given http.Server into an HTTPServer.
func (*HTTPServer) ListenAndServe ¶
func (h *HTTPServer) ListenAndServe() error
ListenAndServe starts the given HTTP server up in the background and returns immediately. The server listens on the configured Addr or ":http" if unconfigured.
An error is returned if the server failed to start up, if the server was already listening, or if the server was stopped with Stop().
func (*HTTPServer) Listener ¶
func (h *HTTPServer) Listener() net.Listener
Listener returns the listener for this server or nil if the server isn't yet listening.
Click to show internal directories.
Click to hide internal directories.