Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator interface {
// Next advances the iterator to the next item and returns true if there is a next item. Returns false if there are no more items.
Next() bool
// Data returns the current item without advancing the iterator.
Data() Data
// Error returns the error encountered during iteration, if any. io.EOF is returned when the iteration is complete.
Error() error
}
type MapIterator ¶
type MapIterator struct {
// contains filtered or unexported fields
}
func (*MapIterator) Data ¶
func (it *MapIterator) Data() Data
func (*MapIterator) Error ¶
func (it *MapIterator) Error() error
func (*MapIterator) Next ¶
func (it *MapIterator) Next() bool
type Recoverable ¶
type Recoverable interface {
SetRecoveryMode(enabled bool)
}
Recoverable is implemented by MemTables that can be put into recovery mode. In recovery mode, the MemTable should not trigger flushes or panic on writes if full.
type Table ¶
type Table interface {
Put(recordType db.RecordType, key, value string)
Get(key string) (string, bool)
GetPrefix(prefix string) map[string]string
// IsFull returns true if the memtable is full and cannot accept more writes
IsFull() bool
Delete(key string) error
// Size returns the current size of the memtable in bytes
Size() uint32
Iterator() Iterator
}
type Value ¶
type Value struct {
RecordType db.RecordType
Value string
}
Click to show internal directories.
Click to hide internal directories.