31 lines
1.6 KiB
C#
31 lines
1.6 KiB
C#
namespace ZB.MOM.WW.ScadaBridge.Host;
|
|
|
|
public class NodeOptions
|
|
{
|
|
/// <summary>Gets or sets the node role (e.g. Central or Site).</summary>
|
|
public string Role { get; set; } = string.Empty;
|
|
/// <summary>Gets or sets the hostname or IP address this node advertises to the Akka cluster.</summary>
|
|
public string NodeHostname { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Operator-configured semantic node name used to stamp the SourceNode
|
|
/// column on audit rows. Conventional values are <c>node-a</c>/<c>node-b</c>
|
|
/// on site nodes and <c>central-a</c>/<c>central-b</c> on central nodes,
|
|
/// but the value is a free-form label — no validation is enforced.
|
|
/// </summary>
|
|
public string NodeName { get; set; } = string.Empty;
|
|
/// <summary>Gets or sets the site identifier for site nodes; null for central nodes.</summary>
|
|
public string? SiteId { get; set; }
|
|
/// <summary>Gets or sets the Akka.NET remoting port for cluster communication.</summary>
|
|
public int RemotingPort { get; set; } = 8081;
|
|
/// <summary>Gets or sets the gRPC port for the site stream server.</summary>
|
|
public int GrpcPort { get; set; } = 8083;
|
|
/// <summary>
|
|
/// HTTP/1.1 port serving the Prometheus /metrics scrape endpoint on site nodes.
|
|
/// Defaults to 8084 — deliberately distinct from <see cref="RemotingPort"/> (8082)
|
|
/// and <see cref="GrpcPort"/> (8083) so the Kestrel metrics listener never contends
|
|
/// with the Akka remoting port a site node binds.
|
|
/// </summary>
|
|
public int MetricsPort { get; set; } = 8084;
|
|
}
|