Documentation ¶
Index ¶
- func ExtractIntervalFromTableName(tableName string) model.Interval
- type ChunkClient
- type ChunkEntry
- type ChunkEntryCallback
- type ChunkIterator
- type ChunkRef
- type ExpirationChecker
- type IndexProcessor
- type IntervalFilter
- type Limits
- type Marker
- type MarkerProcessor
- type MarkerStorageWriter
- type SeriesCleaner
- type Sweeper
- type TableMarker
- type TenantsRetention
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractIntervalFromTableName ¶
ExtractIntervalFromTableName gives back the time interval for which the table is expected to hold the chunks index.
Types ¶
type ChunkClient ¶
type ChunkEntry ¶
type ChunkEntryCallback ¶
type ChunkEntryCallback func(ChunkEntry) (deleteChunk bool, err error)
type ChunkIterator ¶
type ChunkIterator interface {
ForEachChunk(ctx context.Context, callback ChunkEntryCallback) error
}
type ChunkRef ¶
type ExpirationChecker ¶
type ExpirationChecker interface { Expired(ref ChunkEntry, now model.Time) (bool, []IntervalFilter) IntervalMayHaveExpiredChunks(interval model.Interval, userID string) bool MarkPhaseStarted() MarkPhaseFailed() MarkPhaseTimedOut() MarkPhaseFinished() DropFromIndex(ref ChunkEntry, tableEndTime model.Time, now model.Time) bool }
func NeverExpiringExpirationChecker ¶
func NeverExpiringExpirationChecker(limits Limits) ExpirationChecker
NeverExpiringExpirationChecker returns an expiration checker that never expires anything
func NewExpirationChecker ¶
func NewExpirationChecker(limits Limits) ExpirationChecker
type IndexProcessor ¶
type IndexProcessor interface { ChunkIterator SeriesCleaner // contains filtered or unexported methods }
type IntervalFilter ¶
IntervalFilter contains the interval to delete and the function that filters lines. These will be applied to a chunk.
type Limits ¶
type Limits interface { RetentionPeriod(userID string) time.Duration StreamRetention(userID string) []validation.StreamRetention AllByUserID() map[string]*validation.Limits DefaultLimits() *validation.Limits }
type Marker ¶
type Marker struct {
// contains filtered or unexported fields
}
func NewMarker ¶
func NewMarker(workingDirectory string, expiration ExpirationChecker, markTimeout time.Duration, chunkClient client.Client, r prometheus.Registerer) (*Marker, error)
type MarkerProcessor ¶
type MarkerProcessor interface { // Start starts parsing marks and calling deleteFunc for each. // If deleteFunc returns no error the mark is deleted from the storage. // Otherwise the mark will reappears in future iteration. Start(deleteFunc func(ctx context.Context, chunkId []byte) error) // Stop stops processing marks. Stop() }
type MarkerStorageWriter ¶
func NewMarkerStorageWriter ¶
func NewMarkerStorageWriter(workingDir string) (MarkerStorageWriter, error)
type SeriesCleaner ¶
type Sweeper ¶
type Sweeper struct {
// contains filtered or unexported fields
}
func NewSweeper ¶
func NewSweeper(workingDir string, deleteClient ChunkClient, deleteWorkerCount int, minAgeDelete time.Duration, r prometheus.Registerer) (*Sweeper, error)
type TableMarker ¶
type TenantsRetention ¶
type TenantsRetention struct {
// contains filtered or unexported fields
}
func NewTenantsRetention ¶
func NewTenantsRetention(l Limits) *TenantsRetention
func (*TenantsRetention) RetentionPeriodFor ¶
Click to show internal directories.
Click to hide internal directories.