code: func (p *ListPager) eachListChunk(ctx context.Context, options metav1.ListOptions, fn func(obj runtime.Object) error) error {
  	if options.Limit == 0 {
  		options.Limit = p.PageSize
  	}
  	for {
  		select {
  		case <-ctx.Done():
  			return ctx.Err()
  		default:
  		}
  
  		obj, err := p.PageFn(ctx, options)
  		if err != nil {
  			return err
  		}
  		m, err := meta.ListAccessor(obj)
  		if err != nil {
  			return fmt.Errorf("returned object must be a list: %v", err)
  		}
  		if err := fn(obj); err != nil {
  			return err
  		}
  		// if we have no more items, return.
  		if len(m.GetContinue()) == 0 {
  			return nil
  		}
  		// set the next loop up
  		options.Continue = m.GetContinue()
  	}
  }
docs: // eachListChunk fetches runtimeObject list chunks using this ListPager and invokes fn on each list
  // chunk. 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 times out, the context error is returned. Since the list is retrieved in
  // paginated chunks, an "Expired" error (metav1.StatusReasonExpired) may be returned if the
  // pagination list requests exceed the expiration limit of the apiserver being called.