Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultShutdownTimeout is the default ShutdownTimeout (see Config) DefaultShutdownTimeout = time.Second * 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Name is the name of the server. It is only used for logging. It can // be empty. Name string // Address is the address to bind the server to. It must be set. Address string // Handler is the HTTP handler to be served. It must be set. Handler http.Handler // TLSConfig is the TLS configuration for the server. It is optional. TLSConfig *tls.Config // ShutdownTimeout controls how long to wait for requests to finish before // returning from Run() after the context is canceled. It defaults to // 10 seconds if unset. If set to a negative value, the server will be // closed immediately. ShutdownTimeout time.Duration }
Config holds the HTTP server configuration
Click to show internal directories.
Click to hide internal directories.