MCPcopy
hub / github.com/grafana/grafana / PrometheusProvider

Struct PrometheusProvider

apps/dashvalidator/pkg/validator/prometheus/provider.go:14–17  ·  view source on GitHub ↗

PrometheusProvider implements cache.MetricsProvider for Prometheus datasources. It wraps the existing Fetcher and returns results with a configurable TTL.

Source from the content-addressed store, hash-verified

12// PrometheusProvider implements cache.MetricsProvider for Prometheus datasources.
13// It wraps the existing Fetcher and returns results with a configurable TTL.
14type PrometheusProvider struct {
15 fetcher validator.MetricsFetcher
16 ttl time.Duration
17}
18
19// NewPrometheusProvider creates a new PrometheusProvider with the given TTL.
20func NewPrometheusProvider(ttl time.Duration) *PrometheusProvider {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected