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

[ISSUE] Allow to consume only N items from the Events API #380

Closed
alexott opened this issue Oct 22, 2020 · 2 comments · Fixed by #384
Closed

[ISSUE] Allow to consume only N items from the Events API #380

alexott opened this issue Oct 22, 2020 · 2 comments · Fixed by #384
Assignees

Comments

@alexott
Copy link
Contributor

alexott commented Oct 22, 2020

Right now, cluster.Events call specifies the limit, but still collects all events from the REST API, as the limit parameter specifies the number of the items per page, not the total limit. It would be useful to add a parameter to the call that will specify the maximal number of events to retrieve...

@alexott alexott self-assigned this Oct 22, 2020
@nfx
Copy link
Contributor

nfx commented Oct 22, 2020

@alexott technically we just need the last state, correct? maybe we can simplify the code just to return the first page.

@alexott
Copy link
Contributor Author

alexott commented Oct 22, 2020

Yes, that's what I want to implement - current implementation is generic, planned for future use.

alexott added a commit that referenced this issue Oct 23, 2020
…384)

Right now, Cluster Events API doesn't allow to specify maximal number of items to fetch -
the existing `limit` parameter specifies the number of the items per page, not max count,
so this limit should enforced on the caller's site.

this fixes #380
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

Successfully merging a pull request may close this issue.

2 participants