Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetadataService ¶ added in v0.6.0
type MetadataService interface {
// MetricMetadata returns the first occurrence of metadata about metrics currently scraped by the metric name.
MetricMetadata(ctx context.Context, metric string) (v1.Metadata, error)
// AllMetricMetadata returns metadata about metrics currently scraped for all existing metrics.
AllMetricMetadata(ctx context.Context) (map[string][]v1.Metadata, error)
// LabelNames returns all the unique label names present in the block in sorted order.
// If a metric is provided, then it will return all unique label names linked to the metric during a predefined period of time
LabelNames(ctx context.Context, metricName string) ([]string, error)
// LabelValues performs a query for the values of the given label.
LabelValues(ctx context.Context, label string) ([]model.LabelValue, error)
// ChangeDataSource is used if the prometheusURL is changing.
// The client should re init its own parameter accordingly if necessary
ChangeDataSource(prometheusURL string) error
// SetLookbackInterval is a method to use to change the interval that then will be used to retrieve data such as label and metrics from prometheus.
SetLookbackInterval(interval time.Duration)
// GetURL is returning the url used to contact the prometheus server
// In case the instance is used directly in Prometheus, it should be the externalURL
GetURL() string
}
MetadataService is a light prometheus client used by LSP to get metric or label information from prometheus Server.
Click to show internal directories.
Click to hide internal directories.