common

package
v0.63.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DistributionBucket = time.Minute
View Source
const DistributionMaxInterval = 24 * time.Hour
View Source
const DistributionSpreadThreshold = 10 * time.Minute

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Path          string                   `json:"name"`
	Ver           string                   `json:"ver"`
	BinaryDataVer config.BinaryDataVersion `json:"binary_data_ver"`
	DocsTotal     uint32                   `json:"docs_total"`
	DocsOnDisk    uint64                   `json:"docs_on_disk"`  // how much compressed docs data is stored on disk
	DocsRaw       uint64                   `json:"docs_raw"`      // how much raw docs data is appended
	MetaOnDisk    uint64                   `json:"meta_on_disk"`  // how much compressed metadata is stored on disk
	IndexOnDisk   uint64                   `json:"index_on_disk"` // how much compressed index data is stored on disk

	ConstRegularBlockSize int `json:"const_regular_block_size"`
	ConstIDsPerBlock      int `json:"const_ids_per_block"`
	ConstLIDBlockCap      int `json:"const_lid_block_cap"`

	From         seq.MID               `json:"from"`
	To           seq.MID               `json:"to"`
	CreationTime uint64                `json:"creation_time"`
	SealingTime  uint64                `json:"sealing_time"`
	Distribution *seq.MIDsDistribution `json:"distribution"`
}

func NewInfo

func NewInfo(filename string, docsOnDisk, metaOnDisk uint64) *Info

func (*Info) BuildDistribution

func (s *Info) BuildDistribution(mids []uint64)

func (*Info) FullSize

func (s *Info) FullSize() uint64

func (*Info) InitEmptyDistribution

func (s *Info) InitEmptyDistribution() bool

func (*Info) IsIntersecting

func (s *Info) IsIntersecting(from, to seq.MID) bool

func (*Info) Name

func (s *Info) Name() string

func (*Info) String

func (s *Info) String() string

type SealParams

type SealParams struct {
	IDsZstdLevel           int
	LIDsZstdLevel          int
	TokenListZstdLevel     int
	DocsPositionsZstdLevel int
	TokenTableZstdLevel    int

	DocBlocksZstdLevel int // DocBlocksZstdLevel is the zstd compress level of each document block.
	DocBlockSize       int // DocBlockSize is decompressed payload size of document block.
}

Jump to

Keyboard shortcuts

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