pub struct IgniteClientConfig {Show 13 fields
pub address: String,
pub addresses: Vec<String>,
pub partition_awareness: Option<bool>,
pub endpoint_discovery: Option<bool>,
pub data_center_id: Option<String>,
pub username: Option<String>,
pub password: Option<String>,
pub max_pool_size: usize,
pub connect_timeout: Duration,
pub request_timeout: Duration,
pub page_size: usize,
pub use_tls: bool,
pub tls_accept_invalid_certs: bool,
}Fields§
§address: String“host:port” address of the primary cluster node (first of Self::addresses).
addresses: Vec<String>All configured “host:port” node addresses. Partition-aware routing connects to each and routes keys to their owning node. A single-element list reproduces the original single-node behaviour.
partition_awareness: Option<bool>Partition awareness toggle. None = auto (enabled when ≥ 2 addresses
are configured and the server supports it); Some(b) forces it.
endpoint_discovery: Option<bool>Server endpoint discovery toggle. None = auto (on); Some(b) forces
it. Only has effect when partition awareness is enabled — the client
then learns cluster nodes not in Self::addresses and routes to them.
data_center_id: Option<String>This client’s data-center id (DC_AWARE). When set and the server
supports DC_AWARE, read-only ops are routed to a partition owner in
this data center (a backup) instead of the primary. None = no DC
affinity (reads go to the primary).
username: Option<String>§password: Option<String>§max_pool_size: usize§connect_timeout: DurationMaximum time allowed for TCP connect + TLS/handshake (also used as
deadpool wait and create timeout). Default: 10 s.
request_timeout: DurationPer-request response deadline applied in every send_and_receive call.
Default: 30 s.
page_size: usizeNumber of rows fetched per server round-trip in SQL queries. A smaller value reduces memory pressure but increases round-trips. Default: 1024.
use_tls: boolConnect using TLS/SSL. Default: false.
tls_accept_invalid_certs: boolSkip server certificate verification — for development / self-signed
certificates only. Has no effect when use_tls is false.
Default: false.
Implementations§
Source§impl IgniteClientConfig
impl IgniteClientConfig
pub fn new(address: impl Into<String>) -> Self
Sourcepub fn with_addresses(self, addresses: Vec<String>) -> Self
pub fn with_addresses(self, addresses: Vec<String>) -> Self
Configure the full set of cluster node addresses for partition-aware
routing. The first entry becomes the primary Self::address.
An empty list is ignored (the existing address is retained).
Sourcepub fn with_partition_awareness(self, enabled: bool) -> Self
pub fn with_partition_awareness(self, enabled: bool) -> Self
Force partition awareness on or off, overriding the auto default.
Sourcepub fn with_endpoint_discovery(self, enabled: bool) -> Self
pub fn with_endpoint_discovery(self, enabled: bool) -> Self
Force server endpoint discovery on or off, overriding the auto default. Only effective when partition awareness is enabled.
Sourcepub fn with_data_center_id(self, dc_id: impl Into<String>) -> Self
pub fn with_data_center_id(self, dc_id: impl Into<String>) -> Self
Set this client’s data-center id for DC_AWARE read-from-backup routing.
pub fn with_auth( self, username: impl Into<String>, password: impl Into<String>, ) -> Self
pub fn with_pool_size(self, size: usize) -> Self
Sourcepub fn with_connect_timeout(self, duration: Duration) -> Self
pub fn with_connect_timeout(self, duration: Duration) -> Self
Override the TCP connect + handshake timeout (default: 10 s).
Sourcepub fn with_request_timeout(self, duration: Duration) -> Self
pub fn with_request_timeout(self, duration: Duration) -> Self
Override the per-request response timeout (default: 30 s).
Sourcepub fn with_page_size(self, page_size: usize) -> Self
pub fn with_page_size(self, page_size: usize) -> Self
Override the SQL query page size (rows per server round-trip). Default: 1024. Use a smaller value (e.g. 1) to force multi-page fetches in tests, or a larger value to reduce round-trips for large result sets.
Sourcepub fn with_tls_accept_invalid_certs(self) -> Self
pub fn with_tls_accept_invalid_certs(self) -> Self
Skip server certificate verification (development / self-signed certs only).
Has no effect unless with_tls() is also called.
Trait Implementations§
Source§impl Clone for IgniteClientConfig
impl Clone for IgniteClientConfig
Source§fn clone(&self) -> IgniteClientConfig
fn clone(&self) -> IgniteClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more