MCPcopy
hub / github.com/grafana/grafana / mockProvider

Struct mockProvider

apps/dashvalidator/pkg/validator/prometheus/validator_test.go:41–46  ·  view source on GitHub ↗

mockProvider implements cache.MetricsProvider for testing

Source from the content-addressed store, hash-verified

39
40// mockProvider implements cache.MetricsProvider for testing
41type mockProvider struct {
42 metricsToReturn []string
43 ttl time.Duration
44 errorToReturn error
45 callCount atomic.Int32
46}
47
48func (m *mockProvider) GetMetrics(ctx context.Context, datasourceUID, datasourceURL string,
49 client *http.Client) (*cache.MetricsResult, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected