metrics

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// EventTypeLabel - metric label for event type
	EventTypeLabel = "type"
	// EventTypeAdd - addition event label
	EventTypeAdd = "add"
	// EventTypeDelete - deletion event label
	EventTypeDelete = "delete"
	// EventTypeUpdate - update event label
	EventTypeUpdate = "update"
	// ReconcileResultLabel - metric label for event result
	ReconcileResultLabel = "result"
	// ReconcileResultSuccess - successful event label
	ReconcileResultSuccess = "success"
	// ReconcileResultFailure - failed event label
	ReconcileResultFailure = "failure"
)

Variables

This section is empty.

Functions

func RegisterCollector

func RegisterCollector(c *Collector)

RegisterCollector - add collector safely to prometheus

Types

type Collector

type Collector struct {
	EventType       *prom.CounterVec
	ReconcileResult *prom.CounterVec
}

Collector - metric collector for all the metrics the sdk will watch

func New

func New() *Collector

New - create a new Collector

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prom.Metric)

Collect returns the current state of the metrics

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prom.Desc)

Describe returns all the descriptions of the collector

Jump to

Keyboard shortcuts

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