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 AddressGetter ¶
type AddressGetter interface {
GetAddress() (address string)
}
AddressGetter obtains the address the HTTP server is listening on.
type Interface ¶
type Interface interface { Runner AddressGetter }
Interface is the HTTP server interface
type Option ¶
type Option func(s *optionalSettings)
Option is a functional option for the HTTP server.
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.
Click to show internal directories.
Click to hide internal directories.