namespace ZB.MOM.WW.LmxProxy.Client;
///
/// Configuration options for creating an LmxProxy client from IConfiguration sections.
///
public class LmxProxyClientOptions
{
/// Host address of the LmxProxy server.
public string Host { get; set; } = "localhost";
/// Port of the LmxProxy server.
public int Port { get; set; } = 50051;
/// API key for authentication.
public string? ApiKey { get; set; }
/// Default timeout for operations.
public TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(30);
/// Whether to use TLS for the connection.
public bool UseSsl { get; set; }
/// Path to the server CA certificate for TLS.
public string? CertificatePath { get; set; }
/// Whether to enable client-side metrics collection.
public bool EnableMetrics { get; set; }
/// Optional header name for correlation ID propagation.
public string? CorrelationIdHeader { get; set; }
/// Retry policy options.
public RetryOptions Retry { get; set; } = new();
}
///
/// Retry policy configuration options.
///
public class RetryOptions
{
/// Maximum number of retry attempts.
public int MaxAttempts { get; set; } = 3;
/// Base delay between retries.
public TimeSpan Delay { get; set; } = TimeSpan.FromSeconds(1);
}