cmetrics

package
v0.7.4-0...-a7dc155 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WireModule = wire.NewSet(
	NewMetrics,
)

Functions

This section is empty.

Types

type Counter

type Counter struct {
	Name   string
	Labels []string
}

type Histogram

type Histogram struct {
	Name    string
	Labels  []string
	Buckets []float64
}

type Metrics

type Metrics interface {
	CounterInc(name string, labels map[string]string)
	HistogramObserve(name string, labels map[string]string, value float64)
}

func NewMetrics

func NewMetrics(registry *Registry, logger clogger.Logger) (Metrics, error)

func NewNoopMetrics

func NewNoopMetrics() Metrics

type NewRegistryParams

type NewRegistryParams struct {
	Counters   []Counter
	Histograms []Histogram
}

type Registry

type Registry struct {
	Counters   []Counter
	Histograms []Histogram
}

func NewRegistry

func NewRegistry(p NewRegistryParams) *Registry

Jump to

Keyboard shortcuts

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