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