SimplePageFunc adapts a context-less list function into one that accepts a context.
(fn func(opts metav1.ListOptions) (runtime.Object, error))
| 36 | |
| 37 | // SimplePageFunc adapts a context-less list function into one that accepts a context. |
| 38 | func SimplePageFunc(fn func(opts metav1.ListOptions) (runtime.Object, error)) ListPageFunc { |
| 39 | return func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { |
| 40 | return fn(opts) |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | // ListPager assists client code in breaking large list queries into multiple |
| 45 | // smaller chunks of PageSize or smaller. PageFn is expected to accept a |
no outgoing calls
no test coverage detected