xhttp

package
v0.20.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRequestAttrs

func AddRequestAttrs(ctx context.Context, attrs ...slog.Attr)

func MemStatHandler added in v0.17.4

func MemStatHandler(w http.ResponseWriter, r *http.Request)

func WithLogger

func WithLogger(logger *slog.Logger, handler http.Handler, filter LogFilterFunc) http.Handler

func WithRecover

func WithRecover(handler http.Handler) http.Handler

Types

type HumanMemStats added in v0.17.4

type HumanMemStats struct {
	TotalAlloc string
	Sys        string
	HeapAlloc  string
	HeapSys    string
	HeapIdle   string
	HeapInuse  string
	NextGC     string
}

type LogFilterFunc added in v0.16.8

type LogFilterFunc func(pattern string, attrs []slog.Attr) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL