Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 16, 2019. It is now read-only.

Conversation

@ideahitme
Copy link
Contributor

No description provided.

break
}

records = append(records, rsp.ResourceRecordSets...)
Copy link
Owner

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.

Copy link
Contributor Author

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
Copy link
Owner

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) == "" {
Copy link
Owner

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))
Copy link
Owner

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

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stray line :)

@ideahitme
Copy link
Contributor Author

@linki thanks for the review, added the changes to use aws-sdk to implement pagination

@linki
Copy link
Owner

linki commented Jan 3, 2017

👍

@linki linki merged commit 91525ed into master Jan 3, 2017
@ideahitme ideahitme deleted the pagination branch January 27, 2017 18:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants