Versions in this module Expand all Collapse all v1 v1.2.0 Mar 19, 2026 Changes in this version + type Alert struct + Acknowledged bool + ID string + Message string + Metadata map[string]interface{} + Resolved bool + ResolvedAt *time.Time + Severity AlertSeverity + Threshold interface{} + Timestamp time.Time + Title string + Type AlertType + Value interface{} + type AlertSeverity string + const SeverityCritical + const SeverityInfo + const SeverityWarning + type AlertType string + const AlertTypeCacheHitRate + const AlertTypeCostThreshold + const AlertTypeDailyTokenLimit + const AlertTypeEfficiencyDrop + const AlertTypeParseFailureRate + const AlertTypeUsageSpike + const AlertTypeWeeklyTokenLimit + type Config struct + CooldownMinutes int + CostThresholdDaily float64 + CostThresholdWeekly float64 + DailyTokenLimit int64 + Enabled bool + MaxParseFailureRate float64 + MinCacheHitRate float64 + MinEfficiencyPct float64 + NotificationEmail string + NotificationWebhook string + UsageSpikeThreshold float64 + WeeklyTokenLimit int64 + func DefaultConfig() Config + type Manager struct + func NewManager(config Config) *Manager + func (m *Manager) Acknowledge(id string) error + func (m *Manager) CheckCostThreshold(dailyCost, weeklyCost float64) []Alert + func (m *Manager) CheckEfficiency(efficiencyPct float64) []Alert + func (m *Manager) CheckParseFailureRate(failureRate float64) []Alert + func (m *Manager) CheckTokenLimit(saved24h, savedTotal int64) []Alert + func (m *Manager) CheckUsageSpike(currentAvg, baselineAvg float64) []Alert + func (m *Manager) ClearResolved() int + func (m *Manager) GetActive() []Alert + func (m *Manager) GetActiveLocked() []Alert + func (m *Manager) GetAll(limit int) []Alert + func (m *Manager) GetConfig() Config + func (m *Manager) Resolve(id string) error + func (m *Manager) Stats() map[string]interface{} + func (m *Manager) UpdateConfig(config Config)