metric

package
v0.0.0-...-90d47c1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interval

type Interval struct {
	OldestInclusive model.Time
	NewestInclusive model.Time
}

Interval describes the inclusive interval between two Timestamps.

type Metric

type Metric struct {
	Copied bool
	Metric model.Metric
}

Metric wraps a model.Metric and copies it upon modification if Copied is false.

func (*Metric) Copy

func (m *Metric) Copy() *Metric

Copy the underlying Metric if it is not already a copy.

func (*Metric) Del

func (m *Metric) Del(ln model.LabelName)

Del deletes a given label name from the wrapped Metric and copies the Metric initially, if it is not already a copy.

func (*Metric) Get

func (m *Metric) Get(ln model.LabelName) model.LabelValue

Get the value for the given label name. An empty value is returned if the label does not exist in the metric.

func (*Metric) Gets

func (m *Metric) Gets(ln model.LabelName) (model.LabelValue, bool)

Gets behaves as Get but the returned boolean is false iff the label does not exist.

func (*Metric) Set

func (m *Metric) Set(ln model.LabelName, lv model.LabelValue)

Set sets a label name in the wrapped Metric to a given value and copies the Metric initially, if it is not already a copy.

func (Metric) String

func (m Metric) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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