code: func (a *Agent) ingestUserEvent(msg *UserEvent) {
  	// Special handling for internal events
  	switch msg.Name {
  	case remoteExecName:
  		if a.config.DisableRemoteExec {
  			a.logger.Printf("[INFO] agent: ignoring remote exec event (%s), disabled.", msg.ID)
  		} else {
  			go a.handleRemoteExec(msg)
  		}
  		return
  	default:
  		a.logger.Printf("[DEBUG] agent: new event: %s (%s)", msg.Name, msg.ID)
  	}
  
  	a.eventLock.Lock()
  	defer func() {
  		a.eventLock.Unlock()
  		a.eventNotify.Notify()
  	}()
  
  	idx := a.eventIndex
  	a.eventBuf[idx] = msg
  	a.eventIndex = (idx + 1) % len(a.eventBuf)
  }
docs: // ingestUserEvent is used to process an event that passes filtering