Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // ListenAddress is where the server will be listening. // By default will listen on :8080. ListenAddress string // DrainTimeout is the draining timeout, by default is 2 seconds. DrainTimeout time.Duration // Handler is the handler that will serve the server. Handler http.Handler // Logger is the logger used by the server. Logger log.Logger }
Config is the server configuration.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a Server that serves a handler.
func (*Server) DrainAndShutdown ¶
DrainAndShutdown will drain the connections and shutdown the server.
func (*Server) ListenAndServe ¶
ListenAndServe runs the server.
Click to show internal directories.
Click to hide internal directories.