api

package
v0.0.0-...-9811130 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MetricsEndpoint = "/metrics"

MetricsEndpoint endpoint subpath for metrics

View Source
const TenantHeaderKey = "tenant"

TenantHeaderKey in this header the right tenant should be inserted

View Source
const URLParamTenantID = "tntid"

URLParamTenantID url parameter for the tenant id

Variables

This section is empty.

Functions

func MetricsHandler

func MetricsHandler(cfg MetricsConfig) func(next http.Handler) http.Handler

MetricsHandler creates a new directly usable handler

func TraceEnhancer

func TraceEnhancer(next http.Handler) http.Handler

TraceEnhancer is a middleware that will set the http method and url as operation-name of the top level span.

Types

type Handler

type Handler interface {
	// Routes get the routes
	Routes() (string, *chi.Mux)
}

Handler a http REST interface handler

type MetricsConfig

type MetricsConfig struct {
	// Skip particular requests from the handler
	SkipFunc func(r *http.Request) bool
}

MetricsConfig defining a handler for checking system id and api key

Jump to

Keyboard shortcuts

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