Documentation ¶
Index ¶
Constants ¶
View Source
const IdealBatchSize = 100 * 1024
Code using batches should try to add this much data to the batch. The value was determined empirically.
Variables ¶
This section is empty.
Functions ¶
func TestParallelPutGet ¶
func TestPutGet ¶
Types ¶
type Batch ¶
type Batch interface { Putter Deleter ValueSize() int // amount of data in the batch Write() error // Reset resets the batch for reuse Reset() }
Batch is a write-only database that commits changes to its host database when Write is called. Batch cannot be used concurrently.
type Database ¶
type Database interface { Putter Deleter Get(key []byte) ([]byte, error) Has(key []byte) (bool, error) Close() NewBatch() Batch }
Database wraps all database operations. All methods are safe for concurrent use.
Click to show internal directories.
Click to hide internal directories.