pubsub: list subscription configs, not just names #4559
Labels
api: pubsub
Issues related to the Pub/Sub API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
I have a use case for listing subscriptions where I want to check information in the
SubscriptionConfig
object. The underlying gRPCListSubscriptions
call includes this information (or at least the portion I need -- I'm not entirely sure if it includes everything needed to form a SubscriptionConfig?), but the way it is exposed via theSubscriptions
API onpubsub.Client
and the resulting iterator it returns discards all this information (https://github.com/googleapis/google-cloud-go/blob/master/pubsub/subscription.go#L90-L96), and requires a second gRPC call for each subscription to re-acquire it!Describe the solution you'd like
A couple possible solutions present themselves:
ListSubscriptionConfigs
API onpubsub.Client
that returns an iterator exposingSubscriptionConfig
s instead ofSubscription
sNextConfig()
method onSubscriptionIterator
Describe alternatives you've considered
The workaround of calling
Config()
on everySubscription
returned works, but is inefficientThe text was updated successfully, but these errors were encountered: