chunks

package
v0.0.0-...-dc2a067 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NOMOREDOCS = 0x7fffffff

	NEXTREDOCES = -2
)

Variables

View Source
var EmptyPostings = errPostings{}

Functions

func NewMergedPostings

func NewMergedPostings(a, b Postings) *mergedPostings

Types

type Chunk

type Chunk interface {
	MinTime() int64
	MaxTime() int64
	SegmentNum() uint64
	ChunkEnc(bool, ChunkReader) ChunkEnc
}

type ChunkEnc

type ChunkEnc interface {
	Bytes() [][]byte
	Iterator(mint, maxt int64, segmentNum uint64) Postings
}

type ChunkReader

type ChunkReader interface {
	ReadChunk(bool, ...uint64) ChunkEnc
}

type LogID

type LogID struct {
	LogBytes SnapBlock
}

type LogPosting

type LogPosting interface {
	Next() bool
	Seek(v uint64) bool
	At() uint64
}

type Postings

type Postings interface {
	// Next advances the iterator and returns true if another value was found.
	Next() bool

	// Seek advances the iterator to value v or greater and returns
	// true if a value was found.
	Seek(v uint64) bool

	// At returns the value at the current iterator position.
	At() (int64, uint64, []int)

	// Err returns the last error of the iterator.
	Err() error
}

Postings provides iterative access over a postings list.

func Intersect

func Intersect(its ...Postings) Postings

func Merge

func Merge(its ...Postings) Postings

type SeriesSnapReader

type SeriesSnapReader interface {
	Encode() SnapBlock
	Bytes() [][]byte
}

type SeriesSnapShot

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

func NewSeriesSnapShot

func NewSeriesSnapShot() *SeriesSnapShot

func (*SeriesSnapShot) Bytes

func (s *SeriesSnapShot) Bytes() [][]byte

func (*SeriesSnapShot) Iterator

func (s *SeriesSnapShot) Iterator(minT, maxT int64, segmentNum uint64) Postings

func (*SeriesSnapShot) SetSegmentNum

func (s *SeriesSnapShot) SetSegmentNum(segmentNum uint64)

func (*SeriesSnapShot) SetSnapReader

func (s *SeriesSnapShot) SetSnapReader(snapReader SeriesSnapReader)

type SnapBlock

type SnapBlock interface {
	ReadByte() (byte, error)
	Seek(uint64)
	ReadVInt() int
	ReadVUInt64() uint64
	ReadVInt64() int64
}

快照块

type TermPosting

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

func (*TermPosting) At

func (t *TermPosting) At() (int64, uint64, []int)

func (*TermPosting) Err

func (t *TermPosting) Err() error

func (*TermPosting) Next

func (t *TermPosting) Next() bool

func (*TermPosting) Reset

func (t *TermPosting) Reset()

func (*TermPosting) Seek

func (t *TermPosting) Seek(target uint64) bool

type TermSnapReader

type TermSnapReader interface {
	Encode() (SnapBlock, SnapBlock, []SnapBlock)
	Bytes() [][]byte
}

type TermSnapShot

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

func NewTermSnapShot

func NewTermSnapShot() *TermSnapShot

func (*TermSnapShot) Bytes

func (s *TermSnapShot) Bytes() [][]byte

func (*TermSnapShot) Iterator

func (s *TermSnapShot) Iterator(minT, maxT int64, segmentNum uint64) Postings

func (*TermSnapShot) SetSegmentNum

func (s *TermSnapShot) SetSegmentNum(segmentNum uint64)

func (*TermSnapShot) SetSnapReader

func (s *TermSnapShot) SetSnapReader(snapReader TermSnapReader)

func (*TermSnapShot) SetTimeStamp

func (s *TermSnapShot) SetTimeStamp(timestamp int64)

Jump to

Keyboard shortcuts

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