Skip to content

Commit 55a8e7c

Browse files
authored
Merge pull request #875 from alexandreliberato/refact/move-autoscaling-group-client-interface
refact: move interface
2 parents 2ea2c90 + ec97233 commit 55a8e7c

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

providers/aws/ec2/autoscaling_groups.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ import (
1515

1616
const AWS_SERVICE_NAME_ASG = "AutoScalingGroup"
1717

18+
type AutoScalingGroupClient interface {
19+
DescribeAutoScalingGroups(
20+
ctx context.Context,
21+
params *autoscaling.DescribeAutoScalingGroupsInput,
22+
optFns ...func(*autoscaling.Options),
23+
) (*autoscaling.DescribeAutoScalingGroupsOutput, error)
24+
}
25+
1826
func AutoScalingGroups(ctx context.Context, clientProvider ProviderClient) ([]Resource, error) {
1927
client := autoscaling.NewFromConfig(*clientProvider.AWSClient)
2028

@@ -36,7 +44,6 @@ type ASGDiscoverer struct {
3644
}
3745

3846
func (d ASGDiscoverer) Discover() ([]Resource, error) {
39-
4047
resources := make([]Resource, 0)
4148
var queryInput autoscaling.DescribeAutoScalingGroupsInput
4249

providers/aws/ec2/autoscaling_groups_client.go

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)