-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(pubsub): add list configs for topic & sub #4607
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but another pubsub reviewer might want to approve
@hongalex I just tried to pick this up in my app, and ... I realized I missed something pretty important in my original suggestion: the What do you think about adding a |
Oof, yeah you're totally right. I think the original intent for Topic/SubscriptionConfig was purely for storing config (regardless of the actual topic/config it is associated with). I'll draft up a fix for this today. Thanks for reporting as always! |
@hongalex guessing this got lost in the shuffle (no hard feelings!). Want me to put an issue up for the followup fix? |
@mgabeler-lee-6rs apologies, indeed I created a starting point but slipped through the radar. I just created #4952 to track this better. |
When calling
client.Topics
andclient.Subscriptions
, you get back an iterator that allows you to iterate over all resources. However, this gives you the actualTopic
andSubscription
struct that's defined by the library and does not list configs, which currently need to be retrieved from an additionalconfig
call. This addsNextConfig
to bothTopic/SubscriptionIterator
so that the config can be viewed instead ofTopic/Subscription
. This is the desired behavior, and is used forSchemaConfig
as well as topic/subscription configs in Pub/Sub Lite.Thanks to @mgabeler-lee-6rs for suggesting this.
Closes #4559