pub struct NetworkConfig {
pub control: ConnectionParams,
pub data: ConnectionParams,
pub bulk: ConnectionParams,
pub tcp_nodelay: bool,
pub buffer_size: usize,
}
Expand description
Hierarchical network configuration for different Raft connection types
Provides specialized tuning for three distinct communication patterns:
- Control plane: Election/heartbeat (low bandwidth, high priority)
- Data plane: Log replication (balanced throughput/latency)
- Bulk transfer: Snapshotting (high bandwidth, tolerant to latency)
Fields§
§control: ConnectionParams
Configuration for control plane connections (leader election/heartbeats)
data: ConnectionParams
Configuration for data plane connections (log replication)
bulk: ConnectionParams
Configuration for bulk transfer connections (snapshot installation)
tcp_nodelay: bool
Common TCP setting for all connection types
buffer_size: usize
I/O buffer size in bytes for all connections
Implementations§
Trait Implementations§
Source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
Source§fn clone(&self) -> NetworkConfig
fn clone(&self) -> NetworkConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NetworkConfig
impl Debug for NetworkConfig
Source§impl Default for NetworkConfig
impl Default for NetworkConfig
Source§impl<'de> Deserialize<'de> for NetworkConfig
impl<'de> Deserialize<'de> for NetworkConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NetworkConfig
impl RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnwindSafe for NetworkConfig
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
Mutably borrows from an owned value. Read more
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request