Documentation ¶
Index ¶
- func DisableLogWrites()
- func EnableLogWrites()
- func NewBatch(get GetFunc, commit CommitFunc) storage.KeyValueTxn
- type Batch
- func (b *Batch) Begin(writable bool) storage.KeyValueTxn
- func (b *Batch) Commit() error
- func (b *Batch) Copy() *Batch
- func (b *Batch) Discard()
- func (b *Batch) Get(key storage.Key) (v []byte, err error)
- func (b *Batch) Put(key storage.Key, value []byte) error
- func (b *Batch) PutAll(values map[storage.Key][]byte) error
- type CommitFunc
- type DB
- type GetFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableLogWrites ¶ added in v1.0.0
func DisableLogWrites()
func EnableLogWrites ¶ added in v1.0.0
func EnableLogWrites()
func NewBatch ¶ added in v0.5.1
func NewBatch(get GetFunc, commit CommitFunc) storage.KeyValueTxn
Types ¶
type DB ¶
type DB struct { DBOpen atomicBool // contains filtered or unexported fields }
DB Implements a key value store in memory. Very basic, assumes no initial state for the database That must be handled by the caller, but see the notes on InitDB for future improvements.
Click to show internal directories.
Click to hide internal directories.