code: func (c *Client) Stop() {
  	c.mu.RLock()
  	if !c.running {
  		c.mu.RUnlock()
  		return
  	}
  	c.mu.RUnlock()
  
  	if c.healthcheckEnabled {
  		c.healthcheckStop <- true
  		<-c.healthcheckStop
  	}
  
  	if c.snifferEnabled {
  		c.snifferStop <- true
  		<-c.snifferStop
  	}
  
  	c.mu.Lock()
  	c.running = false
  	c.mu.Unlock()
  
  	c.infof("elastic: client stopped")
  }
docs: // Stop stops the background processes that the client is running,
  // i.e. sniffing the cluster periodically and running health checks
  // on the nodes.
  //
  // If the background processes are not running, this is a no-op.