multiEmitter is an Emitter that forwards messages to multiple Emitters.
| 80 | |
| 81 | // multiEmitter is an Emitter that forwards messages to multiple Emitters. |
| 82 | type multiEmitter struct { |
| 83 | // mu protects emitters. |
| 84 | mu sync.Mutex |
| 85 | // emitters is initialized lazily in AddEmitter. |
| 86 | emitters map[Emitter]struct{} |
| 87 | } |
| 88 | |
| 89 | // Emit emits a message using all added emitters. |
| 90 | func (me *multiEmitter) Emit(msg proto.Message) (bool, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected