Documentation
¶
Overview ¶
Package http provides an application module backed by a Gorilla Mux HTTP server. It includes request logging, panic recovery, OpenTelemetry tracing and metrics, health and Prometheus endpoints, and optional static file serving.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(content http.FileSystem) application.Module
New returns an HTTP server module. When content is non-nil, the module serves it from the root path after routes registered by Routable modules.
Types ¶
type Routable ¶
type Routable interface {
// Route registers handlers or middleware during the HTTP module's Start
// phase. Returning an error prevents the application from starting.
Route(ctx context.Context, router *mux.Router) error
}
Routable is implemented by application modules that register HTTP routes or middleware with the shared Gorilla Mux router.
Click to show internal directories.
Click to hide internal directories.