Versions in this module Expand all Collapse all v1 v1.4.9 Jul 5, 2021 Changes in this version + var BenchmarkSizes = []int + var Benchmarks = []func(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkBatchPut(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkDelete(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkGet(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkParallelDelete(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkParallelGet(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkParallelPut(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkPut(b *testing.B, db Database, name string, keys, values [][]byte) + func SetupBenchmark(b *testing.B, count int, size int) ([][]byte, [][]byte) v1.4.5 Jul 5, 2021 Changes in this version + const CapacityReductionFactor + const MaxExcessCapacityFactor + var ErrAvoidCorruption = errors.New("closed to avoid possible corruption") + var ErrClosed = errors.New("closed") + var ErrNotFound = errors.New("not found") + var Tests = []func(t *testing.T, db Database) + func GetID(db KeyValueReader, key []byte) (ids.ID, error) + func GetTimestamp(db KeyValueReader, key []byte) (time.Time, error) + func GetUInt32(db KeyValueReader, key []byte) (uint32, error) + func GetUInt64(db KeyValueReader, key []byte) (uint64, error) + func PackUInt32(val uint32) []byte + func PackUInt64(val uint64) []byte + func ParseID(b []byte) (ids.ID, error) + func ParseTimestamp(b []byte) (time.Time, error) + func ParseUInt32(b []byte) (uint32, error) + func ParseUInt64(b []byte) (uint64, error) + func PutID(db KeyValueWriter, key []byte, val ids.ID) error + func PutTimestamp(db KeyValueWriter, key []byte, val time.Time) error + func PutUInt32(db KeyValueWriter, key []byte, val uint32) error + func PutUInt64(db KeyValueWriter, key []byte, val uint64) error + func Size(db Iteratee) (int, error) + func TestBatchDelete(t *testing.T, db Database) + func TestBatchInner(t *testing.T, db Database) + func TestBatchLargeSize(t *testing.T, db Database) + func TestBatchPut(t *testing.T, db Database) + func TestBatchReplay(t *testing.T, db Database) + func TestBatchReset(t *testing.T, db Database) + func TestBatchReuse(t *testing.T, db Database) + func TestBatchRewrite(t *testing.T, db Database) + func TestCompactNoPanic(t *testing.T, db Database) + func TestIterator(t *testing.T, db Database) + func TestIteratorClosed(t *testing.T, db Database) + func TestIteratorError(t *testing.T, db Database) + func TestIteratorErrorAfterRelease(t *testing.T, db Database) + func TestIteratorMemorySafety(t *testing.T, db Database) + func TestIteratorPrefix(t *testing.T, db Database) + func TestIteratorStart(t *testing.T, db Database) + func TestIteratorStartPrefix(t *testing.T, db Database) + func TestMemorySafetyBatch(t *testing.T, db Database) + func TestMemorySafetyDatabase(t *testing.T, db Database) + func TestSimpleKeyValue(t *testing.T, db Database) + func TestSimpleKeyValueClosed(t *testing.T, db Database) + func TestStatNoPanic(t *testing.T, db Database) + type Batch interface + Inner func() Batch + Replay func(w KeyValueWriter) error + Reset func() + Size func() int + Write func() error + type Batcher interface + NewBatch func() Batch + type Compacter interface + Compact func(start []byte, limit []byte) error + type Database interface + type Iteratee interface + NewIterator func() Iterator + NewIteratorWithPrefix func(prefix []byte) Iterator + NewIteratorWithStart func(start []byte) Iterator + NewIteratorWithStartAndPrefix func(start, prefix []byte) Iterator + type Iterator interface + Error func() error + Key func() []byte + Next func() bool + Release func() + Value func() []byte + type KeyValueReader interface + Get func(key []byte) ([]byte, error) + Has func(key []byte) (bool, error) + type KeyValueWriter interface + Delete func(key []byte) error + Put func(key []byte, value []byte) error + type Stater interface + Stat func(property string) (string, error)