Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Turns ¶
func Turns(in Input) ([]Turn, []Compaction)
Types ¶
type Compaction ¶
type ContextAfter ¶
type ContextUsage ¶
type ContextUsage struct {
State State
Used, Size *int64
Ratio *float64
SizeSource string
Stale *bool
Sequence *int64
ReportedTurnID string
ReportedAt *time.Time
Injected *Injected
ClearedBy *ClearedBy
}
func Derive ¶
func Derive(in Input) ContextUsage
type Input ¶
type Input struct {
WorkTime WorkTime
UsageEvents []UsageEvent
Deliveries []Delivery
Compactions []Compaction
Settled *SettledTurn
CatalogWindow *int64
CompactionBoundary *int64
ClearedBy *ClearedBy
Available bool
}
type MaintenanceAction ¶
type MaintenanceAction string
const ( MaintenanceNone MaintenanceAction = "none" MaintenanceCompact MaintenanceAction = "compact" MaintenanceRemind MaintenanceAction = "remind" )
func DecideMaintenance ¶
func DecideMaintenance(known bool, used, size int64, threshold float64, hasCompaction bool) MaintenanceAction
DecideMaintenance leaves execution and dependency admission to the caller.
type SettledTurn ¶
type UsageEvent ¶
Click to show internal directories.
Click to hide internal directories.