Documentation ¶
Index ¶
- type AdaptiveRadixTree
- func (art *AdaptiveRadixTree) Close() error
- func (art *AdaptiveRadixTree) Delete(key []byte) (*data.LogRecordPos, bool)
- func (art *AdaptiveRadixTree) Get(key []byte) *data.LogRecordPos
- func (art *AdaptiveRadixTree) Iterator(reverse bool) Iterator
- func (art *AdaptiveRadixTree) Put(key []byte, pos *data.LogRecordPos) *data.LogRecordPos
- func (art *AdaptiveRadixTree) Size() int
- type BPlusTree
- func (b *BPlusTree) Close() error
- func (b *BPlusTree) Delete(key []byte) (*data.LogRecordPos, bool)
- func (b *BPlusTree) Get(key []byte) *data.LogRecordPos
- func (b *BPlusTree) Iterator(reverse bool) Iterator
- func (b *BPlusTree) Put(key []byte, pos *data.LogRecordPos) *data.LogRecordPos
- func (b *BPlusTree) Size() int
- type BTree
- type IndexType
- type Indexer
- type Item
- type Iterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdaptiveRadixTree ¶
type AdaptiveRadixTree struct {
// contains filtered or unexported fields
}
AdaptiveRadixTree 自适应基树索引 主要封装了 https://github.com/plar/go-adaptive-radix-tree
func NewART ¶
func NewART() *AdaptiveRadixTree
func (*AdaptiveRadixTree) Close ¶
func (art *AdaptiveRadixTree) Close() error
func (*AdaptiveRadixTree) Delete ¶
func (art *AdaptiveRadixTree) Delete(key []byte) (*data.LogRecordPos, bool)
func (*AdaptiveRadixTree) Get ¶
func (art *AdaptiveRadixTree) Get(key []byte) *data.LogRecordPos
func (*AdaptiveRadixTree) Iterator ¶
func (art *AdaptiveRadixTree) Iterator(reverse bool) Iterator
func (*AdaptiveRadixTree) Put ¶
func (art *AdaptiveRadixTree) Put(key []byte, pos *data.LogRecordPos) *data.LogRecordPos
func (*AdaptiveRadixTree) Size ¶
func (art *AdaptiveRadixTree) Size() int
type BPlusTree ¶
type BPlusTree struct {
// contains filtered or unexported fields
}
BPlusTree B+ 树索引,封装了 主要封装了 https://github.com/etcd-io/bbolt
func NewBPlusTree ¶
func (*BPlusTree) Put ¶
func (b *BPlusTree) Put(key []byte, pos *data.LogRecordPos) *data.LogRecordPos
type BTree ¶
type BTree struct {
// contains filtered or unexported fields
}
BTree 索引,封装了 google btree https://github.com/google/btree
func (*BTree) Put ¶
func (bt *BTree) Put(key []byte, pos *data.LogRecordPos) *data.LogRecordPos
type Indexer ¶
type Indexer interface { // Put 向索引中存储 key 对应的数据位置信息, 返回旧的数据位置信息 Put(key []byte, pos *data.LogRecordPos) *data.LogRecordPos // Get 从索引中获取 key 对应的数据位置信息 Get(key []byte) *data.LogRecordPos // Delete 从索引中删除 key 对应的数据位置信息, 返回旧的数据位置信息 Delete(key []byte) (*data.LogRecordPos, bool) // Size 返回索引中元素的数量 Size() int // Iterator 返回一个迭代器,用于遍历索引中的所有元素 Iterator(reverse bool) Iterator // Close 关闭索引 Close() error }
Indexer 抽象索引接口
type Item ¶
type Item struct { Key []byte Pos *data.LogRecordPos }
Click to show internal directories.
Click to hide internal directories.