Documentation
¶
Overview ¶
Package retention applies the current retention_period and retention_stream to the stored data (Loki's compactor.retention_enabled).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sweeper ¶
type Sweeper struct {
Conn driver.Conn
DB string
Topo chstore.Topology
Limits *validation.Overrides
Interval time.Duration
Logger log.Logger
// Now returns the current time for Run (default time.Now).
Now func() time.Time
}
Sweeper removes data older than the retention that is configured now. A UTC day D with a retention of N days is removed once D+N <= today (UTC). Every step is idempotent, so several instances may sweep at once.
Click to show internal directories.
Click to hide internal directories.