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

Method OpenTopicURL

pubsub/pubsub.go:905–911  ·  view source on GitHub ↗

OpenTopicURL dispatches the URL to the opener that is registered with the URL's scheme. OpenTopicURL is safe to call from multiple goroutines.

(ctx context.Context, u *url.URL)

Source from the content-addressed store, hash-verified

903// OpenTopicURL dispatches the URL to the opener that is registered with the
904// URL's scheme. OpenTopicURL is safe to call from multiple goroutines.
905func (mux *URLMux) OpenTopicURL(ctx context.Context, u *url.URL) (*Topic, error) {
906 opener, err := mux.topicSchemes.FromURL("Topic", u)
907 if err != nil {
908 return nil, err
909 }
910 return opener.(TopicURLOpener).OpenTopicURL(ctx, u)
911}
912
913// OpenSubscriptionURL dispatches the URL to the opener that is registered with the
914// URL's scheme. OpenSubscriptionURL is safe to call from multiple goroutines.

Callers

nothing calls this directly

Calls 2

FromURLMethod · 0.80
OpenTopicURLMethod · 0.65

Tested by

no test coverage detected