handlers

package
v1.1.0-rc-1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package handlers provides HTTP handlers.

Index

Constants

View Source
const MaxPayloadSize = 16 * 1024 * 1024

Variables

This section is empty.

Functions

func PromHTTPMiddleware

func PromHTTPMiddleware(next http.Handler) http.Handler

PromHTTPMiddleware instruments HTTP requests with Prometheus metrics.

Types

type ProfilingAPI

type ProfilingAPI struct {
	api.Service
}

func NewProfilingAPI

func NewProfilingAPI(base string) *ProfilingAPI

NewProfilingAPI creates a new handler for pprof endpoints

The standard is for this API to live at /debug/pprof

func (*ProfilingAPI) Register

func (a *ProfilingAPI) Register(app server.Server) error

func (*ProfilingAPI) Routes

func (a *ProfilingAPI) Routes() *chi.Mux

type PromMetricsAPI

type PromMetricsAPI struct {
	api.Service
}

PromMetricsAPI is a thin wrapper around the Prometheus HTTP handler to integrate with the go-obvious server API.

func NewPromMetricsAPI

func NewPromMetricsAPI(base string) *PromMetricsAPI

func (*PromMetricsAPI) Register

func (a *PromMetricsAPI) Register(app server.Server) error

func (*PromMetricsAPI) Routes

func (a *PromMetricsAPI) Routes() *chi.Mux

type RemoteWriteAPI

type RemoteWriteAPI struct {
	api.Service
	// contains filtered or unexported fields
}

func NewRemoteWriteAPI

func NewRemoteWriteAPI(base string, d *domain.MetricCollector) *RemoteWriteAPI

func (*RemoteWriteAPI) PostMetrics

func (a *RemoteWriteAPI) PostMetrics(w http.ResponseWriter, r *http.Request)

func (*RemoteWriteAPI) Register

func (a *RemoteWriteAPI) Register(app server.Server) error

func (*RemoteWriteAPI) Routes

func (a *RemoteWriteAPI) Routes() *chi.Mux

type ShipperAPI

type ShipperAPI struct {
	api.Service
	// contains filtered or unexported fields
}

func NewShipperAPI

func NewShipperAPI(base string, d *shipper.MetricShipper) *ShipperAPI

func (*ShipperAPI) Register

func (a *ShipperAPI) Register(app server.Server) error

func (*ShipperAPI) Routes

func (a *ShipperAPI) Routes() *chi.Mux

Jump to

Keyboard shortcuts

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