Documentation
¶
Index ¶
Constants ¶
View Source
const TimeFormat = "2006-01-02T15:04:05.999999-07:00"
Variables ¶
This section is empty.
Functions ¶
func DetermineGetMetricDataWindow ¶
func DetermineGetMetricDataWindow(clock Clock, roundingPeriod time.Duration, length time.Duration, delay time.Duration) (time.Time, time.Time)
determineGetMetricDataWindow computes the start and end time for the GetMetricData request to AWS Always uses the wall clock time as starting point for calculations to ensure that a variety of exporter configurations will work reliably.
Types ¶
type Client ¶
type Client interface { // ListMetrics returns the list of metrics and dimensions for a given namespace // and metric name. Results pagination is handled automatically: the caller can // optionally pass a non-nil func in order to handle results pages. ListMetrics(ctx context.Context, namespace string, metric *config.Metric, recentlyActiveOnly bool, fn func(page []*model.Metric)) ([]*model.Metric, error) // GetMetricData returns the output of the GetMetricData CloudWatch API. // Results pagination is handled automatically. GetMetricData(ctx context.Context, logger logging.Logger, getMetricData []*model.CloudwatchData, namespace string, length int64, delay int64, configuredRoundingPeriod *int64) []MetricDataResult // GetMetricStatistics returns the output of the GetMetricStatistics CloudWatch API. GetMetricStatistics(ctx context.Context, logger logging.Logger, dimensions []*model.Dimension, namespace string, metric *config.Metric) []*model.Datapoint }
type Clock ¶
Clock small interface which allows for stubbing the time.Now() function for unit testing
type MetricDataResult ¶
Click to show internal directories.
Click to hide internal directories.