Documentation ¶
Index ¶
- func CounterForLabels(metricName string, labels map[string]string, ...) (int, error)
- func ForPod(source, target *corev1.Pod, namespace string) ([]map[string]*dto.MetricFamily, error)
- func GaugeForLabels(metricName string, labels map[string]string, ...) (int, error)
- func GreaterThan(min int) func(value int) error
- func ValidateCounterValue(check func(int) error, metricName string, labels map[string]string, ...) error
- func ValidateGaugeValue(expectedValue int, metricName string, labels map[string]string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CounterForLabels ¶
func CounterForLabels(metricName string, labels map[string]string, metrics map[string]*dto.MetricFamily) (int, error)
CounterForLabels retrieves the value of the Counter matching the given set of labels.
func ForPod ¶
MetricsForPod returns the parsed metrics for the given pod, scraping them from the source pod.
func GaugeForLabels ¶
func GaugeForLabels(metricName string, labels map[string]string, metrics map[string]*dto.MetricFamily) (int, error)
GaugeForLabels retrieves the value of the Gauge matching the given set of labels.
func GreaterThan ¶ added in v0.13.0
func ValidateCounterValue ¶ added in v0.12.0
func ValidateCounterValue(check func(int) error, metricName string, labels map[string]string, allMetrics []map[string]*dto.MetricFamily) error
ValidateCounterValue checks that the value related to the given metric is at most the expectedMax value.
func ValidateGaugeValue ¶ added in v0.12.0
func ValidateGaugeValue(expectedValue int, metricName string, labels map[string]string, allMetrics []map[string]*dto.MetricFamily) error
ValidateGaugeValue checks that the value corresponing to the given metric is the same as expected value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.