Documentation ¶
Index ¶
Constants ¶
View Source
const ServerShutdownTimeout = 60 * time.Second
ServerShutdownTimeout is the default time to wait before closing connections on shutdown.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server is a incomplete component that implements a basic HTTP/HTTPS server.
func New ¶
New creates a new HTTP/HTTPS server configured with the passed address, http.Handler and tls.Config.
func (*Server) Forbidden ¶
func (srv *Server) Forbidden(w http.ResponseWriter)
Forbidden writes on the http.ResponseWriter a text/plain forbidden response.
func (*Server) ListenAndServe ¶
ListenAndServe listens on the TCP network address srv.Addr and then calls Serve to handle requests on incoming connections.
func (*Server) Reload ¶
Reload reloads the current server with the configuration of the passed server.
Click to show internal directories.
Click to hide internal directories.