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

Method EachListItem

tools/pager/pager.go:140–144  ·  view source on GitHub ↗

EachListItem fetches runtime.Object items using this ListPager and invokes fn on each item. If fn returns an error, processing stops and that error is returned. If fn does not return an error, any error encountered while retrieving the list from the server is returned. If the context cancels or time

(ctx context.Context, options metav1.ListOptions, fn func(obj runtime.Object) error)

Source from the content-addressed store, hash-verified

138// Items are retrieved in chunks from the server to reduce the impact on the server with up to
139// ListPager.PageBufferSize chunks buffered concurrently in the background.
140func (p *ListPager) EachListItem(ctx context.Context, options metav1.ListOptions, fn func(obj runtime.Object) error) error {
141 return p.eachListChunkBuffered(ctx, options, func(obj runtime.Object) error {
142 return meta.EachListItem(obj, fn)
143 })
144}
145
146// eachListChunkBuffered fetches runtimeObject list chunks using this ListPager and invokes fn on
147// each list chunk. If fn returns an error, processing stops and that error is returned. If fn does

Callers 2

ListMethod · 0.80

Calls 1

eachListChunkBufferedMethod · 0.95

Tested by 1