code: func (s *Store) kvsGetTxn(tx *memdb.Txn, ws memdb.WatchSet, key string) (uint64, *structs.DirEntry, error) {
  	// Get the table index.
  	idx := maxIndexTxn(tx, "kvs", "tombstones")
  
  	// Retrieve the key.
  	watchCh, entry, err := tx.FirstWatch("kvs", "id", key)
  	if err != nil {
  		return 0, nil, fmt.Errorf("failed kvs lookup: %s", err)
  	}
  	ws.Add(watchCh)
  	if entry != nil {
  		return idx, entry.(*structs.DirEntry), nil
  	}
  	return idx, nil, nil
  }
docs: // kvsGetTxn is the inner method that gets a KVS entry inside an existing
  // transaction.