code: func (a *Autopilot) run() {
  	defer a.waitGroup.Done()
  
  	// Monitor server health until shutdown
  	ticker := time.NewTicker(a.interval)
  	defer ticker.Stop()
  
  	for {
  		select {
  		case <-a.shutdownCh:
  			return
  		case <-ticker.C:
  			if err := a.promoteServers(); err != nil {
  				a.logger.Printf("[ERR] autopilot: Error promoting servers: %v", err)
  			}
  
  			if err := a.pruneDeadServers(); err != nil {
  				a.logger.Printf("[ERR] autopilot: Error checking for dead servers to remove: %s", err)
  			}
  		case <-a.removeDeadCh:
  			if err := a.pruneDeadServers(); err != nil {
  				a.logger.Printf("[ERR] autopilot: Error checking for dead servers to remove: %s", err)
  			}
  		}
  	}
  }
docs: // run periodically looks for nonvoting servers to promote and dead servers to remove.