Files
mxaccessgw/src/ZB.MOM.WW.MxGateway.Server/Alarms/AlarmProviderReasons.cs
T
Joseph Doherty f40409a688
ci / nightly-windev (push) Has been skipped
ci / windows-x86 (push) Successful in 1m16s
ci / java (push) Successful in 2m5s
ci / portable (push) Failing after 5m9s
docs: strip task-tracking IDs from code comments and fill missing XML docs
Tracking IDs are review bookkeeping that rots in shipped source; the rationale they tagged is kept. Comment-only change (CommentChecker 458 -> 16 false positives).
2026-10-07 15:34:32 -04:00

47 lines
2.5 KiB
C#

namespace ZB.MOM.WW.MxGateway.Server.Alarms;
/// <summary>
/// Well-known <c>reason</c> strings carried on the alarm feed's
/// <c>AlarmProviderStatus</c> message. Shared between the producer
/// (<see cref="GatewayAlarmMonitor" />) and consumers (e.g. the dashboard
/// provider badge) so the two cannot drift on a magic string.
/// </summary>
public static class AlarmProviderReasons
{
/// <summary>
/// Reason set when the monitor starts in subtag mode because
/// <c>MxGateway:Alarms:Fallback:Mode</c> is <c>ForceSubtag</c> — a
/// deliberate configuration, not a runtime failover. Lets the dashboard
/// distinguish a forced subtag mode from an unexpected degraded failover.
/// </summary>
public const string ForcedSubtag = "Forced subtag mode (configuration)";
/// <summary>
/// Reason prefix set when the effective mode can need the subtag watch-list
/// (<c>Auto</c> or <c>ForceSubtag</c>) but the list resolved to zero targets, so the
/// subtag provider covers no alarms. In <c>Auto</c> this is a warning about the
/// standby, not about the currently-serving alarm manager, which is why the dashboard
/// renders it against the <c>ALARMMGR</c> mode as a coverage badge rather than a failover.
/// </summary>
public const string SubtagWatchListEmpty =
"Subtag watch-list is empty: the subtag provider covers no alarms";
/// <summary>
/// Reason prefix set when Galaxy Repository alarm discovery was enabled but failed, so
/// the watch-list carries only what configuration contributed and may be incomplete
/// . Distinct from <see cref="SubtagWatchListEmpty"/>: discovery failing with a
/// usable config-only list is a completeness warning, not a total loss of coverage.
/// </summary>
public const string SubtagDiscoveryFailed =
"Galaxy Repository alarm discovery failed: the subtag watch-list may be incomplete";
/// <summary>
/// Reason prefix set when a re-resolution at the failover edge produced a different
/// watch-list than the one sent at <c>SubscribeAlarms</c>. The worker keeps the
/// list it was given for the life of the subscription, so the difference is reported
/// rather than applied; a monitor restart re-resolves and re-sends.
/// </summary>
public const string SubtagWatchListStale =
"Subtag watch-list differs from the one the worker is using";
}