Documentation
¶
Index ¶
- type BTree
- func (m *BTree) ApplyStealSortedBatch(entries []batchpkg.Entry, onKey func(key []byte))
- func (m *BTree) Delete(key []byte)
- func (m *BTree) DeleteSteal(key []byte)
- func (m *BTree) DeleteWithCallback(key []byte, cb func(k, v []byte) error) error
- func (m *BTree) Freeze()
- func (m *BTree) Get(key []byte) ([]byte, bool, bool)
- func (m *BTree) Len() int
- func (m *BTree) NewIterator(start, end []byte) iterator.UnsafeIterator
- func (m *BTree) PutWithCallback(key, value []byte, cb func(k, v []byte) error) error
- func (m *BTree) Reset()
- func (m *BTree) Set(key, value []byte)
- func (m *BTree) SetSteal(key, value []byte)
- func (m *BTree) Size() int64
- type HashSorted
- func (m *HashSorted) ApplyStealSortedBatch(entries []batchpkg.Entry, onKey func(key []byte))
- func (m *HashSorted) Delete(key []byte)
- func (m *HashSorted) DeleteSteal(key []byte)
- func (m *HashSorted) DeleteWithCallback(key []byte, cb func(k, v []byte) error) error
- func (m *HashSorted) Freeze()
- func (m *HashSorted) Get(key []byte) ([]byte, bool, bool)
- func (m *HashSorted) Len() int
- func (m *HashSorted) NewIterator(start, end []byte) iterator.UnsafeIterator
- func (m *HashSorted) PutWithCallback(key, value []byte, cb func(k, v []byte) error) error
- func (m *HashSorted) Reset()
- func (m *HashSorted) Set(key, value []byte)
- func (m *HashSorted) SetSteal(key, value []byte)
- func (m *HashSorted) Size() int64
- type HashSortedIndexer
- type Iterator
- func (it *Iterator) Close() error
- func (it *Iterator) Domain() (start, end []byte)
- func (it *Iterator) Error() error
- func (it *Iterator) IsDeleted() bool
- func (it *Iterator) Key() []byte
- func (it *Iterator) KeyCopy(dst []byte) []byte
- func (it *Iterator) Next()
- func (it *Iterator) Seek(key []byte)
- func (it *Iterator) UnsafeEntry() ([]byte, page.ValuePtr, byte)
- func (it *Iterator) UnsafeKey() []byte
- func (it *Iterator) UnsafeValue() []byte
- func (it *Iterator) Valid() bool
- func (it *Iterator) Value() []byte
- func (it *Iterator) ValueCopy(dst []byte) []byte
- type Memtable
- func (m *Memtable) ApplyStealSortedBatch(entries []batchpkg.Entry, onKey func(key []byte))
- func (m *Memtable) Delete(key []byte)
- func (m *Memtable) DeleteSteal(key []byte)
- func (m *Memtable) DeleteWithCallback(key []byte, cb func(k, v []byte) error) error
- func (m *Memtable) Freeze()
- func (m *Memtable) Get(key []byte) ([]byte, bool, bool)
- func (m *Memtable) Len() int
- func (m *Memtable) NewIterator(start, end []byte) iterator.UnsafeIterator
- func (m *Memtable) PutWithCallback(key, value []byte, cb func(k, v []byte) error) error
- func (m *Memtable) Reset()
- func (m *Memtable) Set(key, value []byte)
- func (m *Memtable) SetSteal(key, value []byte)
- func (m *Memtable) Size() int64
- type Mode
- type SortedBatchApplier
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BTree ¶
type BTree struct {
// contains filtered or unexported fields
}
func NewBTreeWithDegree ¶
func (*BTree) ApplyStealSortedBatch ¶
func (*BTree) DeleteSteal ¶
func (*BTree) DeleteWithCallback ¶
func (*BTree) NewIterator ¶
func (m *BTree) NewIterator(start, end []byte) iterator.UnsafeIterator
func (*BTree) PutWithCallback ¶
type HashSorted ¶
type HashSorted struct {
// contains filtered or unexported fields
}
func NewHashSorted ¶
func NewHashSorted() *HashSorted
func NewHashSortedWithIndexer ¶
func NewHashSortedWithIndexer(indexer *HashSortedIndexer) *HashSorted
func (*HashSorted) ApplyStealSortedBatch ¶
func (m *HashSorted) ApplyStealSortedBatch(entries []batchpkg.Entry, onKey func(key []byte))
func (*HashSorted) Delete ¶
func (m *HashSorted) Delete(key []byte)
func (*HashSorted) DeleteSteal ¶
func (m *HashSorted) DeleteSteal(key []byte)
func (*HashSorted) DeleteWithCallback ¶
func (m *HashSorted) DeleteWithCallback(key []byte, cb func(k, v []byte) error) error
func (*HashSorted) Freeze ¶
func (m *HashSorted) Freeze()
func (*HashSorted) Len ¶
func (m *HashSorted) Len() int
func (*HashSorted) NewIterator ¶
func (m *HashSorted) NewIterator(start, end []byte) iterator.UnsafeIterator
func (*HashSorted) PutWithCallback ¶
func (m *HashSorted) PutWithCallback(key, value []byte, cb func(k, v []byte) error) error
func (*HashSorted) Reset ¶
func (m *HashSorted) Reset()
Reset clears all entries while retaining internal allocations.
func (*HashSorted) Set ¶
func (m *HashSorted) Set(key, value []byte)
func (*HashSorted) SetSteal ¶
func (m *HashSorted) SetSteal(key, value []byte)
func (*HashSorted) Size ¶
func (m *HashSorted) Size() int64
type HashSortedIndexer ¶
type HashSortedIndexer struct {
// contains filtered or unexported fields
}
HashSortedIndexer processes sealed key chunks in the background.
func NewHashSortedIndexer ¶
func NewHashSortedIndexer() *HashSortedIndexer
func (*HashSortedIndexer) Close ¶
func (x *HashSortedIndexer) Close()
Close stops the indexer after draining queued work.
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator wrapper
func (*Iterator) UnsafeValue ¶
type Memtable ¶
type Memtable struct {
// contains filtered or unexported fields
}
func NewWithCapacity ¶
NewWithCapacity creates a new Memtable with the requested arena capacity. A non-positive capacity uses a small default to keep rotations cheap.
func (*Memtable) ApplyStealSortedBatch ¶
func (*Memtable) DeleteSteal ¶
DeleteSteal - SkipList copies data, so Steal is same as Delete.
func (*Memtable) DeleteWithCallback ¶
func (*Memtable) NewIterator ¶
func (m *Memtable) NewIterator(start, end []byte) iterator.UnsafeIterator
func (*Memtable) PutWithCallback ¶
func (*Memtable) Reset ¶
func (m *Memtable) Reset()
Reset clears the memtable while retaining its arena capacity.
type SortedBatchApplier ¶
type SortedBatchApplier interface {
ApplyStealSortedBatch(entries []batchpkg.Entry, onKey func(key []byte))
}
SortedBatchApplier is an optional fast path for applying a strictly-increasing batch under a single memtable lock.
Callers should only use this when they know the entries are already in increasing key order.
type Table ¶
type Table interface {
Set(key, value []byte)
PutWithCallback(key, value []byte, cb func(k, v []byte) error) error
Delete(key []byte)
DeleteWithCallback(key []byte, cb func(k, v []byte) error) error
SetSteal(key, value []byte)
DeleteSteal(key []byte)
Get(key []byte) ([]byte, bool, bool)
Size() int64
Len() int
// NewIterator may hold a read lock until Close; callers should avoid
// iterating over mutable memtables on hot write paths.
NewIterator(start, end []byte) iterator.UnsafeIterator
Freeze()
}
func NewWithCapacityModeAndIndexer ¶
func NewWithCapacityModeAndIndexer(capacity int, mode Mode, indexer *HashSortedIndexer) (Table, error)