metrics

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: Apache-2.0 Imports: 10 Imported by: 47

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

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

Metrics is a component which serve metrics data to Prometheus.

func NewMetrics

func NewMetrics(cfg configuration.Metrics) (Metrics, error)

NewMetrics creates new Metrics component.

func (*Metrics) AddCounter

func (m *Metrics) AddCounter(name, componentName, help string) (prometheus.Counter, error)

AddCounter adds new counter to metrics registry.

func (*Metrics) AddGauge

func (m *Metrics) AddGauge(name, componentName, help string) (prometheus.Gauge, error)

AddGauge adds new gauge to metrics registry.

func (*Metrics) Start

func (m *Metrics) Start(components core.Components) error

Start is implementation of core.Component interface.

func (*Metrics) Stop

func (m *Metrics) Stop() error

Stop is implementation of core.Component interface.

Jump to

Keyboard shortcuts

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