Documentation
¶
Overview ¶
Package disk enforces the state directory cap by shrinking the TSDB first and reporting pressure.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Budget ¶
type Budget struct {
// contains filtered or unexported fields
}
Budget enforces a byte cap over one directory.
func DiskBudget ¶
DiskBudget returns a budget for dir with capBytes.
func (*Budget) Check ¶
Check shrinks the TSDB above the high water mark and relaxes it below the low water mark.
type Options ¶
type Options struct {
TSDB Shrinker
// TSDBDir and SpoolDir are measured separately; relative paths are under the budget directory.
TSDBDir string
SpoolDir string
// SpoolReserve is always counted as used, so nothing else can grow into it (host mode).
SpoolReserve int64
HighWater float64
LowWater float64
}
Options configures a Budget.
Click to show internal directories.
Click to hide internal directories.