alarm

package
v0.0.5-0...-3bd4ab3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2020 License: CC0-1.0 Imports: 7 Imported by: 0

Documentation

Overview

Package alarm the necessary properties for testing *cloudwatch.MetricAlarm objects

Index

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

func (a *Alarm) AlarmArn(arn string) *Alarm

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

func (a *Alarm) AlarmDescription(str string) *Alarm

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

func (a *Alarm) AlarmName(str string) *Alarm

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) Arn

func (a *Alarm) Arn(arn string) *Alarm

Arn adds the Arn filter as an alias to the AlarmArn filter

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

func (a *Alarm) ComparisonOperator(str string) *Alarm

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

func (a *Alarm) Description(arn string) *Alarm

Description adds the Description filter as an alias to the AlarmDescription filter

func (*Alarm) EvaluationPeriods

func (a *Alarm) EvaluationPeriods(i int64) *Alarm

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) Filter

func (a *Alarm) Filter(filter shared.Filter) *Alarm

Filter adds the 'filter' provided to the filter list

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) Name

func (a *Alarm) Name(arn string) *Alarm

Name adds the Name filter as an alias to the AlarmName filter

func (*Alarm) Period

func (a *Alarm) Period(i int64) *Alarm

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) State

func (a *Alarm) State(arn string) *Alarm

State adds the State filter as an alias to the StateValue filter

func (*Alarm) StateValue

func (a *Alarm) StateValue(str string) *Alarm

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

func (a *Alarm) Statistic(str string) *Alarm

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

func (a *Alarm) Threshold(f float64) *Alarm

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

func (a *Alarm) TreatMissingData(str string) *Alarm

TreatMissingData adds the TreatMissingData filter to the filter list the TreatMissingData filter: filters alarms by TreatMissingData where 'str' provided is the expected TreatMissingData value

func (*Alarm) Unit

func (a *Alarm) Unit(unit string) *Alarm

Unit adds the Unit filter to the filter list the Unit filter: filters alarms by Unit where 'unit' provunited is the expected Unit value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL