-
Notifications
You must be signed in to change notification settings - Fork 12
implement pagination for aws rrs and lb #34
Conversation
pkg/aws/client.go
Outdated
| 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.
👍
pkg/aws/elb.go
Outdated
| 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)
pkg/aws/elb.go
Outdated
| }) | ||
| } | ||
|
|
||
| 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
pkg/aws/elb.go
Outdated
| 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.
pkg/aws/elb.go
Outdated
| } | ||
|
|
||
| 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.