Documentation
¶
Index ¶
- func Run(ctx context.Context, port uint16, handler http.Handler, opts ...opt) error
- func WithAddress(host string, port uint16) opt
- func WithHandler(handler http.Handler) opt
- func WithIdleTimeout(d time.Duration) opt
- func WithMaxHeaderBytes(i int) opt
- func WithReadHeaderTimeout(d time.Duration) opt
- func WithReadTimeout(d time.Duration) opt
- func WithShutdownTimeout(d time.Duration) opt
- func WithTLSConfig(conf *tls.Config) opt
- func WithWriteTimeout(d time.Duration) opt
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run is a shortcut for New(...).Run(ctx). Port and handler parameters take precedence over the WithAddress and WithHandler options respectively if they are passed too
func WithAddress ¶
func WithHandler ¶
func WithIdleTimeout ¶
func WithMaxHeaderBytes ¶
func WithMaxHeaderBytes(i int) opt
func WithReadHeaderTimeout ¶
func WithReadTimeout ¶
func WithShutdownTimeout ¶
func WithTLSConfig ¶
func WithWriteTimeout ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.