MCPcopy
hub / github.com/kubernetes/client-go / SimplePageFunc

Function SimplePageFunc

tools/pager/pager.go:38–42  ·  view source on GitHub ↗

SimplePageFunc adapts a context-less list function into one that accepts a context.

(fn func(opts metav1.ListOptions) (runtime.Object, error))

Source from the content-addressed store, hash-verified

36
37// SimplePageFunc adapts a context-less list function into one that accepts a context.
38func 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

Callers 2

ListMethod · 0.92
ListAndWatchMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected