code: func (s *LocalSupervisor) BroadcastEvent(event Event) {
  	s.Lock()
  	defer s.Unlock()
  
  	switch event.Name {
  	case TeleportExitEvent:
  		s.signalExit()
  	case TeleportReloadEvent:
  		s.signalReload()
  	}
  
  	s.events[event.Name] = event
  
  	// Log all events other than recovered events to prevent the logs from
  	// being flooded.
  	if event.String() != TeleportOKEvent {
  		log.WithFields(logrus.Fields{"event": event.String(), trace.Component: teleport.Component(teleport.ComponentProcess, s.id)}).Debugf("Broadcasting event.")
  	}
  
  	go func() {
  		select {
  		case s.eventsC <- event:
  		case <-s.closeContext.Done():
  			return
  		}
  	}()
  
  	for _, m := range s.eventMappings {
  		if m.matches(event.Name, s.events) {
  			mappedEvent := Event{Name: m.Out}
  			s.events[mappedEvent.Name] = mappedEvent
  			go func(e Event) {
  				select {
  				case s.eventsC <- e:
  				case <-s.closeContext.Done():
  					return
  				}
  			}(mappedEvent)
  			log.WithFields(logrus.Fields{"in": event.String(), "out": m.String(), trace.Component: teleport.Component(teleport.ComponentProcess, s.id)}).Debugf("Broadcasting mapped event.")
  		}
  	}
  }
docs: // BroadcastEvent generates event and broadcasts it to all
  // subscribed parties.