index

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	ShardCacheSize:      2000,
	BlockReadCacheSize:  100000,
	BlockWriteCacheSize: 10000,
	// contains filtered or unexported fields
}
View Source
var ErrBlockExists = fmt.Errorf("block already exists")

Functions

func NewStore added in v1.11.0

func NewStore() *store.IndexStore

Types

type Config

type Config struct {
	ShardCacheSize      int `yaml:"shard_cache_size"`
	BlockWriteCacheSize int `yaml:"block_write_cache_size"`
	BlockReadCacheSize  int `yaml:"block_read_cache_size"`
	// contains filtered or unexported fields
}

func (*Config) RegisterFlagsWithPrefix

func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

type Index

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

func NewIndex

func NewIndex(logger log.Logger, s Store, cfg Config) *Index

func (*Index) GetBlocks added in v1.13.3

func (i *Index) GetBlocks(tx *bbolt.Tx, list *metastorev1.BlockList) ([]*metastorev1.BlockMeta, error)

func (*Index) GetTenantStats added in v1.11.0

func (i *Index) GetTenantStats(tenant string) *metastorev1.TenantStats

func (*Index) Init added in v1.11.0

func (i *Index) Init(tx *bbolt.Tx) error

func (*Index) InsertBlock

func (i *Index) InsertBlock(tx *bbolt.Tx, b *metastorev1.BlockMeta) error

func (*Index) QueryMetadata added in v1.11.0

func (i *Index) QueryMetadata(tx *bbolt.Tx, query MetadataQuery) ([]*metastorev1.BlockMeta, error)

func (*Index) QueryMetadataLabels added in v1.12.0

func (i *Index) QueryMetadataLabels(tx *bbolt.Tx, query MetadataQuery) ([]*typesv1.Labels, error)

func (*Index) ReplaceBlocks

func (i *Index) ReplaceBlocks(tx *bbolt.Tx, compacted *metastorev1.CompactedBlocks) error

func (*Index) Restore added in v1.11.0

func (i *Index) Restore(tx *bbolt.Tx) error

type InvalidQueryError added in v1.11.0

type InvalidQueryError struct {
	Query MetadataQuery
	Err   error
}

func (*InvalidQueryError) Error added in v1.11.0

func (e *InvalidQueryError) Error() string

type MetadataQuery added in v1.11.0

type MetadataQuery struct {
	Expr      string
	StartTime time.Time
	EndTime   time.Time
	Tenant    []string
	Labels    []string
}

func (*MetadataQuery) String added in v1.11.0

func (q *MetadataQuery) String() string

type Store

type Store interface {
	CreateBuckets(*bbolt.Tx) error
	ListPartitions(*bbolt.Tx) ([]*store.Partition, error)
	LoadShard(*bbolt.Tx, store.PartitionKey, string, uint32) (*store.Shard, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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