Documentation ¶
Overview ¶
Simple wrapper around http.Server with graceful shutdown and easy tls setup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(addr string, options ...option) *server
Create a new http server instance. Run the server by calling the Run method on it.
func WithReadTimeout ¶
set server ReadTimeout to timeout
func WithTLS ¶
func WithTLS(certFile, keyFile string) option
Start the server with tls enabled by certificates
func WithWriteTimeout ¶
set server WriteTimeout to timeout
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.