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