-
Notifications
You must be signed in to change notification settings - Fork 12
implement pagination for aws rrs and lb #34
Conversation
break | ||
} | ||
|
||
records = append(records, rsp.ResourceRecordSets...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you can use this helper method to do the pagination.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -14,6 +17,9 @@ type LoadBalancer struct { | |||
CanonicalZoneID string | |||
} | |||
|
|||
//LoadBalancerExtractor is a func type which is extract Classic and Application Loadbalancer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: which is extract
=> which extracts
maybe? also explain the use case (e.g. extract from what)
}) | ||
} | ||
|
||
if aws.StringValue(resp.NextMarker) == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this pagination helper could get rid of the manual marker stuff https://godoc.org/github.com/aws/aws-sdk-go/service/elb#ELB.DescribeLoadBalancersPages
if aws.StringValue(resp.NextMarker) == "" { | ||
break | ||
} | ||
params.SetMarker(aws.StringValue(resp.NextMarker)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return result, nil | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stray line :)
@linki thanks for the review, added the changes to use aws-sdk to implement pagination |
👍 |
No description provided.