Documentation
¶
Index ¶
- type Block
- type Counter
- type Cursor
- type IteratorAsc
- type IteratorDesc
- type Loader
- type Table
- func (t *Table) GetAdjustedMinTID(blockIndex uint32) uint32
- func (t *Table) GetChunkIndex(blockIndex, tid uint32) int
- func (t *Table) GetChunksCount(blockIndex uint32) uint32
- func (t *Table) GetFirstBlockIndexForTID(tid uint32) uint32
- func (t *Table) GetLastBlockIndexForTID(tid uint32) uint32
- func (t *Table) HasTIDInNextBlock(blockIndex, tid uint32) bool
- func (t *Table) HasTIDInPrevBlock(blockIndex, tid uint32) bool
- type UnpackBuffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct {
LIDs []uint32
Offsets []uint32
// todo remove this legacy field
IsLastLID bool
}
func (*Block) GetSizeBytes ¶
func (*Block) Unpack ¶
func (b *Block) Unpack(data []byte, fracVer config.BinaryDataVersion, buf *UnpackBuffer) error
type IteratorAsc ¶
type IteratorAsc Cursor
func (*IteratorAsc) Next ¶
func (it *IteratorAsc) Next() node.LID
func (*IteratorAsc) NextBatch ¶ added in v0.72.0
func (it *IteratorAsc) NextBatch() node.LIDBatch
func (*IteratorAsc) NextBatchGeq ¶ added in v0.72.0
func (it *IteratorAsc) NextBatchGeq(nextID node.LID) node.LIDBatch
func (*IteratorAsc) NextGeq ¶ added in v0.69.0
func (it *IteratorAsc) NextGeq(nextID node.LID) node.LID
NextGeq returns the next (in reverse iteration order) LID that is <= maxLID.
func (*IteratorAsc) String ¶
func (*IteratorAsc) String() string
type IteratorDesc ¶
type IteratorDesc Cursor
func (*IteratorDesc) Next ¶
func (it *IteratorDesc) Next() node.LID
func (*IteratorDesc) NextBatch ¶ added in v0.72.0
func (it *IteratorDesc) NextBatch() node.LIDBatch
func (*IteratorDesc) NextBatchGeq ¶ added in v0.72.0
func (it *IteratorDesc) NextBatchGeq(nextID node.LID) node.LIDBatch
func (*IteratorDesc) NextGeq ¶ added in v0.69.0
func (it *IteratorDesc) NextGeq(nextID node.LID) node.LID
NextGeq finds next greater or equal
func (*IteratorDesc) String ¶
func (*IteratorDesc) String() string
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader is responsible for reading from disk, unpacking and caching LID. NOT THREAD SAFE. Do not use concurrently. Use your own Loader instance for each search query
func NewLoader ¶
func NewLoader(fracVer config.BinaryDataVersion, r *storage.IndexReader, c *cache.Cache[*Block]) *Loader
type Table ¶
type Table struct {
StartBlockIndex uint32
MaxTIDs []uint32 // defines last tid for each block
MinTIDs []uint32 // defines first not continued tid for each block
// TODO: We need fix MinTID issue that we have to compensate with DiskBlock.getAdjustedMinTID()
// TODO: After that we do not need store IsContinued flag, and able calc it as MaxTIDs[i] == MinTIDs[i+1]
IsContinued []bool
}
func (*Table) GetAdjustedMinTID ¶
func (*Table) GetChunkIndex ¶
func (*Table) GetChunksCount ¶
func (*Table) GetFirstBlockIndexForTID ¶
GetFirstBlockIndexForTID finds first block index in file for TID
func (*Table) GetLastBlockIndexForTID ¶
GetLastBlockIndexForTID finds last block index in file for TID
func (*Table) HasTIDInNextBlock ¶
func (*Table) HasTIDInPrevBlock ¶
type UnpackBuffer ¶
type UnpackBuffer struct {
// contains filtered or unexported fields
}
UnpackBuffer keeps intermediate temporary buffers for decoding. Used only for a single fraction.
func (*UnpackBuffer) Reset ¶ added in v0.72.0
func (b *UnpackBuffer) Reset(fracVer config.BinaryDataVersion)
Click to show internal directories.
Click to hide internal directories.