newNotifier creates a new notifier that can be used to send subscription notifications to the client.
(codec ServerCodec)
| 60 | // newNotifier creates a new notifier that can be used to send subscription |
| 61 | // notifications to the client. |
| 62 | func newNotifier(codec ServerCodec) *Notifier { |
| 63 | return &Notifier{ |
| 64 | codec: codec, |
| 65 | active: make(map[ID]*Subscription), |
| 66 | inactive: make(map[ID]*Subscription), |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | // NotifierFromContext returns the Notifier value stored in ctx, if any. |
| 71 | func NotifierFromContext(ctx context.Context) (*Notifier, bool) { |