http

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 16 Imported by: 0

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.

Jump to

Keyboard shortcuts

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