metrics

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 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 CounterMetric

type CounterMetric struct {
	Name   string
	Value  int64
	Desc   string
	Labels Labels
}

func (CounterMetric) Header

func (c CounterMetric) Header() string

func (CounterMetric) Key

func (c CounterMetric) Key() string

func (CounterMetric) Print

func (c CounterMetric) Print() string

type GaugeMetric

type GaugeMetric struct {
	Name   string
	Value  int64
	Desc   string
	Labels Labels
}

func (GaugeMetric) Header

func (c GaugeMetric) Header() string

func (GaugeMetric) Key

func (c GaugeMetric) Key() string

func (GaugeMetric) Print

func (c GaugeMetric) Print() string

type Label

type Label struct {
	Key   string
	Value string
}

func (Label) Print

func (l Label) Print() string

type Labels

type Labels []Label

func (Labels) Print

func (l Labels) Print() string

type Metric

type Metric interface {
	Key() string
	Header() string
	Print() string
}

type Metrics

type Metrics []Metric

func (Metrics) Len

func (m Metrics) Len() int

func (Metrics) Less

func (m Metrics) Less(i, j int) bool

func (Metrics) Print

func (m Metrics) Print() (output string)

func (Metrics) Swap

func (m Metrics) Swap(i, j int)

Jump to

Keyboard shortcuts

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