Interface IHonuaClientOptions
- Namespace
- Honua.Sdk.Abstractions
- Assembly
- Honua.Sdk.Abstractions.dll
Common shape implemented by every Honua SDK client options class. Centralizes the cross-package contract for BaseAddress, Timeout, EnableRetry, MaxRetryAttempts, and the optional PrimaryHttpMessageHandlerFactory hook so consumers (and code-review tools) can rely on a single contract across all REST and gRPC packages.
public interface IHonuaClientOptions
Properties
BaseAddress
Base address of the Honua server. Required: the SDK does not bake in a
localhost default. Misconfiguration surfaces loudly at registration
time via the owning package's options-class ValidateBaseAddress
(REST) or ParseAndValidateAddress (gRPC) check.
Uri? BaseAddress { get; set; }
Property Value
EnableRetry
Enables the default transient-failure retry policy for the underlying transport (gRPC service config or HTTP standard resilience pipeline).
bool EnableRetry { get; set; }
Property Value
MaxRetryAttempts
Maximum number of retry attempts (including the original call). Must be
in the inclusive range [2, 5]; the setter throws
ArgumentOutOfRangeException for out-of-range values.
Applied only when EnableRetry is true.
int MaxRetryAttempts { get; set; }
Property Value
PrimaryHttpMessageHandlerFactory
Optional primary HTTP message handler factory for certificate, mTLS, proxy, or enterprise transport configuration. Returning a fresh handler per call is the caller's responsibility.
Func<HttpMessageHandler>? PrimaryHttpMessageHandlerFactory { get; set; }
Property Value
Timeout
Overall request budget per call, including retry attempts. Must be in the range (10 ms, 24 h). When retry is enabled, each attempt is limited to about 45% of this budget, and that limit covers response headers and the response body, including streaming reads.
TimeSpan Timeout { get; set; }