Implement general-purpose pagination functionality in KV API
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
Key hierarchies can grow to be quite large,and this introduces unnecessary and undesirable latencies during retrieval. It would be very nice if the KV API supported pagination. This could be done in a backwards-compatible fashion via query params (possibly something along the lines of)
```
/v1/kv/sample-key?start=0&end=10
```
Ordering would also generally be useful; adding
```
/v1/kv/sample-key?start=0&end=10&order=desc|asc
```
would sort the results by the lexicographical ordering of the keys under `sample-key`.
This could also be integrated consistently with `recurse` by performing a depth-first traversal of the keys in range `[start, end]` under the provided sort criterion and returning that set.
Thanks!
Josiah
Contributor guide
Assessment
This issue has not been assessed yet.