Versions in this module Expand all Collapse all v1 v1.0.0 Aug 26, 2026 Changes in this version + var ErrInvalidConfig = errors.New("invalid HTTP server configuration") + var ErrInvalidState = errors.New("invalid HTTP server state") + func Chain(handler http.Handler, middleware ...Middleware) (http.Handler, error) + type ConfigError struct + Field string + Reason string + func (err *ConfigError) Error() string + func (err *ConfigError) Unwrap() error + type Middleware func(http.Handler) http.Handler + func LimitBody(limit int64) (Middleware, error) + func Recover() Middleware + type Option func(*config) error + func WithBaseContext(base func(net.Listener) context.Context) Option + func WithBodyLimit(limit int64) Option + func WithConnContext(connection func(context.Context, net.Conn) context.Context) Option + func WithCorrelation(factory *correlation.Factory, options httpcorrelation.Options) Option + func WithIdleTimeout(timeout time.Duration) Option + func WithIngressMiddleware(middleware ...Middleware) Option + func WithMaxHeaderBytes(limit int) Option + func WithMiddleware(middleware ...Middleware) Option + func WithReadHeaderTimeout(timeout time.Duration) Option + func WithReadTimeout(timeout time.Duration) Option + func WithShutdownTimeout(timeout time.Duration) Option + func WithWriteTimeout(timeout time.Duration) Option + type RunError struct + Failures []error + func (err *RunError) Error() string + func (err *RunError) Unwrap() []error + type ServeError struct + Err error + func (err *ServeError) Error() string + func (err *ServeError) Unwrap() error + type Server struct + func New(listener net.Listener, handler http.Handler, options ...Option) (*Server, error) + func (server *Server) Close() error + func (server *Server) HTTPServer() *http.Server + func (server *Server) Run(ctx context.Context) error + type StateError struct + Operation string + State string + func (err *StateError) Error() string + func (err *StateError) Unwrap() error