code: func (a *agent) Wait() error {
  	if a.stopCh == nil {
  		err := errors.New("attempted to wait on an agent that wasn't Started")
  		agentLogger.Error(err)
  		return err
  	}
  	<-a.stopCh
  
  	// If we get here, a.Stop() has already been called, and we are simply
  	// retrieving the error if any squirreled away by stopOnce
  	return a.Stop()
  }
docs: // Wait will not return until a SIGINT, SIGTERM, or SIGKILL is received
  // Or the Agent is Stopped
  // All Plugins are Closed() before Wait returns