Versions in this module Expand all Collapse all v1 v1.33.0 Aug 7, 2022 v1.32.0 Aug 7, 2022 v1.31.0 Aug 7, 2022 v1.30.0 Aug 7, 2022 v1.29.0 Aug 7, 2022 Changes in this version + var DevMode bool + func AcceptsEncoding(r *http.Request, enc string) bool + func AllowDebugAccess(r *http.Request) bool + func DefaultCertDir(leafDir string) string + func IsProd443(addr string) bool + func Protected(h http.Handler) http.Handler + func StdHandler(h ReturnHandler, opts HandlerOptions) http.Handler + func Uptime() time.Duration + func VarzHandler(w http.ResponseWriter, r *http.Request) + func WritePrometheusExpvar(w io.Writer, kv expvar.KeyValue) + type AccessLogRecord struct + Bytes int + Code int + Err string + Host string + Method string + Proto string + Referer string + RemoteAddr string + RequestURI string + Seconds float64 + TLS bool + UserAgent string + When time.Time + func (m AccessLogRecord) String() string + type DebugHandler struct + func Debugger(mux *http.ServeMux) *DebugHandler + func (d *DebugHandler) Handle(slug, desc string, handler http.Handler) + func (d *DebugHandler) KV(k string, v any) + func (d *DebugHandler) KVFunc(k string, v func() any) + func (d *DebugHandler) Section(f func(w io.Writer, r *http.Request)) + func (d *DebugHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (d *DebugHandler) URL(url, desc string) + type ErrorHandlerFunc func(http.ResponseWriter, *http.Request, HTTPError) + type HTTPError struct + Code int + Err error + Header http.Header + Msg string + func Error(code int, msg string, err error) HTTPError + func (e HTTPError) Error() string + type HandlerOptions struct + Logf logger.Logf + Now func() time.Time + OnError ErrorHandlerFunc + Quiet200s bool + StatusCodeCounters *expvar.Map + StatusCodeCountersFull *expvar.Map + type Port80Handler struct + FQDN string + Main http.Handler + func (h Port80Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type PrometheusMetricsReflectRooter interface + PrometheusMetricsReflectRoot func() any + type PrometheusVar interface + WritePrometheus func(w io.Writer, prefix string) + type ReturnHandler interface + ServeHTTPReturn func(http.ResponseWriter, *http.Request) error + type ReturnHandlerFunc func(http.ResponseWriter, *http.Request) error + func (f ReturnHandlerFunc) ServeHTTPReturn(w http.ResponseWriter, r *http.Request) error