prometheus

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	Name   string            `json:"name"`
	Type   string            `json:"type"`
	Value  float64           `json:"value"`
	Labels map[string]string `json:"labels"`
}

type PrometheusCollector

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

func NewPrometheusCollector

func NewPrometheusCollector() *PrometheusCollector

func (*PrometheusCollector) Export

func (c *PrometheusCollector) Export() string

func (*PrometheusCollector) GetMetric

func (c *PrometheusCollector) GetMetric(name string) *Metric

func (*PrometheusCollector) Inc

func (c *PrometheusCollector) Inc(name string, labels map[string]string)

func (*PrometheusCollector) Observe

func (c *PrometheusCollector) Observe(name string, value float64, labels map[string]string)

func (*PrometheusCollector) Set

func (c *PrometheusCollector) Set(name string, value float64, labels map[string]string)

Jump to

Keyboard shortcuts

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