metrics

package
v0.0.0-...-c7b5264 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map interface {
	// Add adds a new metric to the map.
	Add(key string, delta int64)

	// AddFloat adds a new metric to the map.
	AddFloat(key string, delta float64)

	// Get gets a Var from the Map.
	Get(key string) expvar.Var
}

Map stores the desired metrics.

type Metrics

type Metrics interface {
	NewCounter(name string) func(delta uint64)
	NewGauge(name string) func(value float64)
}

Metrics stores health metrics for the process. It has a gauge and counter metrics.

func New

func New(m Map) Metrics

New returns a new Metrics.

Jump to

Keyboard shortcuts

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