URLOpener opens GCP Pub/Sub URLs like "gcppubsub://projects/myproject/topics/mytopic" for topics or "gcppubsub://projects/myproject/subscriptions/mysub" for subscriptions. The shortened forms "gcppubsub://myproject/mytopic" for topics or "gcppubsub://myproject/mysub" for subscriptions are also supp
| 193 | // |
| 194 | // Currently their use is limited to subscribers. |
| 195 | type URLOpener struct { |
| 196 | // Conn must be set to a non-nil ClientConn authenticated with |
| 197 | // Cloud Pub/Sub scope or equivalent. |
| 198 | Conn *grpc.ClientConn |
| 199 | |
| 200 | // TopicOptions specifies the options to pass to OpenTopic. |
| 201 | TopicOptions TopicOptions |
| 202 | // SubscriptionOptions specifies the options to pass to OpenSubscription. |
| 203 | SubscriptionOptions SubscriptionOptions |
| 204 | } |
| 205 | |
| 206 | // OpenTopicURL opens a pubsub.Topic based on u. |
| 207 | func (o *URLOpener) OpenTopicURL(ctx context.Context, u *url.URL) (*pubsub.Topic, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected