Files
ScadaBridge/lmxproxy/src/ZB.MOM.WW.LmxProxy.Host/Configuration/LmxProxyConfiguration.cs
T
Joseph Doherty 2c99b370a0 chore(lmxproxy): switch health probe tag to DevAppEngine.Scheduler.ScanTime, remove temp prompts
AppEngine built-in tag is always present and constantly updating (~1s),
making it a more reliable probe than a user-deployed TestChildObject tag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 07:18:39 -04:00

47 lines
2.2 KiB
C#

namespace ZB.MOM.WW.LmxProxy.Host.Configuration
{
/// <summary>Root configuration class bound to appsettings.json.</summary>
public class LmxProxyConfiguration
{
/// <summary>gRPC server listen port. Default: 50051.</summary>
public int GrpcPort { get; set; } = 50051;
/// <summary>Path to API key configuration file. Default: apikeys.json.</summary>
public string ApiKeyConfigFile { get; set; } = "apikeys.json";
/// <summary>MxAccess connection settings.</summary>
public ConnectionConfiguration Connection { get; set; } = new ConnectionConfiguration();
/// <summary>Subscription channel settings.</summary>
public SubscriptionConfiguration Subscription { get; set; } = new SubscriptionConfiguration();
/// <summary>TLS/SSL settings.</summary>
public TlsConfiguration Tls { get; set; } = new TlsConfiguration();
/// <summary>Status web server settings.</summary>
public WebServerConfiguration WebServer { get; set; } = new WebServerConfiguration();
/// <summary>Windows SCM service recovery settings.</summary>
public ServiceRecoveryConfiguration ServiceRecovery { get; set; } = new ServiceRecoveryConfiguration();
/// <summary>Health check / active probe settings.</summary>
public HealthCheckConfiguration HealthCheck { get; set; } = new HealthCheckConfiguration();
}
/// <summary>Health check / probe configuration.</summary>
public class HealthCheckConfiguration
{
/// <summary>Tag address to probe for connection liveness. Default: DevAppEngine.Scheduler.ScanTime.</summary>
public string TestTagAddress { get; set; } = "DevAppEngine.Scheduler.ScanTime";
/// <summary>Probe timeout in milliseconds. Default: 5000.</summary>
public int ProbeTimeoutMs { get; set; } = 5000;
/// <summary>Consecutive transport failures before forced reconnect. Default: 3.</summary>
public int MaxConsecutiveTransportFailures { get; set; } = 3;
/// <summary>Probe interval while in degraded state (ms). Default: 30000 (30s).</summary>
public int DegradedProbeIntervalMs { get; set; } = 30000;
}
}