metricshandler

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsPath = "/metrics"

	MetricsRefreshPeriod = 2 * time.Second
)

Variables

This section is empty.

Functions

func RegisterSelfMetrics

func RegisterSelfMetrics()

func StartMetricsCollector added in v0.0.36

func StartMetricsCollector(mgr manager.Manager) func(ctx context.Context) error

Types

type Collector added in v0.0.36

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

type MetricsHandler

type MetricsHandler struct {
	client.Client
}

MetricsHandler struct contains Stores which store the metrics to serve in the /metrics path

func (*MetricsHandler) Install

func (h *MetricsHandler) Install(c *mux.PathRecorderMux)

Install adds the MetricsWithReset handler

func (*MetricsHandler) ServeHTTP

func (h *MetricsHandler) ServeHTTP(w http.ResponseWriter, _ *http.Request)

ServeHTTP serves the request for /metrics path

Jump to

Keyboard shortcuts

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