package
2.12.0
Repository: https://github.com/hamba/pkg.git
Documentation: pkg.go.dev

# Packages

Package healthz provides HTTP healthz handling.
Package middleware provides reusable HTTP middleware.
Package render provides HTTP output rendering helper functions.
Package request provides functions add and extract information from an http request.
Package server provides a generic HTTP server.

# Functions

NewHealthHandler returns a handler for application health checking.
NewHealthServer returns an HTTP server with healthz capabilities.
NewServer returns a server with the base context ctx.
OK replies to the request with an HTTP 200 ok reply.
OKHandler returns a simple request handler that replies to each request with a “200 OK” reply.
RealIP resolves the real client IP address from the request.
WithH2C allows the server to handle h2c connections.
WithReadTimeout sets the server read timeout.
WithTLSConfig sets the serve tls config.
WithWriteTimeout sets the server write timeout.

# Variables

DefaultHealthPath is the default HTTP path for checking health.

# Structs

HealthServer is an HTTP server with healthz capabilities.
HealthServerConfig configures a HealthServer.
Server is a convenience wrapper around the standard library HTTP server.

# Interfaces

Health represents an object that can check its health.

# Type aliases

SrvOptFunc represents a server option function.