mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-11-15 16:50:16 +01:00
sdk: actually no, let's store all relay urls together in the same kvdb key.
This commit is contained in:
@@ -14,7 +14,9 @@ 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
|
||||
// Update atomically modifies a value for a given key.
|
||||
// The function f receives the current value (nil if not found)
|
||||
// and returns the new value to be set.
|
||||
// If f returns nil, the key is deleted.
|
||||
Update(key []byte, f func([]byte) ([]byte, error)) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user