Documentation ¶
Index ¶
Constants ¶
View Source
const TimeFormat = "2006-01-02T15:04:05.999999-07:00"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
GetMetricData(ctx context.Context, getMetricData []*model.CloudwatchData, namespace string, startTime time.Time, endTime time.Time) []cloudwatch.MetricDataResult
}
type Clock ¶ added in v0.59.0
Clock small interface which allows for stubbing the time.Now() function for unit testing
type Iterator ¶ added in v0.60.0
type Iterator interface { // Next returns the next batch of CloudWatch data be used when calling GetMetricData and the start + end time for // the GetMetricData call // If called when there are no more batches default values will be returned Next() ([]*model.CloudwatchData, *model.GetMetricDataProcessingParams) // HasMore returns true if there are more batches to iterate otherwise false. Should be used in a loop // to govern calls to Next() HasMore() bool }
func NewSimpleBatchIterator ¶ added in v0.60.0
func NewSimpleBatchIterator(metricsPerQuery int, data []*model.CloudwatchData, jobMetricLength, jobMetricDelay int64, jobRoundingPeriod *int64) Iterator
NewSimpleBatchIterator returns an iterator which slices the data in place based on the metricsPerQuery.
type IteratorFactory ¶ added in v0.60.0
type IteratorFactory interface { // Build returns an ideal batch iterator based on the provided CloudwatchData Build(requests []*model.CloudwatchData, jobMetricLength, jobMetricDelay int64, jobRoundingPeriod *int64) Iterator }
type MetricWindowCalculator ¶ added in v0.59.0
type MetricWindowCalculator struct {
// contains filtered or unexported fields
}
func (MetricWindowCalculator) Calculate ¶ added in v0.59.0
func (m MetricWindowCalculator) Calculate(period time.Duration, length time.Duration, delay time.Duration) (time.Time, time.Time)
Calculate 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.
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func NewDefaultProcessor ¶ added in v0.59.0
func NewProcessor ¶
func NewProcessor(logger logging.Logger, client Client, concurrency int, windowCalculator MetricWindowCalculator, factory IteratorFactory) Processor
Click to show internal directories.
Click to hide internal directories.