Documentation ¶
Overview ¶
Package memorydb implements the key-value database layer based on memory maps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProducer ¶
func NewProducer(namespace string, mods ...Mod) kvdb.IterableDBProducer
NewProducer of memory db.
Types ¶
type Database ¶
type Database struct {
kvdb.DropableStore
}
Database is an ephemeral key-value store. Apart from basic data storage functionality it also supports batch writes and iterating over the keyspace in binary-alphabetical order.
func New ¶
func New() *Database
New returns a wrapped map with all the required database interface methods implemented.
func NewWithDrop ¶
func NewWithDrop(drop func()) *Database
NewWithDrop is the same as New, but defines onDrop callback.
type Mod ¶
type Mod func(kvdb.DropableStore) kvdb.DropableStore
Click to show internal directories.
Click to hide internal directories.