seqids

package
v0.65.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache() *unpackCache

Types

type BlockMIDs

type BlockMIDs struct {
	Values []uint64
}

func (BlockMIDs) Pack

func (b BlockMIDs) Pack(dst []byte) []byte

func (*BlockMIDs) Unpack

func (b *BlockMIDs) Unpack(data []byte, fracVersion config.BinaryDataVersion) error

type BlockParams

type BlockParams struct {
	Values []uint64
}

func (BlockParams) Pack

func (b BlockParams) Pack(dst []byte) []byte

func (*BlockParams) Unpack

func (b *BlockParams) Unpack(data []byte) error

type BlockRIDs

type BlockRIDs struct {
	Values []uint64
	// contains filtered or unexported fields
}

func (BlockRIDs) Pack

func (b BlockRIDs) Pack(dst []byte) []byte

func (*BlockRIDs) Unpack

func (b *BlockRIDs) Unpack(data []byte) error

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

func (*Loader) GetMIDsBlock

func (l *Loader) GetMIDsBlock(index uint32, buf []uint64) (BlockMIDs, error)

func (*Loader) GetParamsBlock

func (l *Loader) GetParamsBlock(index uint32) (BlockParams, error)

func (*Loader) GetRIDsBlock

func (l *Loader) GetRIDsBlock(index uint32, buf []uint64) (BlockRIDs, error)

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(
	indexReader *storage.IndexReader,
	cacheMIDs *cache.Cache[[]byte],
	cacheRIDs *cache.Cache[[]byte],
	cacheParams *cache.Cache[BlockParams],
	table *Table,
	fracVersion config.BinaryDataVersion,
) *Provider

func (*Provider) DocPos

func (p *Provider) DocPos(lid seq.LID) (seq.DocPos, error)

func (*Provider) MID

func (p *Provider) MID(lid seq.LID) (seq.MID, error)

func (*Provider) RID

func (p *Provider) RID(lid seq.LID) (seq.RID, error)

func (*Provider) Release

func (p *Provider) Release()

type Table

type Table struct {
	MinBlockIDs     []seq.ID // from max to min
	IDBlocksTotal   uint32
	IDsTotal        uint32
	StartBlockIndex uint32
}

func (Table) BlockStartLID

func (Table) BlockStartLID(blockIndex uint32) uint32

func (Table) GetIDBlockIndexByLID

func (Table) GetIDBlockIndexByLID(lid uint32) uint32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL