metrics

package
v0.0.0-...-51fbea3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter interface {
	With(labelValues ...string) Counter
	Add(delta float64)
}

type CounterOpts

type CounterOpts struct {
	Namespace string
	Subsystem string
	Name      string
	Help      string
	// LabelNames 之后调用 With 方法传入的 labels2values 参数中,labels 必须存在于 LabelNames 中,不然会 panic。
	LabelNames   []string
	LabelHelp    map[string]string
	StatsdFormat string
}

type Gauge

type Gauge interface {
	With(labelValues ...string) Gauge
	Add(delta float64)
	Set(value float64)
}

type GaugeOpts

type GaugeOpts struct {
	Namespace string
	Subsystem string
	Name      string
	Help      string
	// LabelNames 之后调用 With 方法传入的 labels2values 参数中,labels 必须存在于 LabelNames 中,不然会 panic。
	LabelNames   []string
	LabelHelp    map[string]string
	StatsdFormat string
}

type Histogram

type Histogram interface {
	With(labelValues ...string) Histogram
	Observe(value float64)
}

type HistogramOpts

type HistogramOpts struct {
	Namespace string
	Subsystem string
	Name      string
	Help      string
	Buckets   []float64
	// LabelNames 之后调用 With 方法传入的 labels2values 参数中,labels 必须存在于 LabelNames 中,不然会 panic。
	LabelNames   []string
	LabelHelp    map[string]string
	StatsdFormat string
}

type Provider

type Provider interface {
	NewCounter(CounterOpts) Counter
	NewGauge(GaugeOpts) Gauge
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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