promethabs

package
v1.76.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: MIT Imports: 0 Imported by: 0

README

PLEASE LOOK AT 20240826 AREC, ABOUT METRICS WRAPPER OVER THE PROMETHEUS LIB

Expected usage:


    // create a metrics id (a metric, from the POV of user)
    myMetric := promethabs.NewMetricId("my_metric")

    // init a metrics service
    metricsService := ...

    // use the metric, e.g. increment it
    metricsService.Metric(myMetric.Id).Inc()

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IdCounter uint16

Functions

This section is empty.

Types

type IMetric

type IMetric interface {
	Set(float64)
	Inc()
	Dec()
	Add(float64)
	Sub(float64)
}

type IMetricsService

type IMetricsService interface {
	Metric(id uint16, labels map[string]string) IMetric
}

type MetricId

type MetricId struct {
	Id          uint16
	Name        string
	Description string
}

func NewMetricId

func NewMetricId(name string) (id *MetricId)

Non-thread-safe

Jump to

Keyboard shortcuts

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