Documentation ¶
Overview ¶
Package index contains data structures to help cope with caches, indices and key filters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
*bloom.BloomFilter
}
Filter implements a simple key filter based on a bloom filter.
type Index ¶
type Index struct {
*redblacktree.Tree
}
Index implements an in-memory key-offset map.
type Memory ¶
type Memory struct { *redblacktree.Tree // contains filtered or unexported fields }
Memory is an in-memory key-valueset store.
func (*Memory) Iterator ¶
func (memory *Memory) Iterator() MemoryIterator
Iterator returns an abstraction to iterate through all key-value pairs in the tree.
func (*Memory) SetIterator ¶
func (memory *Memory) SetIterator() MemorySetIterator
SetIterator returns an abstraction to iterate through all key-valueset pairs in the tree.
type MemoryIterator ¶
type MemoryIterator struct {
// contains filtered or unexported fields
}
MemoryIterator implements an iterator for scanning through key-value pairs.
func (*MemoryIterator) Key ¶
func (iterator *MemoryIterator) Key() []byte
Key returns the key of the current pair pointer.
func (*MemoryIterator) Next ¶
func (iterator *MemoryIterator) Next() bool
Next fetches the next pair and returns true on success
func (*MemoryIterator) Value ¶
func (iterator *MemoryIterator) Value() []byte
Value returns the value of the current pair pointer.
type MemorySetIterator ¶
type MemorySetIterator struct {
// contains filtered or unexported fields
}
MemorySetIterator implements an iterator for scanning through key-valueset pairs.
func (*MemorySetIterator) Key ¶
func (iterator *MemorySetIterator) Key() []byte
Key returns the pair's key.
func (*MemorySetIterator) Next ¶
func (iterator *MemorySetIterator) Next() bool
Next fetches the next pair and returns true on success.
func (*MemorySetIterator) Values ¶
func (iterator *MemorySetIterator) Values() [][]byte
Values returns the pair's valueset.
type RunIndex ¶
type RunIndex struct {
*redblacktree.Tree
}
func NewRunIndex ¶
func NewRunIndex() *RunIndex