prommetrics

package
v0.0.0-...-d0d5b52 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultShutdownTimeout = 5 * time.Second

	// HTTP server defaults.
	DefaultReadTimeout       = 5 * time.Second
	DefaultReadHeaderTimeout = 5 * time.Second
	DefaultWriteTimeout      = 5 * time.Second
)

Variables

View Source
var (
	// Errors
	ErrorServerAlreadyRunning error = errors.New("Prometheus HTTP server is already running")
)

Functions

This section is empty.

Types

type Counter

type Counter prometheus.Counter

Counter make an alias for non-decreasing numeric value.

type CounterVec

type CounterVec interface {
	WithLabelValues(lvs ...string) prometheus.Counter
}

CounterVec interface to work with the Counter labelled.

type Gauge

type Gauge prometheus.Gauge

Gauge make an alias for some numeric value.

type GaugeVec

type GaugeVec interface {
	WithLabelValues(lvs ...string) prometheus.Gauge
}

GaugeVec interface to work with the LastTime metrics type.

type Histogram

type Histogram prometheus.Histogram

Histogram make an alias for non-decreasing numeric value.

type HistogramVec

type HistogramVec interface {
	WithLabelValues(lvs ...string) prometheus.Observer
}

HistogramVec interface to work with the Histogram labelled.

type Metrics

type Metrics interface {
	StartHTTP(port uint, namespace string) error
	StopHTTP()

	PushCustom(url, pushJob string) error
	PushCollected() error
	// contains filtered or unexported methods
}

Metrics contains all set of methods to manage metrics collector instance behavior

func Instance

func Instance() Metrics

Instance creates a metrics singletone

func InstanceReset

func InstanceReset() Metrics

InstanceReset stops and deletes a Metrics singletone

func NewMetrics

func NewMetrics() Metrics

NewMetrics creates a new metrics handler and returns its interface.

type Summary

type Summary prometheus.Summary

Summary make an alias for non-decreasing numeric value.

type SummaryVec

type SummaryVec interface {
	WithLabelValues(lvs ...string) prometheus.Observer
}

SummaryVec interface to work with the Summary labelled.

Jump to

Keyboard shortcuts

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