xmetrics

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithVendor

func WithVendor(p Provider)

Types

type Bucket

type Bucket struct {
	Start, Factor float64
	Count         int
}

type Counter

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

func NewCounter

func NewCounter(name string, labelNames ...string) Counter

type Gauge

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

func NewGauge

func NewGauge(name string, labelNames ...string) Gauge

type Histogram

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

func NewHistogram

func NewHistogram(name string, buckets []float64, labelNames ...string) Histogram

type Provider

type Provider interface {
	NewCounter(name string, labelNames ...string) Counter
	NewGauge(name string, labelNames ...string) Gauge
	NewHistogram(name string, bucket []float64, labelNames ...string) Histogram
}

func GetProvider

func GetProvider() Provider

type Server

type Server interface {
	Stop() error
	Start() error
}

Directories

Path Synopsis
contrib

Jump to

Keyboard shortcuts

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