state method
Implementation
DVAlertState state(String rule) {
final _RuleState? s = _rules[rule];
if (s == null) {
throw ArgumentError.value(rule, 'rule', 'no rule with this name');
}
return DVAlertState(
status: s.status,
pendingSince: s.pendingSince,
firingSince: s.firingSince,
delivered: s.delivered.isNotEmpty,
incidentId: s.incidentId,
dedupKey: s.status == DVAlertStatus.firing ? s.dedupKey : null,
resolvingSince: s.status == DVAlertStatus.firing ? s.clearSince : null,
deliveredTo: Set<String>.unmodifiable(s.delivered),
missed: Map<String, String>.unmodifiable(s.missed),
lastNotifiedAt: s.lastNotifiedAt,
);
}