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.
func (*ExporterTest) Get ¶
func (et *ExporterTest) Get() (map[string]*dto.MetricFamily, error)
Get fetches the metrics from the Prometheus endpoint and returns them as a map of metric families.
Click to show internal directories.
Click to hide internal directories.