MCPcopy Create free account
hub / github.com/google/go-cloud / URLOpener

Struct URLOpener

pubsub/gcppubsub/gcppubsub.go:195–204  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

193//
194// Currently their use is limited to subscribers.
195type 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.
207func (o *URLOpener) OpenTopicURL(ctx context.Context, u *url.URL) (*pubsub.Topic, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected