Documentation
¶
Overview ¶
Package httpserver implements HTTP server.
Index ¶
- Variables
- type Option
- func Listener(l net.Listener) Option
- func Logger(l appLogger.Interface) Option
- func Port(host, port string) Option
- func ReadTimeout(timeout time.Duration) Option
- func ShutdownTimeout(timeout time.Duration) Option
- func TLS(enable bool, certFile, keyFile string) Option
- func WriteTimeout(timeout time.Duration) Option
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTLSCertKeyMismatch = errors.New("tls cert/key mismatch: both certFile and keyFile must be set when TLS is enabled")
)
Errors.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Server)
Option -.
func Listener ¶ added in v1.13.0
Listener injects a pre-bound listener (useful for tests to avoid binding real ports).
Click to show internal directories.
Click to hide internal directories.