metrics

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EventStop indicates a stop event took place.
	EventStop = "stop"
	// EventKill indicates a kill event took place.
	EventKill = "kill"
	// EventTrigger indicates a trigger event took place.
	EventTrigger = "triggered"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EventLabels

type EventLabels struct {
	// contains filtered or unexported fields
}

EventLabels is used by clients to pass in a safe way labels values to prometheus metric types (e.g. counter).

func (EventLabels) Labels

func (l EventLabels) Labels() []string

Labels returns the name of the labels in correct order.

func (EventLabels) Values

func (l EventLabels) Values() []string

Values returns the values of the label in correct order.

type ExportMetric

type ExportMetric interface {
	Runtime(time.Duration)
	StartTimestamp(time.Time)
	Period(time.Duration)
	Event(string)
}

ExportMetric is the interface to export periodic metrics.

func NewMetric

func NewMetric(prefix string) ExportMetric

NewMetric returns the ExportMetric to be used for the exporting metrics.

Directories

Path Synopsis
Package mock_metrics is a generated GoMock package.
Package mock_metrics is a generated GoMock package.

Jump to

Keyboard shortcuts

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