Versions in this module Expand all Collapse all v0 v0.11.0 Jun 3, 2022 Changes in this version + type FSWindowsRepo struct + func NewFSWindowsRepo(config FSWindowsRepoConfig) (*FSWindowsRepo, error) + func (f *FSWindowsRepo) GetWindows(ctx context.Context, period time.Duration) (*Windows, error) + type FSWindowsRepoConfig struct + FS fs.FS + Logger log.Logger + type Generator struct + func NewGenerator(windowsRepo WindowsRepo) Generator + func (g Generator) GenerateMWMBAlerts(ctx context.Context, slo SLO) (*MWMBAlertGroup, error) + type MWMBAlert struct + BurnRateFactor float64 + ErrorBudget float64 + ID string + LongWindow time.Duration + Severity Severity + ShortWindow time.Duration + type MWMBAlertGroup struct + PageQuick MWMBAlert + PageSlow MWMBAlert + TicketQuick MWMBAlert + TicketSlow MWMBAlert + type SLO struct + ID string + Objective float64 + TimeWindow time.Duration + type Severity int + const PageAlertSeverity + const TicketAlertSeverity + const UnknownAlertSeverity + func (s Severity) String() string + type Window struct + ErrorBudgetPercent float64 + LongWindow time.Duration + ShortWindow time.Duration + func (w Window) Validate() error + type Windows struct + PageQuick Window + PageSlow Window + SLOPeriod time.Duration + TicketQuick Window + TicketSlow Window + func (w Windows) GetSpeedPageQuick() float64 + func (w Windows) GetSpeedPageSlow() float64 + func (w Windows) GetSpeedTicketQuick() float64 + func (w Windows) GetSpeedTicketSlow() float64 + func (w Windows) Validate() error + type WindowsRepo interface + GetWindows func(ctx context.Context, period time.Duration) (*Windows, error)