MCPcopy
hub / github.com/mum4k/termdash / Event

Method Event

private/event/event.go:177–184  ·  view source on GitHub ↗

Event should be called with events coming from the terminal. The distribution system will distribute these to all the subscribers.

(ev terminalapi.Event)

Source from the content-addressed store, hash-verified

175// Event should be called with events coming from the terminal.
176// The distribution system will distribute these to all the subscribers.
177func (eds *DistributionSystem) Event(ev terminalapi.Event) {
178 eds.mu.Lock()
179 defer eds.mu.Unlock()
180
181 for _, sub := range eds.subscribers {
182 sub.event(ev)
183 }
184}
185
186// StopFunc when called unsubscribes the subscriber from all events and
187// releases resources tied to the subscriber.

Callers 7

TestKeyboardFunction · 0.95
TestMouseFunction · 0.95
TestUpdateFunction · 0.95
TestFocusTrackerMouseFunction · 0.95
TestDistributionSystemFunction · 0.95
TestProcessedFunction · 0.95

Calls 1

eventMethod · 0.80

Tested by 7

TestKeyboardFunction · 0.76
TestMouseFunction · 0.76
TestUpdateFunction · 0.76
TestFocusTrackerMouseFunction · 0.76
TestDistributionSystemFunction · 0.76
TestProcessedFunction · 0.76