NotifierFromContext returns the Notifier value stored in ctx, if any.
(ctx context.Context)
| 69 | |
| 70 | // NotifierFromContext returns the Notifier value stored in ctx, if any. |
| 71 | func NotifierFromContext(ctx context.Context) (*Notifier, bool) { |
| 72 | n, ok := ctx.Value(notifierKey{}).(*Notifier) |
| 73 | return n, ok |
| 74 | } |
| 75 | |
| 76 | // CreateSubscription returns a new subscription that is coupled to the |
| 77 | // RPC connection. By default subscriptions are inactive and notifications |