Documentation ¶
Overview ¶
Package httpserver implements an HTTP server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(s *optionalSettings)
Option is a functional option for the HTTP server.
func ReadHeaderTimeout ¶
ReadHeaderTimeout sets the header read timeout for the HTTP server. The default timeout is 1 second.
func ReadTimeout ¶
ReadTimeout sets the read timeout for the HTTP server. The default timeout is 10 seconds.
func ShutdownTimeout ¶
ShutdownTimeout sets an optional timeout for the HTTP server to shutdown. The default shutdown is 3 seconds.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an HTTP server implementation, which uses the HTTP handler provided.
func New ¶
New creates a new HTTP server with a name, listening on the address specified and using the HTTP handler provided.
func (*Server) GetAddress ¶
GetAddress obtains the address the HTTP server is listening on.