AlertManager class
Alert manager for managing alert rules and evaluating alerts.
Constructors
- AlertManager({required MetricsCollector metrics})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- metrics → MetricsCollector
-
Get metrics collector.
no setter
-
rules
→ List<
AlertRule> -
Get registered rules.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
acknowledgeAlert(
String alertId, String userId) → Future< void> - Acknowledge an alert.
-
addRule(
AlertRule rule) → void - Add an alert rule.
-
evaluate(
) → Future< List< Alert> > - Evaluate all enabled rules against current metrics.
-
getActiveAlerts(
) → Future< List< Alert> > - Get all active (non-resolved) alerts.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeRule(
String ruleId) → void - Remove an alert rule by ID.
-
resolveAlert(
String alertId) → Future< void> - Resolve an alert.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateRule(
AlertRule rule) → void - Update an alert rule.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited