mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-11-15 16:50:16 +01:00
sdk: use a prefix iterator on kvdb for storing relay urls associated with ids.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user