package
0.0.0-20250203001930-13b3ed95fc31
Repository: https://github.com/davincible/d-utils.git
Documentation: pkg.go.dev

# Functions

NewMetrics initializes and registers Prometheus metrics.
NewServer creates a new HTTP server instance.
WithAddr sets the server address.
WithCORS sets the CORS options.
WithCorsCredentials sets whether CORS requests can include credentials.
WithCorsDomains sets the allowed CORS domains.
WithCorsHeaders sets the allowed CORS headers.
WithCorsMethods sets the allowed CORS methods.
WithLogger enables or disables the chi logger middleware.
WithMaxRequestSize sets the maximum request size.
WithMetrics enables or disables Prometheus metrics.
WithMiddleware adds custom middleware.
WithRequestTimeout sets the global request timeout.
WithTimeouts sets the read and write timeouts.

# Structs

Metrics holds all Prometheus metrics.
ServerHTTP configuration fields.
ServerHTTP represents the HTTP server instance.

# Type aliases

ServerOption defines a functional option for configuring the server.