Documentation
¶
Overview ¶
Package alarm the necessary properties for testing *cloudwatch.MetricAlarm objects
Index ¶
- type Alarm
- func (a *Alarm) AlarmArn(arn string) *Alarm
- func (a *Alarm) AlarmDescription(str string) *Alarm
- func (a *Alarm) AlarmName(str string) *Alarm
- func (a *Alarm) Arn(arn string) *Alarm
- func (a *Alarm) Assert(t *testing.T, alarms ...*cloudwatch.MetricAlarm) *Alarm
- func (a *Alarm) ComparisonOperator(str string) *Alarm
- func (a *Alarm) Description(arn string) *Alarm
- func (a *Alarm) EvaluationPeriods(i int64) *Alarm
- func (a *Alarm) Filter(filter shared.Filter) *Alarm
- func (a *Alarm) First(t *testing.T, alarms ...*cloudwatch.MetricAlarm) *Alarm
- func (a *Alarm) Name(arn string) *Alarm
- func (a *Alarm) Period(i int64) *Alarm
- func (a *Alarm) Selected() *cloudwatch.MetricAlarm
- func (a *Alarm) State(arn string) *Alarm
- func (a *Alarm) StateValue(str string) *Alarm
- func (a *Alarm) Statistic(str string) *Alarm
- func (a *Alarm) Threshold(f float64) *Alarm
- func (a *Alarm) TreatMissingData(str string) *Alarm
- func (a *Alarm) Unit(unit string) *Alarm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alarm ¶
type Alarm struct {
// contains filtered or unexported fields
}
Alarm contains the necessary properties for testing *cloudwatch.MetricAlarm objects
func New ¶
func New(client client.ConfigProvider, metric *cloudwatch.Metric) *Alarm
New returns a new *Alarm
func (*Alarm) AlarmArn ¶
AlarmArn adds the AlarmArn filter to the filter list the AlarmArn filter: filters alarms by AlarmArn where 'arn' provided is the expected AlarmArn value
func (*Alarm) AlarmDescription ¶
AlarmDescription adds the AlarmDescription filter to the filter list the AlarmDescription filter: filters alarms by AlarmDescription where 'str' provided is the expected AlarmDescription value
func (*Alarm) AlarmName ¶
AlarmName adds the AlarmName filter to the filter list the AlarmName filter: filters alarms by AlarmName where 'str' provided is the expected AlarmName value
func (*Alarm) Assert ¶
func (a *Alarm) Assert(t *testing.T, alarms ...*cloudwatch.MetricAlarm) *Alarm
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 alarm if alarms is not provided, *cloudwatch.MetricAlarm objects will be retreived from AWS
func (*Alarm) ComparisonOperator ¶
ComparisonOperator adds the ComparisonOperator filter to the filter list the ComparisonOperator filter: filters alarms by ComparisonOperator where 'str' provided is the expected ComparisonOperator value
func (*Alarm) Description ¶
Description adds the Description filter as an alias to the AlarmDescription filter
func (*Alarm) EvaluationPeriods ¶
EvaluationPeriods adds the EvaluationPeriods filter to the filter list the EvaluationPeriods filter: filters alarms by EvaluationPeriods where 'i' provided is the expected EvaluationPeriods value
func (*Alarm) First ¶
func (a *Alarm) First(t *testing.T, alarms ...*cloudwatch.MetricAlarm) *Alarm
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 alarms is not provided, *cloudwatch.MetricAlarm objects will be retreived from AWS
func (*Alarm) Period ¶
Period adds the Period filter to the filter list the Period filter: filters alarms by Period where 'i' provided is the expected Period value
func (*Alarm) Selected ¶
func (a *Alarm) Selected() *cloudwatch.MetricAlarm
Selected returns the currently selected *cloudwatch.MetricAlarm
func (*Alarm) StateValue ¶
StateValue adds the StateValue filter to the filter list the StateValue filter: filters alarms by StateValue where 'str' provided is the expected StateValue value
func (*Alarm) Statistic ¶
Statistic adds the Statistic filter to the filter list the Statistic filter: filters alarms by Statistic where 'str' provided is the expected Statistic value
func (*Alarm) Threshold ¶
Threshold adds the Threshold filter to the filter list the Threshold filter: filters alarms by Threshold where 'i' provided is the expected Threshold value
func (*Alarm) TreatMissingData ¶
TreatMissingData adds the TreatMissingData filter to the filter list the TreatMissingData filter: filters alarms by TreatMissingData where 'str' provided is the expected TreatMissingData value