code: func (s *Store) NodesByMeta(ws memdb.WatchSet, filters map[string]string) (uint64, structs.Nodes, error) {
  	tx := s.db.Txn(false)
  	defer tx.Abort()
  
  	// Get the table index.
  	idx := maxIndexTxn(tx, "nodes")
  
  	// Retrieve all of the nodes
  	var args []interface{}
  	for key, value := range filters {
  		args = append(args, key, value)
  		break
  	}
  	nodes, err := tx.Get("nodes", "meta", args...)
  	if err != nil {
  		return 0, nil, fmt.Errorf("failed nodes lookup: %s", err)
  	}
  	ws.Add(nodes.WatchCh())
  
  	// Create and return the nodes list.
  	var results structs.Nodes
  	for node := nodes.Next(); node != nil; node = nodes.Next() {
  		n := node.(*structs.Node)
  		if len(filters) <= 1 || structs.SatisfiesMetaFilters(n.Meta, filters) {
  			results = append(results, n)
  		}
  	}
  	return idx, results, nil
  }
docs: // NodesByMeta is used to return all nodes with the given metadata key/value pairs.