OpenSubscription calls OpenSubscriptionURL with the URL parsed from urlstr. OpenSubscription is safe to call from multiple goroutines.
(ctx context.Context, urlstr string)
| 893 | // OpenSubscription calls OpenSubscriptionURL with the URL parsed from urlstr. |
| 894 | // OpenSubscription is safe to call from multiple goroutines. |
| 895 | func (mux *URLMux) OpenSubscription(ctx context.Context, urlstr string) (*Subscription, error) { |
| 896 | opener, u, err := mux.subscriptionSchemes.FromString("Subscription", urlstr) |
| 897 | if err != nil { |
| 898 | return nil, err |
| 899 | } |
| 900 | return opener.(SubscriptionURLOpener).OpenSubscriptionURL(ctx, u) |
| 901 | } |
| 902 | |
| 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. |