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.
(fn ListPageFunc)
| 59 | // options. It will fall back to a full list if an expiration error is encountered |
| 60 | // as a last resort. |
| 61 | func New(fn ListPageFunc) *ListPager { |
| 62 | return &ListPager{ |
| 63 | PageSize: defaultPageSize, |
| 64 | PageFn: fn, |
| 65 | FullListIfExpired: true, |
| 66 | PageBufferSize: defaultPageBufferSize, |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | // TODO: introduce other types of paging functions - such as those that retrieve from a list |
| 71 | // of namespaces. |
no outgoing calls
no test coverage detected