MCPcopy
hub / github.com/tmrts/go-patterns / eventNotifier

Struct eventNotifier

behavioral/observer/main.go:47–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 }
46
47 eventNotifier struct{
48 // Using a map with an empty struct allows us to keep the observers
49 // unique while still keeping memory usage relatively low.
50 observers map[Observer]struct{}
51 }
52)
53
54func (o *eventObserver) OnNotify(e Event) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected