code: func (c *Client) sniffNode(ctx context.Context, url string) []*conn {
  	var nodes []*conn
  
  	// Call the Nodes Info API at /_nodes/http
  	req, err := NewRequest("GET", url+"/_nodes/http")
  	if err != nil {
  		return nodes
  	}
  
  	c.mu.RLock()
  	if c.basicAuth {
  		req.SetBasicAuth(c.basicAuthUsername, c.basicAuthPassword)
  	}
  	c.mu.RUnlock()
  
  	res, err := c.c.Do((*http.Request)(req).WithContext(ctx))
  	if err != nil {
  		return nodes
  	}
  	if res == nil {
  		return nodes
  	}
  
  	if res.Body != nil {
  		defer res.Body.Close()
  	}
  
  	var info NodesInfoResponse
  	if err := json.NewDecoder(res.Body).Decode(&info); err == nil {
  		if len(info.Nodes) > 0 {
  			for nodeID, node := range info.Nodes {
  				if c.snifferCallback(node) {
  					if node.HTTP != nil && len(node.HTTP.PublishAddress) > 0 {
  						url := c.extractHostname(c.scheme, node.HTTP.PublishAddress)
  						if url != "" {
  							nodes = append(nodes, newConn(nodeID, url))
  						}
  					}
  				}
  			}
  		}
  	}
  	return nodes
  }
docs: // sniffNode sniffs a single node. This method is run as a goroutine
  // in sniff. If successful, it returns the list of node URLs extracted
  // from the result of calling Nodes Info API. Otherwise, an empty array
  // is returned.