64e3fbe035
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public members surfaced by commentchecker — resolves 5,847 of 5,869 issues (99.6%) across three /fixdocs passes.
33 lines
1.6 KiB
C#
33 lines
1.6 KiB
C#
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
|
|
{
|
|
/// <summary>Gets the local cluster node identifier.</summary>
|
|
NodeId LocalNode { get; }
|
|
/// <summary>Gets the set of roles assigned to the local node.</summary>
|
|
IReadOnlySet<string> LocalRoles { get; }
|
|
/// <summary>Checks if the local node has the specified role.</summary>
|
|
/// <param name="role">Role name to check.</param>
|
|
/// <returns>True if the local node has the role; otherwise, false.</returns>
|
|
bool HasRole(string role);
|
|
/// <summary>Gets all nodes assigned to the specified role.</summary>
|
|
/// <param name="role">Role name to query.</param>
|
|
/// <returns>List of node identifiers with the role.</returns>
|
|
IReadOnlyList<NodeId> MembersWithRole(string role);
|
|
/// <summary>Gets the leader node for the specified role, or null if no leader is elected.</summary>
|
|
/// <param name="role">Role name to query.</param>
|
|
/// <returns>The leader node identifier, or null if no leader exists.</returns>
|
|
NodeId? RoleLeader(string role);
|
|
|
|
/// <summary>Occurs when the leader of a role changes.</summary>
|
|
event EventHandler<RoleLeaderChangedEventArgs>? RoleLeaderChanged;
|
|
}
|