metrics

package
v1.10.12 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collect

type Collect interface {
	Collect(ctx context.Context)
}

type FuncCollect

type FuncCollect func(ctx context.Context, m Metric)

type FuncCollectMetrics

type FuncCollectMetrics func() Collect

type FuncCollectMetricsByName

type FuncCollectMetricsByName func(name string) Collect

type FuncGetMetric

type FuncGetMetric func() Metric

type FuncGetMetricName

type FuncGetMetricName func(name string) Metric

type Metric

type Metric interface {
	prmtps.Metric
	Collect

	SetGaugeValue(labelValues []string, value float64) error
	Inc(labelValues []string) error
	Add(labelValues []string, value float64) error
	Observe(labelValues []string, value float64) error

	Register(vec prmsdk.Collector) error
	UnRegister() bool

	SetDesc(desc string)
	AddLabel(label ...string)
	AddBuckets(bucket ...float64)
	AddObjective(key, value float64)

	SetCollect(fct FuncCollect)
	GetCollect() FuncCollect
}

func NewMetrics

func NewMetrics(name string, metricType prmtps.MetricType) Metric

Jump to

Keyboard shortcuts

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