MCPcopy Create free account
hub / github.com/CPChain/chain / newNotifier

Function newNotifier

api/rpc/subscription.go:62–68  ·  view source on GitHub ↗

newNotifier creates a new notifier that can be used to send subscription notifications to the client.

(codec ServerCodec)

Source from the content-addressed store, hash-verified

60// newNotifier creates a new notifier that can be used to send subscription
61// notifications to the client.
62func 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.
71func NotifierFromContext(ctx context.Context) (*Notifier, bool) {

Callers 1

serveRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected