Documentation
¶
Index ¶
- Variables
- type DB
- func (db *DB) Delete(key string) error
- func (db *DB) Get(key string) (any, error)
- func (db *DB) List(prefix string) ([]string, error)
- func (db *DB) Set(key string, doc any) error
- func (db *DB) SetWithRetry(key string, doc any, retries int) error
- func (db *DB) Update(key string, apply func(existing any) (any, error), retries int) (any, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConcurrentMod = errors.New("concurrent modification")
ErrConcurrentMod is returned by if the key is concurrently modified.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is a file-based database.
func (*DB) SetWithRetry ¶
SetWithRetry sets the document for the given key, retrying the given number of times if the key is concurrently modified.
Click to show internal directories.
Click to hide internal directories.