code: func (s *Store) ConfigEntriesByKind(ws memdb.WatchSet, kind string) (uint64, []structs.ConfigEntry, error) {
  	tx := s.db.Txn(false)
  	defer tx.Abort()
  
  	// Get the index
  	idx := maxIndexTxn(tx, configTableName)
  
  	// Lookup by kind, or all if kind is empty
  	var iter memdb.ResultIterator
  	var err error
  	if kind != "" {
  		iter, err = tx.Get(configTableName, "kind", kind)
  	} else {
  		iter, err = tx.Get(configTableName, "id")
  	}
  	if err != nil {
  		return 0, nil, fmt.Errorf("failed config entry lookup: %s", err)
  	}
  	ws.Add(iter.WatchCh())
  
  	var results []structs.ConfigEntry
  	for v := iter.Next(); v != nil; v = iter.Next() {
  		results = append(results, v.(structs.ConfigEntry))
  	}
  	return idx, results, nil
  }
docs: // ConfigEntriesByKind is called to get all config entry objects with the given kind.
  // If kind is empty, all config entries will be returned.