(evt Event)
| 98 | } |
| 99 | |
| 100 | func (rg *Static) broadcast(evt Event) { |
| 101 | ctx := evt.GetContext() |
| 102 | |
| 103 | log.WithContext(ctx).DebugContext(ctx, "broadcasting event", |
| 104 | slog.String("event", fmt.Sprintf("%T", evt)), |
| 105 | ) |
| 106 | |
| 107 | for _, ch := range rg.listeners { |
| 108 | ch <- evt |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | // SendEvent allows external components to send events to all listeners. |
| 113 | func (rg *Static) SendEvent(evt Event) { |
no test coverage detected