Versions in this module Expand all Collapse all v3 v3.0.0 Apr 8, 2024 Changes in this version + func BuildUserID(id int) string + func SchemaPeriodForTable(cfg config.SchemaConfig, tableName string) (config.PeriodConfig, bool) + func SetupTable(t *testing.T, path string, commonDBsConfig IndexesConfig, ...) + func SortTablesByRange(tables []string) + type CompactedIndex interface + Cleanup func() + ToIndexFile func() (index.Index, error) + type Compactor struct + DeleteRequestsGRPCHandler *deletion.GRPCRequestHandler + DeleteRequestsHandler *deletion.DeleteRequestHandler + func NewCompactor(cfg Config, objectStoreClients map[config.DayTime]client.ObjectClient, ...) (*Compactor, error) + func (c *Compactor) CompactTable(ctx context.Context, tableName string, applyRetention bool) error + func (c *Compactor) OnRingInstanceHeartbeat(_ *ring.BasicLifecycler, _ *ring.Desc, _ *ring.InstanceDesc) + func (c *Compactor) OnRingInstanceRegister(_ *ring.BasicLifecycler, ringDesc ring.Desc, instanceExists bool, _ string, ...) (ring.InstanceState, ring.Tokens) + func (c *Compactor) OnRingInstanceStopping(_ *ring.BasicLifecycler) + func (c *Compactor) OnRingInstanceTokens(_ *ring.BasicLifecycler, _ ring.Tokens) + func (c *Compactor) RegisterIndexCompactor(indexType string, indexCompactor IndexCompactor) + func (c *Compactor) RunCompaction(ctx context.Context, applyRetention bool) (err error) + func (c *Compactor) ServeHTTP(w http.ResponseWriter, req *http.Request) + type Config struct + ApplyRetentionInterval time.Duration + CompactionInterval time.Duration + CompactorRing lokiring.RingConfig + DeleteBatchSize int + DeleteMaxInterval time.Duration + DeleteRequestCancelPeriod time.Duration + DeleteRequestStore string + DeleteRequestStoreKeyPrefix string + MaxCompactionParallelism int + RetentionDeleteDelay time.Duration + RetentionDeleteWorkCount int + RetentionEnabled bool + RetentionTableTimeout time.Duration + RunOnce bool + SkipLatestNTables int + TablesToCompact int + UploadParallelism int + WorkingDirectory string + func (cfg *Config) RegisterFlags(f *flag.FlagSet) + func (cfg *Config) Validate() error + type IndexCompactor interface + NewTableCompactor func(ctx context.Context, commonIndexSet IndexSet, ...) TableCompactor + OpenCompactedIndexFile func(ctx context.Context, path, tableName, userID, workingDir string, ...) (CompactedIndex, error) + type IndexFileConfig struct + CompressFile bool + type IndexRecords struct + NumRecords int + Start int + type IndexSet interface + GetLogger func() log.Logger + GetSourceFile func(indexFile storage.IndexFile) (string, error) + GetTableName func() string + GetWorkingDir func() string + ListSourceFiles func() []storage.IndexFile + SetCompactedIndex func(compactedIndex CompactedIndex, removeSourceFiles bool) error + type IndexesConfig struct + NumCompactedFiles int + NumUnCompactedFiles int + func (c IndexesConfig) String() string + type Limits interface + DefaultLimits func() *validation.Limits + type MakeEmptyUserIndexSetFunc func(userID string) (IndexSet, error) + type PerUserIndexesConfig struct + NumUsers int + func (c PerUserIndexesConfig) String() string + type TableCompactor interface + CompactTable func() (err error)