Documentation ¶
Index ¶
- func CheckVmsCount(regions []string, prefix string) (int, error)
- func ClearTFBucket(name, region string) error
- func CloudWatchCheck(t *testing.T, awsRegions []string, prefix string, ...) bool
- func DeleteInstances(ctx context.Context, client *ec2.EC2, instanceIDs []string) error
- func DeleteTFBucket(name, region string) error
- func DetachASGInstances(ctx context.Context, client *autoscaling.AutoScaling, asgName string, ...) error
- func EnsureTFBucket(name, region string) (bool, error)
- func GetHealthyEc2InstanceIdsByTag(t *testing.T, region string, tagName string, tagValue string) []string
- func NLBCheck(t *testing.T, lbs []string, awsRegions []string, exposePrometheus bool) bool
- func SGCheck(t *testing.T, awsRegions []string, prefix string, ...) bool
- func SSMCheck(t *testing.T, awsRegions []string, prefix string) bool
- func VolumesCheck(t *testing.T, awsRegions []string, prefix string) bool
- type AgsGroups
- type AgsGroupsList
- type AsgInstancePair
- type AsgToInstancesByRegion
- type Validator
- func GetValidator(ctx context.Context, clients []*cloudwatch.CloudWatch, asgs AgsGroupsList, ...) (Validator, error)
- func WaitForValidator(ctx context.Context, clients []*cloudwatch.CloudWatch, asgs AgsGroupsList, ...) (Validator, error)
- func WaitForValidatorRegions(regions []string, metricNamespace, metricName, prefix string, timeout int, ...) (Validator, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearTFBucket ¶
ClearTFBucket ebsure TF bucket exists
func CloudWatchCheck ¶
func CloudWatchCheck(t *testing.T, awsRegions []string, prefix string, expectedAlertsPerRegion map[string]int) bool
CloudWatchCheck checks cloud watch
func DeleteInstances ¶
func DeleteTFBucket ¶
DeleteTFBucket clear and deleted bucket
func DetachASGInstances ¶
func DetachASGInstances(ctx context.Context, client *autoscaling.AutoScaling, asgName string, instanceIDs []string) error
func EnsureTFBucket ¶
EnsureTFBucket ebsure TF bucket exists
func GetHealthyEc2InstanceIdsByTag ¶
func GetHealthyEc2InstanceIdsByTag(t *testing.T, region string, tagName string, tagValue string) []string
GetHealthyEc2InstanceIdsByTag External function that returns a list of instance IDs that are running in given region
func SGCheck ¶
func SGCheck(t *testing.T, awsRegions []string, prefix string, exposePrometheus, exposeSSH bool) bool
SGCheck checks security groups
Types ¶
type AgsGroups ¶
type AgsGroups []*autoscaling.Group
func GetRegionASGs ¶
func GetRegionASGs(ctx context.Context, client *autoscaling.AutoScaling, prefix string) (AgsGroups, error)
func (AgsGroups) AsgInstancePair ¶
func (a AgsGroups) AsgInstancePair(regionID int) []AsgInstancePair
type AgsGroupsList ¶
type AgsGroupsList []AgsGroups
func GetASGs ¶
func GetASGs(ctx context.Context, clients []*autoscaling.AutoScaling, prefix string) (AgsGroupsList, error)
func (AgsGroupsList) AsgInstancePairs ¶
func (a AgsGroupsList) AsgInstancePairs() []AsgInstancePair
func (AgsGroupsList) GroupsCount ¶
func (a AgsGroupsList) GroupsCount() int
func (AgsGroupsList) InstancesCount ¶
func (a AgsGroupsList) InstancesCount() int
func (AgsGroupsList) InstancesCountPerRegion ¶
func (a AgsGroupsList) InstancesCountPerRegion() []int
type AsgInstancePair ¶
type AsgToInstancesByRegion ¶
func NewAsgInstancesByRegion ¶
func NewAsgInstancesByRegion(count int) AsgToInstancesByRegion
func (*AsgToInstancesByRegion) InstancesCount ¶
func (a *AsgToInstancesByRegion) InstancesCount() int
func (*AsgToInstancesByRegion) InstancesIDs ¶
func (a *AsgToInstancesByRegion) InstancesIDs() []string
type Validator ¶
type Validator struct { Value int AsgInstancePair }
func GetValidator ¶
func GetValidator( ctx context.Context, clients []*cloudwatch.CloudWatch, asgs AgsGroupsList, metricNamespace, metricName string, ) (Validator, error)
func WaitForValidator ¶
func WaitForValidator( ctx context.Context, clients []*cloudwatch.CloudWatch, asgs AgsGroupsList, metricNamespace, metricName string, period int, ) (Validator, error)
Click to show internal directories.
Click to hide internal directories.