package store
import "go.dedis.ch/dela/core/store"
Package store defines the primitives of a simple key/value storage.
Documentation Last Review: 08.10.2020
Index ¶
Types ¶
type Readable ¶
Readable is the interface for a readable store.
type Snapshot ¶
Snapshot is a state of the store that can be read and write independently. A write is applied only to the snapshot reference.
type Transaction ¶
type Transaction interface { // OnCommit adds a callback to be executed after the transaction // successfully commits. OnCommit(func()) }
Transaction is a generic interface that store implementations can use to provide atomicity.
type Writable ¶
type Writable interface { Set(key []byte, value []byte) error // Delete deletes a given key. // It can return an error if deleting from a read-only store // No error is returned if the key does not exist. Delete(key []byte) error }
Writable is the interface for a writable store.
Source Files ¶
store.go
Directories ¶
Path | Synopsis |
---|---|
core/store/hashtree | Package hashtree defines the specialization of the store as a Merkle tree. |
core/store/hashtree/binprefix | Package binprefix implements the hash tree interface by following the merkle binary prefix tree algorithm. |
core/store/kv | Package kv defines the abstraction for a key/value database. |
core/store/kv/controller | Package controller implements a CLI controller for the key/value database. |
core/store/prefixed |
- Version
- v0.1.0 (latest)
- Published
- Apr 10, 2024
- Platform
- linux/amd64
- Last checked
- 1 month ago –
Tools for package owners.