Documentation ¶
Overview ¶
Package metric provides functions and filters to test AWS CloudWatch Metrics
Index ¶
- type Metric
- func (r *Metric) Alarm() *alarm.Alarm
- func (r *Metric) Assert(t *testing.T, metrics ...*cloudwatch.Metric) *Metric
- func (r *Metric) Filter(filter shared.Filter) *Metric
- func (r *Metric) First(t *testing.T, metrics ...*cloudwatch.Metric) *Metric
- func (r *Metric) MetricName(name string) *Metric
- func (r *Metric) Name(name string) *Metric
- func (r *Metric) Namespace(name string) *Metric
- func (r *Metric) Selected() *cloudwatch.Metric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metric ¶
type Metric struct {
// contains filtered or unexported fields
}
Metric contains the necessary properties for testing *cloudwatch.Metric objects
func (*Metric) Assert ¶
Assert applies all filters that have been called, resets the list of filters, fails the test if there is not exactly one match, and stores the matched metric if metrics is not provided, *cloudwatch.Metric objects will be retreived from AWS
func (*Metric) First ¶
First applies all filters that have been called, resets the list of filters, fails the test if there are no matches, and stores the first match if metrics is not provided, *cloudwatch.Metric objects will be retreived from AWS
func (*Metric) MetricName ¶
MetricName adds the MetricName filter to the filter list the MetricName filter: filters metrics by MetricName where 'name' provided is the expected MetricName value
func (*Metric) Namespace ¶
Namespace adds the Namespace filter to the filter list the Namespace filter: filters metrics by Namespace where 'name' provided is the expected Namespace value
func (*Metric) Selected ¶
func (r *Metric) Selected() *cloudwatch.Metric
Selected returns the currently selected *cloudwatch.Metric