Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iterators to unified resource cache #52103

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rosstimothy
Copy link
Contributor

This updates the UnifiedResourceCache with IterateResources as an alternative to IterateUnifiedResources. The new function returns an iterator instead of collecting and returning a page of results. While this API may not entirely replace the current one, it offers a better way for users that just want to iterate resources without collecting them. Additionally, a few helper methods were included for callers that might wish to only iterate one specific resource type. Internally the UnifiedResourceCache was refactored to use the same logic for all exposed iteration methods.

@rosstimothy rosstimothy added the no-changelog Indicates that a PR does not require a changelog entry label Feb 12, 2025
This updates the UnifiedResourceCache with IterateResources as an
alternative to IterateUnifiedResources. The new function returns
an iterator instead of collecting and returning a page of results.
While this API may not entirely replace the current one, it offers
a better way for users that just want to iterate resources without
collecting them. Additionally, a few helper methods were included
for callers that might wish to only iterate one specific resource
type. Internally the UnifiedResourceCache was refactored to use the
same logic for all exposed iteration methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant