Files
grafana/pkg/tsdb/cloudwatch/models/api.go
T
Grot (@grafanabot) f3ffc1a495 [v9.3.x] CloudWatch: fix custom namespace for listing dimension keys, refactor to non-pointer types, add test assertions, rename packages (#59130)
CloudWatch: fix custom namespace for listing dimension keys, refactor to non-pointer types, add test assertions, rename packages (#59106)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
(cherry picked from commit c43e1a721f)

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2022-11-22 16:25:27 +01:00

22 lines
766 B
Go

package models
import (
"github.com/aws/aws-sdk-go/service/cloudwatch"
"github.com/grafana/grafana/pkg/tsdb/cloudwatch/models/resources"
)
type ListMetricsProvider interface {
GetDimensionKeysByDimensionFilter(resources.DimensionKeysRequest) ([]string, error)
GetDimensionKeysByNamespace(string) ([]string, error)
GetDimensionValuesByDimensionFilter(resources.DimensionValuesRequest) ([]string, error)
GetMetricsByNamespace(namespace string) ([]resources.Metric, error)
}
type MetricsClientProvider interface {
ListMetricsWithPageLimit(params *cloudwatch.ListMetricsInput) ([]*cloudwatch.Metric, error)
}
type CloudWatchMetricsAPIProvider interface {
ListMetricsPages(*cloudwatch.ListMetricsInput, func(*cloudwatch.ListMetricsOutput, bool) bool) error
}