Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExporterTest ¶
type ExporterTest struct {
// contains filtered or unexported fields
}
func NewExporterTest ¶
func NewExporterTest(url string) ExporterTest
func (*ExporterTest) FindOneMetric ¶
func (m *ExporterTest) FindOneMetric(
allMetrics map[string]*dto.MetricFamily,
name string,
labels map[string]string,
) (*Metric, error)
FindOneMetric expects to find exactly one metric with the given name, resource name, resource namespace, and labels. If no such metric is found, or if more than one is found, an error is returned.
`resourceName` and `resourceNamespace` are the values of the `name` and `namespace` labels, respectively.
If labels is nil, only the name and namespace labels are checked.
type Metric ¶
type Metric struct {
*dto.Metric
}
func (*Metric) LabelValue ¶
func (m *Metric) LabelValue(name string) string
LabelValue returns the value of the label with the given name. If no such label is found, an empty string is returned.
Click to show internal directories.
Click to hide internal directories.