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

Implement pagination and fix resourceVersion in storage.GetList method #52

Open
fabriziosestito opened this issue Dec 2, 2024 · 0 comments

Comments

@fabriziosestito
Copy link
Collaborator

We want to implement pagination in the GetList method.

When the user sends opts.Predicate.Limit true we will need to generate a continue token and limit the number of items we return.
If the user sends a continue token, we will need to parse it and return to the next page until there is nothing more to return.

Use https://github.com/kubernetes/apiserver/blob/master/pkg/storage/etcd3/store.go as a reference implementation.

Moreover, we will need to implement the list resourceVersion
For instance, grafana uses snowflake IDs https://github.com/intergral/grafana/blob/2f390b310c1eec9d9cb7ee8459090d5dc19d3c02/pkg/apiserver/storage/file/file.go#L92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant