namespace ZB.MOM.WW.LmxProxy.Host.Configuration
{
///
/// Configuration settings for LmxProxy service
///
public class LmxProxyConfiguration
{
///
/// gRPC server port
///
public int GrpcPort { get; set; } = 50051;
///
/// Subscription management settings
///
public SubscriptionConfiguration Subscription { get; set; } = new();
///
/// Windows service recovery settings
///
public ServiceRecoveryConfiguration ServiceRecovery { get; set; } = new();
///
/// API key configuration file path
///
public string ApiKeyConfigFile { get; set; } = "apikeys.json";
///
/// MxAccess connection settings
///
public ConnectionConfiguration Connection { get; set; } = new();
///
/// TLS/SSL configuration for secure gRPC communication
///
public TlsConfiguration Tls { get; set; } = new();
///
/// Web server configuration for status display
///
public WebServerConfiguration WebServer { get; set; } = new();
}
///
/// Configuration for MxAccess connection monitoring and reconnection
///
public class ConnectionConfiguration
{
///
/// Interval in seconds between connection health checks
///
public int MonitorIntervalSeconds { get; set; } = 5;
///
/// Timeout in seconds for initial connection attempts
///
public int ConnectionTimeoutSeconds { get; set; } = 30;
///
/// Whether to automatically reconnect when connection is lost
///
public bool AutoReconnect { get; set; } = true;
///
/// Timeout in seconds for read operations
///
public int ReadTimeoutSeconds { get; set; } = 5;
///
/// Timeout in seconds for write operations
///
public int WriteTimeoutSeconds { get; set; } = 5;
///
/// Maximum number of concurrent read/write operations allowed
///
public int? MaxConcurrentOperations { get; set; } = 10;
///
/// Name of the node to connect to (optional)
///
public string? NodeName { get; set; }
///
/// Name of the galaxy to connect to (optional)
///
public string? GalaxyName { get; set; }
}
///
/// Configuration for web server that displays status information
///
public class WebServerConfiguration
{
///
/// Whether the web server is enabled
///
public bool Enabled { get; set; } = true;
///
/// Port number for the web server
///
public int Port { get; set; } = 8080;
///
/// Prefix URL for the web server (default: http://+:{Port}/)
///
public string? Prefix { get; set; }
}
}