namespace ZB.MOM.WW.OtOpcUa.Cluster;

public sealed class AkkaClusterOptions
{
    public const string SectionName = "Cluster";

    /// <summary>Gets or sets the Akka system name.</summary>
    public string SystemName { get; set; } = "otopcua";

    /// <summary>Gets or sets the hostname to bind to (default 0.0.0.0).</summary>
    public string Hostname { get; set; } = "0.0.0.0";

    /// <summary>Gets or sets the port to listen on (default 4053).</summary>
    public int Port { get; set; } = 4053;

    /// <summary>
    /// Hostname advertised in cluster gossip. Must be reachable by other nodes.
    /// In docker-compose this is the container DNS name; in bare metal it's the
    /// host's stable LAN address.
    /// </summary>
    public string PublicHostname { get; set; } = "127.0.0.1";

    /// <summary>Gets or sets the seed nodes for cluster bootstrapping.</summary>
    public string[] SeedNodes { get; set; } = Array.Empty<string>();

    /// <summary>
    /// Cluster roles for this node. When empty the role list comes from
    /// <c>OTOPCUA_ROLES</c> via <see cref="RoleParser"/>. Allowed values:
    /// <c>admin</c>, <c>driver</c>, <c>dev</c>.
    /// </summary>
    public string[] Roles { get; set; } = Array.Empty<string>();
}
