Versions in this module Expand all Collapse all v1 v1.1.0 May 31, 2022 v1.0.2 May 31, 2022 v1.0.1 Mar 21, 2022 Changes in this version + func AllKeyValueTesting(rnd *rand.Rand, body, setup func(KeyValue) DB, teardown func(DB)) + func BytesAfter(b []byte) []byte + func BytesSeparator(a, b []byte) []byte + func Defer(args ...interface{}) bool + func DoDBTesting(t *DBTesting) + func DoIteratorTesting(t *IteratorTesting) + func KeyValueTesting(rnd *rand.Rand, kv KeyValue, p DB, setup func(KeyValue) DB, teardown func(DB)) + func Max(x, y int) int + func Min(x, y int) int + func NewRand() *rand.Rand + func RandomIndex(rnd *rand.Rand, n, round int, fn func(i int)) + func RandomRange(rnd *rand.Rand, n, round int, fn func(start, limit int)) + func RandomSeed() int64 + func RunDefer(groups ...string) bool + func RunSuite(t GinkgoTestingT, name string) + func ShuffledIndex(rnd *rand.Rand, n, round int, fn func(i int)) + func TestFind(db Find, kv KeyValue) + func TestFindAfterLast(db Find, kv KeyValue) + func TestGet(db Get, kv KeyValue) + func TestHas(db Has, kv KeyValue) + func TestIter(db NewIterator, r *util.Range, kv KeyValue) + type DB interface + type DBAct int + const DBDelete + const DBDeleteNA + const DBNone + const DBOverwrite + const DBPut + func (a DBAct) String() string + type DBTesting struct + Act DBAct + ActKey []byte + DB interface{ ... } + Deleted KeyValue + LastAct DBAct + LastActKey []byte + PostFn func(t *DBTesting) + Present KeyValue + Rand *rand.Rand + func (t *DBTesting) Delete(key []byte) + func (t *DBTesting) DeleteRandom() bool + func (t *DBTesting) Put(key, value []byte) + func (t *DBTesting) PutRandom() bool + func (t *DBTesting) RandomAct(round int) + func (t *DBTesting) TestAll() + func (t *DBTesting) TestAllDeleted() + func (t *DBTesting) TestAllPresent() + func (t *DBTesting) TestDeletedKey(key []byte) + func (t *DBTesting) TestPresentKV(key, value []byte) + func (t *DBTesting) Text() string + type Delete interface + TestDelete func(key []byte) error + type Find interface + TestFind func(key []byte) (rkey, rvalue []byte, err error) + type Get interface + TestGet func(key []byte) (value []byte, err error) + type Has interface + TestHas func(key []byte) (ret bool, err error) + type IterAct int + const IterEOI + const IterFirst + const IterLast + const IterNext + const IterNone + const IterPrev + const IterSOI + const IterSeek + func (a IterAct) String() string + type IteratorTesting struct + Act IterAct + Iter iterator.Iterator + LastAct IterAct + Pos int + PostFn func(t *IteratorTesting) + Rand *rand.Rand + func (t *IteratorTesting) EOI() + func (t *IteratorTesting) First() + func (t *IteratorTesting) IsFirst() bool + func (t *IteratorTesting) IsLast() bool + func (t *IteratorTesting) Last() + func (t *IteratorTesting) Next() + func (t *IteratorTesting) NextAll() + func (t *IteratorTesting) Prev() + func (t *IteratorTesting) PrevAll() + func (t *IteratorTesting) SOI() + func (t *IteratorTesting) Seek(i int) + func (t *IteratorTesting) SeekInexact(i int) + func (t *IteratorTesting) SeekKey(key []byte) + func (t *IteratorTesting) TestKV() + func (t *IteratorTesting) Text() string + func (t *IteratorTesting) WalkNext(fn func(t *IteratorTesting)) + func (t *IteratorTesting) WalkPrev(fn func(t *IteratorTesting)) + type KeyValue struct + func KeyValue_BigValue() *KeyValue + func KeyValue_EmptyKey() *KeyValue + func KeyValue_EmptyValue() *KeyValue + func KeyValue_Generate(rnd *rand.Rand, n, incr, minlen, maxlen, vminlen, vmaxlen int) *KeyValue + func KeyValue_MultipleKeyValue() *KeyValue + func KeyValue_OneKeyValue() *KeyValue + func KeyValue_SpecialKey() *KeyValue + func (kv *KeyValue) Delete(key []byte) (exist bool, value []byte) + func (kv *KeyValue) DeleteIndex(i int) bool + func (kv *KeyValue) Put(key, value []byte) + func (kv *KeyValue) PutString(key, value string) + func (kv *KeyValue) PutU(key, value []byte) bool + func (kv *KeyValue) PutUString(key, value string) bool + func (kv *KeyValue) Size() int + func (kv KeyValue) Clone() KeyValue + func (kv KeyValue) Get(key []byte) (i int, exist bool) + func (kv KeyValue) GetString(key string) (i int, exist bool) + func (kv KeyValue) Index(i int) (key, value []byte) + func (kv KeyValue) IndexInexact(i int) (key_, key, value []byte) + func (kv KeyValue) IndexOrNil(i int) (key, value []byte) + func (kv KeyValue) IndexString(i int) (key, value string) + func (kv KeyValue) Iterate(fn func(i int, key, value []byte)) + func (kv KeyValue) IterateInexact(fn func(i int, key_, key, value []byte)) + func (kv KeyValue) IterateInexactString(fn func(i int, key_, key, value string)) + func (kv KeyValue) IterateShuffled(rnd *rand.Rand, fn func(i int, key, value []byte)) + func (kv KeyValue) IterateShuffledString(rnd *rand.Rand, fn func(i int, key, value string)) + func (kv KeyValue) IterateString(fn func(i int, key, value string)) + func (kv KeyValue) KeyAt(i int) []byte + func (kv KeyValue) Len() int + func (kv KeyValue) Range(start, limit int) (r util.Range) + func (kv KeyValue) Search(key []byte) int + func (kv KeyValue) SearchString(key string) int + func (kv KeyValue) Slice(start, limit int) KeyValue + func (kv KeyValue) SliceKey(start, limit []byte) KeyValue + func (kv KeyValue) SliceKeyString(start, limit string) KeyValue + func (kv KeyValue) SliceRange(r *util.Range) KeyValue + func (kv KeyValue) ValueAt(i int) []byte + type KeyValueEntry struct + type NewIterator interface + TestNewIterator func(slice *util.Range) iterator.Iterator + type Put interface + TestPut func(key []byte, value []byte) error + type Storage struct + func NewStorage() *Storage + func (s *Storage) Close() error + func (s *Storage) CloseCheck() + func (s *Storage) Counter(m StorageMode, t storage.FileType) (count int, bytes int64) + func (s *Storage) Create(fd storage.FileDesc) (w storage.Writer, err error) + func (s *Storage) EmulateError(m StorageMode, t storage.FileType, err error) + func (s *Storage) EmulateErrorOnce(m StorageMode, t storage.FileType, err error) + func (s *Storage) EmulateRandomError(m StorageMode, t storage.FileType, prob float64, err error) + func (s *Storage) ForceRemove(fd storage.FileDesc) (err error) + func (s *Storage) ForceRename(oldfd, newfd storage.FileDesc) (err error) + func (s *Storage) GetMeta() (fd storage.FileDesc, err error) + func (s *Storage) List(t storage.FileType) (fds []storage.FileDesc, err error) + func (s *Storage) Lock() (l storage.Locker, err error) + func (s *Storage) Log(str string) + func (s *Storage) OnClose(onClose func() (preserve bool, err error)) + func (s *Storage) OnLog(onLog func(log string)) + func (s *Storage) Open(fd storage.FileDesc) (r storage.Reader, err error) + func (s *Storage) Release(m StorageMode, t storage.FileType) + func (s *Storage) Remove(fd storage.FileDesc) (err error) + func (s *Storage) Rename(oldfd, newfd storage.FileDesc) (err error) + func (s *Storage) ResetCounter(m StorageMode, t storage.FileType) + func (s *Storage) SetMeta(fd storage.FileDesc) error + func (s *Storage) Stall(m StorageMode, t storage.FileType) + type StorageMode int + const ModeClose + const ModeCreate + const ModeOpen + const ModeRead + const ModeRemove + const ModeRename + const ModeSync + const ModeWrite