package
0.0.0-20250307173044-634e8ce82c05
Repository: https://github.com/sapcc/go-bits.git
Documentation: pkg.go.dev
# Packages
Package pprofapi provides a httpapi.API wrapper for the net/http/pprof package.
# Functions
Compose constructs an http.Handler serving all the provided APIs.
ConfigureMetrics sets up the metrics emitted by this package.
IdentifyEndpoint must be called by each endpoint handler in an API that is provided to Compose().
SkipRequestLog indicates that this request shall not have a "REQUEST" log line written for it.
WithGlobalMiddleware can be given as an argument to Compose() to add a middleware to the entire http.Handler returned by Compose().
WithoutLogging can be given as an argument to Compose() to disable request logging for the entire http.Handler returned by Compose().
# Structs
HealthCheckAPI is an API with one endpoint, "GET /healthcheck", that usually just prints "ok".
MetricsConfig contains configuration options for ConfigureMetrics().
# Interfaces
API is the interface that applications can use to plug their own API endpoints into the http.Handler constructed by this package's Compose() function.