Skip to content

Commit

Permalink
Merge pull request #875 from alexandreliberato/refact/move-autoscalin…
Browse files Browse the repository at this point in the history
…g-group-client-interface

refact: move interface
  • Loading branch information
mlabouardy committed Jun 30, 2023
2 parents 2ea2c90 + ec97233 commit 55a8e7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
9 changes: 8 additions & 1 deletion providers/aws/ec2/autoscaling_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ import (

const AWS_SERVICE_NAME_ASG = "AutoScalingGroup"

type AutoScalingGroupClient interface {
DescribeAutoScalingGroups(
ctx context.Context,
params *autoscaling.DescribeAutoScalingGroupsInput,
optFns ...func(*autoscaling.Options),
) (*autoscaling.DescribeAutoScalingGroupsOutput, error)
}

func AutoScalingGroups(ctx context.Context, clientProvider ProviderClient) ([]Resource, error) {
client := autoscaling.NewFromConfig(*clientProvider.AWSClient)

Expand All @@ -36,7 +44,6 @@ type ASGDiscoverer struct {
}

func (d ASGDiscoverer) Discover() ([]Resource, error) {

resources := make([]Resource, 0)
var queryInput autoscaling.DescribeAutoScalingGroupsInput

Expand Down
15 changes: 0 additions & 15 deletions providers/aws/ec2/autoscaling_groups_client.go

This file was deleted.

0 comments on commit 55a8e7c

Please sign in to comment.