Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultInterval is the time between two garbage collections run by the server. DefaultInterval = 24 * time.Hour // MinInterval prevents the server from garbage collecting in a tight loop. MinInterval = time.Minute // DefaultBatchSize is the number of reports deleted by a single statement. DefaultBatchSize = 5000 )
Variables ¶
View Source
var ErrDisabled = errors.New("garbage collection is disabled, gc.maxHistoryDays must be set")
ErrDisabled is returned when a garbage collection is requested without a retention.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// MaxHistoryDays is how many days of reports are kept. Older reports are deleted,
// along with the scms, labels and resource configs no remaining report uses.
// Zero, the default, disables the garbage collector.
MaxHistoryDays int
// Interval is the time between two garbage collections run by the server.
Interval time.Duration
// BatchSize is the maximum number of reports deleted by a single statement.
BatchSize int
}
Options holds the garbage collector settings.
Click to show internal directories.
Click to hide internal directories.