feat(commons): add deploy/admin/audit/redundancy/fleet message contracts
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using ZB.MOM.WW.OtOpcUa.Commons.Types;
|
||||
|
||||
namespace ZB.MOM.WW.OtOpcUa.Commons.Messages.Redundancy;
|
||||
|
||||
public enum RedundancyRole { Primary, Secondary, Detached }
|
||||
|
||||
/// <summary>
|
||||
/// Snapshot of a single node's redundancy state. Aggregated by <c>RedundancyStateActor</c>
|
||||
/// to compute fleet-wide ServiceLevel.
|
||||
/// </summary>
|
||||
public sealed record NodeRedundancyState(
|
||||
NodeId NodeId,
|
||||
RedundancyRole Role,
|
||||
bool IsClusterLeader,
|
||||
bool IsRoleLeaderForDriver,
|
||||
DateTime AsOfUtc);
|
||||
@@ -0,0 +1,11 @@
|
||||
using ZB.MOM.WW.OtOpcUa.Commons.Types;
|
||||
|
||||
namespace ZB.MOM.WW.OtOpcUa.Commons.Messages.Redundancy;
|
||||
|
||||
/// <summary>
|
||||
/// Broadcast whenever the cluster's redundancy topology changes (node up/down, role-leader
|
||||
/// change, partition heal). Subscribers compute their local OPC UA ServiceLevel from this.
|
||||
/// </summary>
|
||||
public sealed record RedundancyStateChanged(
|
||||
IReadOnlyList<NodeRedundancyState> Nodes,
|
||||
CorrelationId CorrelationId);
|
||||
Reference in New Issue
Block a user