Versions in this module Expand all Collapse all v0 v0.23.0 Mar 21, 2026 Changes in this version + const DefaultIdleTimeout + const DefaultMaxHeaderBytes + const DefaultReadHeaderTimeout + const DefaultReadTimeout + const DefaultShutdownTimeout + const DefaultWriteTimeout + func WithHTTPEnabled(enable bool) func(*Route) + func WithHTTPSEnabled(enable bool) func(*Route) + func WithRewriteHTTPToHTTPS(enable bool) func(*Route) + type Config struct + BindAddr string + BindPort int + HTTPSPort int + IdleTimeout time.Duration + MaxHeaderBytes int + ReadHeaderTimeout time.Duration + ReadTimeout time.Duration + ShutdownTimeout time.Duration + TLSCerts []tls.Certificate + WriteTimeout time.Duration + func NewConfig(opts ...Option) *Config + func (c *Config) Serve(ctx context.Context, log logr.Logger, httpHandler http.Handler, ...) error + type Option func(*Config) + type Route struct + Description string + HTTPEnabled bool + HTTPSEnabled bool + Handler http.Handler + Pattern string + RewriteHTTPToHTTPS bool + type Routes []Route + func (rs *Routes) Muxes(log logr.Logger, httpsPort int, tlsEnabled bool) (*http.ServeMux, *http.ServeMux) + func (rs *Routes) Register(pattern string, hh http.Handler, desc string, options ...func(*Route)) + func (rs Routes) HasHTTPSRoutes() bool + func (rs Routes) LogValue() slog.Value