Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a http server. Can be started with Start method. Gracefully stops when context is canceled. Must be initialized with New function.
func New ¶
New initializes and returns a new Server instance based on the provided settings. It configures the server address and handler, and sets the shutdown timeout to a default value.
func (*Server) Start ¶
Start starts the server. It returns an error if it fails to start the server. The error is not returned if the context is canceled, the server is shutdown and the shutdown is successful.
The server is shutdown when the context is canceled. The shutdown is cancelled if the server failed to start.
Click to show internal directories.
Click to hide internal directories.