Versions in this module Expand all Collapse all v0 v0.1.0 May 7, 2026 Changes in this version + var Stderr = LogWriter + var Stdout = LogWriter + func Cache(ttl string) *cacheMW + func Compress(algos ...CompressAlgo) *compressMW + func ETag() *etagMW + func Export(cfg Config, w io.Writer) error + func JSONLog(dest LogWriter) *jsonLog + func Main(cfg Config) + func OTLP(endpoint string) *otlpTracing + func RateLimit(rate string) *rateLimitMW + func Resolve(cfg Config) (*resolved.Config, error) + func Retry(max int, opts ...RetryOption) *retryMW + func Run(cfg Config) + func Timeout(dur string) *timeoutMW + type AccessLog interface + type AutoTLSConfig struct + Domains []string + func AutoTLS(domains ...string) *AutoTLSConfig + func (a *AutoTLSConfig) CloudflareDNS01(apiToken string) *AutoTLSConfig + func (a *AutoTLSConfig) Email(email string) *AutoTLSConfig + func (a *AutoTLSConfig) Storage(path string) *AutoTLSConfig + func (a *AutoTLSConfig) Zone(id string) *AutoTLSConfig + type Backend struct + Address string + Backup bool + Weight int + type CompressAlgo int + const Brotli + const Gzip + func (a CompressAlgo) String() string + type Config struct + Defaults Defaults + Listeners Listeners + Observability Observability + Routes Routes + Shutdown Shutdown + Upstreams Upstreams + type Defaults struct + IdleTimeout string + MaxHeaderBytes int + ReadHeaderTimeout string + ReadTimeout string + WriteTimeout string + type HealthCheck struct + Healthy int + Interval string + Path string + Timeout string + Unhealthy int + type Listener struct + func HTTP(addr string) *Listener + func HTTPS(addr string, opts ...ListenerOption) *Listener + func (l *Listener) RedirectTo(scheme string) *Listener + type ListenerOption interface + func BehindCloudflare() ListenerOption + func HTTP2() ListenerOption + func HTTP3(addr string) ListenerOption + type Listeners []*Listener + type LogWriter struct + func (l LogWriter) Name() string + func (l LogWriter) Writer() io.Writer + type Metrics interface + func Prometheus(addr, path string) Metrics + type Middleware interface + type Observability struct + AccessLog AccessLog + Metrics Metrics + Tracing Tracing + type Pool struct + Backends []Backend + HealthCheck HealthCheck + Strategy Strategy + Transport Transport + type RateLimitKey int + const ClientIP + const HostHeader + func (k RateLimitKey) String() string + type RetryOption interface + func OnStatus(codes ...int) RetryOption + type Route struct + func Match(pattern string) *Route + func (r *Route) Host(host string) *Route + func (r *Route) ProxyTo(upstream string) *Route + func (r *Route) Serve(dir string) *Route + func (r *Route) With(mws ...Middleware) *Route + type Routes []*Route + type Shutdown struct + DrainListeners bool + GracePeriod string + type StaticTLSConfig struct + CertFile string + KeyFile string + func StaticTLS(certFile, keyFile string) *StaticTLSConfig + type Strategy int + const IPHash + const LeastConnections + const RoundRobin + const Weighted + func (s Strategy) String() string + type Tracing interface + type Transport struct + DialTimeout string + IdleConnTimeout string + MaxIdleConnsPerHost int + TLSHandshakeTimeout string + type Upstreams map[string]Pool