MCPcopy
hub / github.com/cloudflare/cloudflared / dispatchEvents

Method dispatchEvents

connection/observer.go:110–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108}
109
110func (o *Observer) dispatchEvents() {
111 var sinks []EventSink
112 for {
113 select {
114 case sink := <-o.addSinkChan:
115 sinks = append(sinks, sink)
116 case evt := <-o.tunnelEventChan:
117 for _, sink := range sinks {
118 sink.OnTunnelEvent(evt)
119 }
120 }
121 }
122}
123
124type EventSinkFunc func(event Event)
125

Callers 1

NewObserverFunction · 0.95

Calls 1

OnTunnelEventMethod · 0.65

Tested by

no test coverage detected