Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metal] pagination should offer early escape criteria #13

Open
displague opened this issue Dec 20, 2023 · 1 comment
Open

[Metal] pagination should offer early escape criteria #13

displague opened this issue Dec 20, 2023 · 1 comment

Comments

@displague
Copy link
Member

displague commented Dec 20, 2023

When using client-side filtering against a paginated resource list, the pagination helpers could accept criteria functions to determine if pagination can be concluded early.

If there are 1000 devices that I need to sift through to find the one with a particular set of tags (kubernetes-sigs/cluster-api-provider-packet#630), I should be able to take advantage of pagination helpers and not request 100 pages of data if my single desired matching result was found on page 1.

See related packngo issue equinixmetal-archive/packngo#206

@ctreatma
Copy link
Contributor

In the event that a user doesn't want the automatic pagination provided by ExecuteWithPagination, they always have the option of using the Execute method instead and navigating the pages as they see fit.

@ctreatma ctreatma changed the title Metal pagination should offer early escape criteria [Metal] pagination should offer early escape criteria Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants