Commit Graph

11 Commits

Author SHA1 Message Date
scott
6c7d1bc996 Add WithAlloc interface and stub implementations with base benchmarks
Kubernetes-commit: b8a3bd673dc61b4d7a0ad0f54fa423e0160078cf
2023-05-27 17:57:35 -04:00
Monis Khan
67030989c0 Check for context cancellation on each buffered chunk
TestListPager_EachListItem flakes without this change.

Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 7458ed01d6aa150b8a6046e0dbeba88d5d5ff1bb
2022-09-15 10:33:33 -04:00
Shaun Crampton
5754d8fddf client-go: Clear the ResourceVersionMatch on paged list calls
API server rejects continuations with ResourceVersionMatch set.

Kubernetes-commit: 8ac5e9b065cd9aef1543080cce1cf99cc8bb4ce9
2022-01-04 16:05:32 +00:00
wojtekt
0e2dbbf70a Switch pager to return whether the result was paginated
Kubernetes-commit: 5dcf08c1993718e94cf6537af50e0a411dd2878c
2020-01-28 09:39:27 +01:00
Mateusz Matejczyk
d7b4c23325 pager.go: Don't set ResourveVersion on subsequent List calls
Ref. https://github.com/kubernetes/kubernetes/issues/85221#issuecomment-553748143

Kubernetes-commit: 977ca43d640d2a85e199a8a282e2df8ebd88055a
2019-11-14 11:34:59 +01:00
Joe Betz
54033229aa Handle expired errors with RV>0 in pager, don't full list if 1st page is expired
Kubernetes-commit: 1f3dc14eea231c90819cbba06f25cb4221236b3f
2019-10-04 17:08:22 -07:00
Joe Betz
24499f0573 Add pager.EachPageItem utility function to incrementally process lists
Kubernetes-commit: 6a64ee638780de4dcfa2ab2b4fc739dd23127c49
2019-03-28 15:39:14 -07:00
hzxuzhonghu
1e55c20903 Replace "golang.org/x/net/context" with "context"
Kubernetes-commit: 70e45eccf27726f0e63dd1024924ccc7e2cd35a0
2018-02-28 12:20:22 +08:00
Clayton Coleman
f549520368 Disable default paging in list watches
For 1.8 this will be off by default. In 1.9 it will be on by default.
Add tests and rename some fields to use the `chunking` terminology.

Note that the pager may be used for other things besides chunking.

Kubernetes-commit: 8b571bb63bd8a9a6a37db6046a6ab35d3b047bf4
2017-09-09 21:30:07 +00:00
Clayton Coleman
6adf847055 Server side implementation of paging for etcd3
Add a feature gate in the apiserver to control whether paging can be
used. Add controls to the storage factory that allow it to be disabled
per resource. Use a JSON encoded continuation token that can be
versioned. Create a 410 error if the continuation token is expired.

Adds GetContinue() to ListMeta.

Kubernetes-commit: 8952a0cb722b77459cf2701632a30f5b264f5aba
2017-09-03 13:49:07 +00:00
Clayton Coleman
7b48f37a96 Add a new paging utility for client side ranging
Kubernetes-commit: fb68d1d3a7bfb69f3884db6d360816fb2e7eda1e
2017-09-03 13:49:07 +00:00