feat(commons): add cluster/admin/diagnostics client interfaces
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using ZB.MOM.WW.OtOpcUa.Commons.Types;
|
||||
|
||||
namespace ZB.MOM.WW.OtOpcUa.Commons.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// Live view of the local node's identity and the cluster's role topology. Implemented by
|
||||
/// <c>ClusterRoleInfo</c> in <c>OtOpcUa.Cluster</c>; consumed by everything that needs to
|
||||
/// distinguish admin-role vs driver-role members or react to role-leader changes (e.g. OPC UA
|
||||
/// ServiceLevel computation).
|
||||
/// </summary>
|
||||
public interface IClusterRoleInfo
|
||||
{
|
||||
NodeId LocalNode { get; }
|
||||
IReadOnlySet<string> LocalRoles { get; }
|
||||
bool HasRole(string role);
|
||||
IReadOnlyList<NodeId> MembersWithRole(string role);
|
||||
NodeId? RoleLeader(string role);
|
||||
|
||||
event EventHandler<RoleLeaderChangedEventArgs>? RoleLeaderChanged;
|
||||
}
|
||||
Reference in New Issue
Block a user