Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
Event is a Prometheus Metric Event
func (*Event) Equals ¶
Equals checks if two Events refer to the same Prometheus event
type Metric ¶
Metric is a Prometheus Metric
type PrometheusMetrics ¶
PrometheusMetrics is a struct to push metrics to Prometheus
func NewMetrics ¶
func NewMetrics(instance, pushgatewayURL string) *PrometheusMetrics
NewMetrics returns a new metrics struct
func (*PrometheusMetrics) GetMetrics ¶
func (p *PrometheusMetrics) GetMetrics() (err error)
GetMetrics returns a map of existing metrics
func (*PrometheusMetrics) NewMetric ¶
func (p *PrometheusMetrics) NewMetric(name, mType string) (m *Metric)
NewMetric adds a new metric if it doesn't exist yet or returns the existing matching metric otherwise
func (*PrometheusMetrics) Push ¶
func (p *PrometheusMetrics) Push() (err error)
Push sends metrics to a Prometheus push gateway
Source Files
¶
- metrics.go
Click to show internal directories.
Click to hide internal directories.