compactor

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: AGPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidIndexKey = errors.New("invalid index key")

Functions

func ExtractIntervalFromTableName

func ExtractIntervalFromTableName(tableName string) model.Interval

ExtractIntervalFromTableName gives back the time interval for which the table is expected to hold the chunks index.

func ForEachChunk

func ForEachChunk(ctx context.Context, bucket *bbolt.Bucket, config config.PeriodConfig, callback retention.ChunkEntryCallback) error

func NewIndexCompactor

func NewIndexCompactor() compactor.IndexCompactor

Types

type CompactedIndex

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

func (*CompactedIndex) Cleanup

func (c *CompactedIndex) Cleanup()

func (*CompactedIndex) CleanupSeries

func (c *CompactedIndex) CleanupSeries(userID []byte, lbls labels.Labels) error

func (*CompactedIndex) ForEachChunk

func (c *CompactedIndex) ForEachChunk(ctx context.Context, callback retention.ChunkEntryCallback) error

func (*CompactedIndex) IndexChunk

func (c *CompactedIndex) IndexChunk(chunk chunk.Chunk) (bool, error)

func (*CompactedIndex) ToIndexFile

func (c *CompactedIndex) ToIndexFile() (shipperindex.Index, error)

type InvalidIndexKeyError

type InvalidIndexKeyError struct {
	HashKey  string
	RangeKey string
}

func (InvalidIndexKeyError) Error

func (e InvalidIndexKeyError) Error() string

func (InvalidIndexKeyError) Is

func (e InvalidIndexKeyError) Is(target error) bool

type LabelSeriesRangeKey

type LabelSeriesRangeKey struct {
	SeriesID []byte
	UserID   []byte
	Name     []byte
}

func (LabelSeriesRangeKey) String

func (l LabelSeriesRangeKey) String() string

Jump to

Keyboard shortcuts

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