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

Method OpenSubscriptionURL

pubsub/pubsub.go:915–921  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

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.
915func (mux *URLMux) OpenSubscriptionURL(ctx context.Context, u *url.URL) (*Subscription, error) {
916 opener, err := mux.subscriptionSchemes.FromURL("Subscription", u)
917 if err != nil {
918 return nil, err
919 }
920 return opener.(SubscriptionURLOpener).OpenSubscriptionURL(ctx, u)
921}
922
923var defaultURLMux = &URLMux{}
924

Callers

nothing calls this directly

Calls 2

FromURLMethod · 0.80
OpenSubscriptionURLMethod · 0.65

Tested by

no test coverage detected