sdk: use a prefix iterator on kvdb for storing relay urls associated with ids.

This commit is contained in:
fiatjaf
2025-01-16 10:25:00 -03:00
parent e1971d12c0
commit 4cf9631c28
6 changed files with 108 additions and 10 deletions

View File

@@ -13,4 +13,8 @@ type KVStore interface {
// Close releases any resources held by the store
Close() error
// Scan iterates through all keys with the given prefix.
// For each key-value pair, fn is called. If fn returns false, iteration stops.
Scan(prefix []byte, fn func(key []byte, value []byte) bool) error
}