code: func ScanMetaWithPrefix(retriever kv.Retriever, prefix kv.Key, filter func(kv.Key, []byte) bool) error {
  	iter, err := retriever.Iter(prefix, prefix.PrefixNext())
  	if err != nil {
  		return errors.Trace(err)
  	}
  	defer iter.Close()
  
  	for {
  		if err != nil {
  			return errors.Trace(err)
  		}
  
  		if iter.Valid() && iter.Key().HasPrefix(prefix) {
  			if !filter(iter.Key(), iter.Value()) {
  				break
  			}
  			err = iter.Next()
  			if err != nil {
  				return errors.Trace(err)
  			}
  		} else {
  			break
  		}
  	}
  
  	return nil
  }
docs: // ScanMetaWithPrefix scans metadata with the prefix.