pub struct ClientConfig {
pub quote_timeout_secs: u64,
pub store_timeout_secs: u64,
pub close_group_size: usize,
pub quote_concurrency: usize,
pub store_concurrency: usize,
pub allow_loopback: bool,
pub ipv6: bool,
}Expand description
Configuration for the Autonomi client.
Fields§
§quote_timeout_secs: u64Timeout for lightweight network operations (quotes, DHT lookups) in seconds.
store_timeout_secs: u64Timeout for chunk store (PUT) operations in seconds.
This should be significantly longer than quote_timeout_secs because
each chunk PUT transfers ~4 MB to multiple peers.
close_group_size: usizeNumber of closest peers to consider for routing.
quote_concurrency: usizeMaximum number of chunks quoted or downloaded concurrently.
Controls parallelism for quote collection and chunk retrieval. These are pure network I/O operations (DHT lookups, small messages) with negligible CPU cost, so a high default is safe.
store_concurrency: usizeMaximum number of chunks stored concurrently during uploads.
Controls parallelism for chunk PUT operations. Lower than quote concurrency because storing to NAT nodes requires hole-punch connection establishment, which is stateful and time-sensitive. Defaults to half the available CPU threads.
allow_loopback: boolAllow loopback (127.0.0.1) connections in the saorsa-transport
layer. Set to true only for devnet / local testing. Production
peers on the public Autonomi network reject the QUIC handshake
variant produced when this is true, so the default is false.
This mirrors the --allow-loopback flag in ant-cli, which already
defaults to false and threads through to the same
CoreNodeConfig::builder().local(...) call.
ipv6: boolBind a dual-stack IPv6 socket (true) or an IPv4-only socket
(false). Defaults to true, matching the CLI default.
Set to false only when running on hosts without a working IPv6
stack, to avoid advertising unreachable v6 addresses to the DHT
(which causes slow connects and junk DHT address records). This
mirrors the --ipv4-only flag in ant-cli.
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientConfig
impl Debug for ClientConfig
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more