common

package
v0.74.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DistributionMaxInterval     = 24 * time.Hour
	DistributionBucket          = time.Minute
	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"`    // How many LIDs fraction has.
	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) AddMID added in v0.74.0

func (s *Info) AddMID(mid uint64)

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) MarshalJSON added in v0.64.0

func (s *Info) MarshalJSON() ([]byte, error)

MarshalJSON implements custom JSON marshaling to always store From and To in milliseconds

func (*Info) Name

func (s *Info) Name() string

func (*Info) String

func (s *Info) String() string

func (*Info) UnmarshalJSON added in v0.64.0

func (s *Info) UnmarshalJSON(data []byte) error

UnmarshalJSON implements custom JSON unmarshaling to convert From and To from milliseconds to nanoseconds

type SealParams

type SealParams struct {
	// DisableIndexCompression disables compression
	// of index components (lids, ids, etc.)
	DisableIndexCompression bool

	IDsZstdLevel           int
	LIDsZstdLevel          int
	TokenListZstdLevel     int
	DocsPositionsZstdLevel int
	TokenTableZstdLevel    int
	DocBlocksZstdLevel     int // DocBlocksZstdLevel is the zstd compress level of each document block.

	LIDBlockSize int
	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