pub struct ClientConfig {
pub server_url: String,
pub auth_token: Option<String>,
pub request_timeout_ms: Option<u64>,
pub disable_transient_retry: bool,
pub ca_cert_path: Option<String>,
}Expand description
Client configuration loaded from TOML or built by the caller.
Strict like every config struct in the workspace: an unknown key is a
decode error, so a typo (auth_tokn) fails loudly instead of silently
producing an unauthenticated client.
Fields§
§server_url: StringBase URL for the LoonFS server.
auth_token: Option<String>Optional bearer token.
request_timeout_ms: Option<u64>Optional overall per-request deadline in milliseconds. Unset means no whole-request deadline: requests are bounded only by the built-in 60-second socket inactivity timeouts, so slow-but-progressing large transfers are not cut off while a stalled connection still fails.
disable_transient_retry: boolDisables the bounded automatic retry of quick-clearing transient
failures: the retryable-unavailability codes (server_busy,
commit_queue_full, shutting_down — a draining process telling the
caller to retry against the next one) and network-level transport
errors (connect failures, timeouts, resets). Off by default. The retry
applies only to reads, commits (which carry a durable replay
identity), and operations whose repeat semantics are idempotent;
lifecycle mutations
and upload-session creation are always single-attempt.
ca_cert_path: Option<String>PEM bundle of extra certificate authorities to trust for https
server URLs, for a server whose certificate a private CA issued.
Added to the platform trust store rather than replacing it, so a
client configured this way still reaches publicly-trusted servers.
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn load(path: impl AsRef<Path>) -> Result<Self>
pub fn load(path: impl AsRef<Path>) -> Result<Self>
Loads and validates a client config from TOML.
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validates field invariants. Self::load and
Client::new both run this, so a file-loaded
config and a directly built one cannot diverge in what they accept.
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more