Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDatabaseClosed is returned if a database was already closed at the // invocation of a data access operation. ErrDatabaseClosed = errors.New("database closed") // ErrDatabaseNotFound is returned if a key is requested that is not found in // the provided database. ErrDatabaseNotFound = errors.New("key not found") )
Functions ¶
This section is empty.
Types ¶
type Batcher ¶
type Batcher interface { KeyValueWriter // Write flushes any accumulated data to disk. Write() error // Reset resets the batch for reuse. Reset() // ValueSize retrieves the amount of data queued up for writing. ValueSize() int }
type KeyValueReader ¶
type KeyValueWriter ¶
type TreeDB ¶
type TreeDB interface { KeyValueReader KeyValueWriter // NewBatch creates a write-only database that buffers changes to its host db // until a final write is called. NewBatch() Batcher Close() error }
Click to show internal directories.
Click to hide internal directories.