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
type Metric ¶
Metric is a Prometheus Metric
func (*Metric) UpdateEvent ¶
UpdateEvent adds an event, or updates it if the event already exists
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
Click to show internal directories.
Click to hide internal directories.