routing

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMetricsRoutes added in v0.0.9

func RegisterMetricsRoutes(mux *http.ServeMux, m *metrics.Metrics)

RegisterMetricsRoutes adds routes for Prometheus metrics

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router handles dynamic HTTP routing with versioning and health checks.

func NewRouter

func NewRouter(cfg *config.Config, handlers map[string]http.Handler, logger *zap.Logger, metrics *metrics.Metrics) *Router

NewRouter creates a new router with the given configuration.

func (*Router) ServeHTTP

func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP implements the http.Handler interface.

Jump to

Keyboard shortcuts

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