Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListPageFunc ¶
ListPageFunc returns a list object for the given list options.
func SimplePageFunc ¶
func SimplePageFunc(fn func(opts metav1.ListOptions) (runtime.Object, error)) ListPageFunc
SimplePageFunc adapts a context-less list function into one that accepts a context.
type ListPager ¶
type ListPager struct { PageSize int64 PageFn ListPageFunc FullListIfExpired bool }
ListPager assists client code in breaking large list queries into multiple smaller chunks of PageSize or smaller. PageFn is expected to accept a metav1.ListOptions that supports paging and return a list. The pager does not alter the field or label selectors on the initial options list.
func New ¶
func New(fn ListPageFunc) *ListPager
New creates a new pager from the provided pager function using the default options. It will fall back to a full list if an expiration error is encountered as a last resort.
func (*ListPager) List ¶
List returns a single list object, but attempts to retrieve smaller chunks from the server to reduce the impact on the server. If the chunk attempt fails, it will load the full list instead. The Limit field on options, if unset, will default to the page size.