pub struct Config {
pub reuseaddr: bool,
pub reuseport: bool,
pub grpc_timeout: Duration,
pub grpc_concurrency_limit: usize,
pub grpc_message_size: usize,
pub grpc_breaker_threshold: u64,
pub grpc_breaker_retry_interval: Duration,
pub proposal_batch_size: usize,
pub proposal_batch_timeout: Duration,
pub snapshot_interval: Duration,
pub heartbeat: Duration,
pub raft_cfg: Config,
}
Expand description
Configuration options for the Raft-based system.
Fields§
§reuseaddr: bool
Whether to reuse local addresses. This option is enabled only if the reuseaddr
feature is active.
reuseport: bool
Whether to reuse local ports. This option is enabled only if the reuseport
feature is active
and the target OS is not Solaris or Illumos.
grpc_timeout: Duration
The timeout duration for gRPC calls.
grpc_concurrency_limit: usize
The maximum number of concurrent gRPC calls.
grpc_message_size: usize
The maximum size of gRPC messages in bytes.
grpc_breaker_threshold: u64
The threshold for the gRPC circuit breaker. If the number of failed requests exceeds this threshold, the circuit breaker will trip.
grpc_breaker_retry_interval: Duration
The interval at which the gRPC circuit breaker will retry after tripping.
proposal_batch_size: usize
The maximum number of proposals to batch together before processing.
proposal_batch_timeout: Duration
The timeout duration for collecting proposals into a batch. If this timeout is reached, the collected proposals will be processed regardless of the batch size.
snapshot_interval: Duration
The interval at which snapshots are generated.
heartbeat: Duration
The interval at which heartbeat messages are sent to maintain leader election and cluster health.
raft_cfg: Config
Configuration options for the Raft protocol.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request