Documentation
¶
Index ¶
- type InMemoryDB
- type WriteTx
- func (tx *WriteTx) Apply(other db.WriteTx) error
- func (tx *WriteTx) Commit() error
- func (tx *WriteTx) Delete(key []byte) error
- func (tx *WriteTx) Discard()
- func (tx *WriteTx) Get(key []byte) ([]byte, error)
- func (tx *WriteTx) Iterate(prefix []byte, callback func(k, v []byte) bool) error
- func (tx *WriteTx) Set(key, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryDB ¶
type InMemoryDB struct {
// contains filtered or unexported fields
}
InMemoryDB implements an ephemeral in-memory db.Database.
func New ¶
func New(_ db.Options) (*InMemoryDB, error)
New returns a new in-memory database. Options are ignored.
func (*InMemoryDB) Close ¶
func (d *InMemoryDB) Close() error
func (*InMemoryDB) Compact ¶
func (d *InMemoryDB) Compact() error
func (*InMemoryDB) Iterate ¶
func (d *InMemoryDB) Iterate(prefix []byte, callback func(key, value []byte) bool) error
func (*InMemoryDB) WriteTx ¶
func (d *InMemoryDB) WriteTx() db.WriteTx
Click to show internal directories.
Click to hide internal directories.