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

Suggestion wrt paging #15

Open
xgillard opened this issue Aug 18, 2021 · 1 comment
Open

Suggestion wrt paging #15

xgillard opened this issue Aug 18, 2021 · 1 comment

Comments

@xgillard
Copy link

As mentioned in the subject, this is not an issue; rather is it a suggestion related to issue #5 which is closed since quite a bit of time now.

I think that in order to improve the ergonomics of the crate, it might be worth it to just hide the fact that some paging occurs under the hood and fetch data on demand. That is, rather than returning a collection of events, the api would return a stream of events (we're using async+tokio anyways).

Should it be of any interest to you or the apca users community, I readily have a generic working solution for this issue in apca_datav2 (look at PagedStream<T> lines 266+ in this file).

If you don't like the idea, I'd totally understand that you'd just reject/close this issue.

@d-e-s-o
Copy link
Owner

d-e-s-o commented Aug 18, 2021

👍 I think that's a good suggestion and would make sense to include as well, given that more pieces of functionality will use paging with your changes.

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