pub struct RemoteSettings {Show 26 fields
pub protocol: String,
pub hostname: Option<String>,
pub port: u16,
pub max_frame_size: usize,
pub heartbeat_interval: Duration,
pub heartbeat_timeout: Duration,
pub handshake_timeout: Duration,
pub quarantine_duration: Duration,
pub backoff_initial: Duration,
pub backoff_max: Duration,
pub backoff_multiplier: f64,
pub max_reconnect_attempts: u32,
pub ack_window: u32,
pub send_buffer_len: usize,
pub default_serializer_id: u32,
pub require_cookie: Option<String>,
pub watch_heartbeat_interval: Duration,
pub watch_failure_threshold: u32,
pub phi_threshold: f64,
pub phi_max_sample_size: usize,
pub phi_min_std_deviation: Duration,
pub phi_acceptable_heartbeat_pause: Duration,
pub tls: TlsConfig,
pub maximum_payload_size: usize,
pub send_queue_capacity: usize,
pub send_queue_overflow: SendQueueOverflow,
}Fields§
§protocol: StringWire transport scheme — by default "akka.tcp".
hostname: Option<String>Local hostname to advertise. None means bind-only.
port: u16Local TCP port to bind. 0 lets the OS pick.
max_frame_size: usizeMaximum frame size in bytes (length-prefix + payload).
heartbeat_interval: DurationHow often the writer emits a Heartbeat PDU when idle.
heartbeat_timeout: DurationHeartbeat absence after which an endpoint is considered failing.
handshake_timeout: DurationHard cap on the time we wait for the Associate handshake reply.
quarantine_duration: DurationTime window during which a quarantined remote may not reassociate.
backoff_initial: DurationInitial backoff for endpoint reconnect attempts.
backoff_max: DurationCap on reconnect backoff (with jitter).
backoff_multiplier: f64Reconnect backoff multiplier per attempt.
max_reconnect_attempts: u32Number of reconnect attempts before giving up.
ack_window: u32Sliding-window size for ack’d delivery.
send_buffer_len: usizeSend buffer length (per-endpoint, bounded mpsc).
default_serializer_id: u32Default serializer id used for outbound messages whose type does not have a more specific serializer registered.
Cookie required during handshake. None disables cookie auth.
watch_heartbeat_interval: DurationWatch heartbeat tick interval (RemoteWatcher).
watch_failure_threshold: u32Watch failure threshold (in missed heartbeats).
phi_threshold: f64φ value above which the peer is considered failed ( default: 8.0 for watch, 10.0 for cluster).
phi_max_sample_size: usizeMaximum sample size kept in the heart-beat history.
phi_min_std_deviation: DurationFloor on the inter-arrival std-dev (avoids over-confidence on suspiciously stable links). default: 100ms.
phi_acceptable_heartbeat_pause: DurationPause window the detector tolerates before suspicion grows.
tls: TlsConfigTLS configuration. Default is unconfigured (!enabled()).
Phase 5.E.
maximum_payload_size: usizeMaximum payload bytes per wire frame. Larger payloads are
fragmented via chunking::Chunker. Phase 5.F.
send_queue_capacity: usizeBounded send-queue capacity per peer (Phase 5.G). When the
queue hits the cap the configured SendQueueOverflow policy
decides whether to drop, fail, or block the caller.
send_queue_overflow: SendQueueOverflowWhat to do when the bounded send queue is full.
Implementations§
Source§impl RemoteSettings
impl RemoteSettings
Sourcepub fn from_config(_cfg: &Config) -> Self
pub fn from_config(_cfg: &Config) -> Self
Read overrides from the given config. Any missing key falls back to the default value. Layout mirrors.
pub fn with_hostname(self, host: impl Into<String>) -> Self
pub fn with_port(self, port: u16) -> Self
pub fn with_protocol(self, p: impl Into<String>) -> Self
Sourcepub fn with_phi_threshold(self, t: f64) -> Self
pub fn with_phi_threshold(self, t: f64) -> Self
Override the phi-accrual threshold (default 8.0).
Sourcepub fn with_phi_sample_size(self, n: usize) -> Self
pub fn with_phi_sample_size(self, n: usize) -> Self
Override the phi-accrual sample size (default 1000).
Sourcepub fn with_phi_min_std_deviation(self, d: Duration) -> Self
pub fn with_phi_min_std_deviation(self, d: Duration) -> Self
Override the std-dev floor (default 100ms).
Sourcepub fn with_phi_acceptable_pause(self, d: Duration) -> Self
pub fn with_phi_acceptable_pause(self, d: Duration) -> Self
Override the acceptable heart-beat pause (default 3s).
Sourcepub fn with_tls(self, t: TlsConfig) -> Self
pub fn with_tls(self, t: TlsConfig) -> Self
Override the TLS configuration (default: disabled).
Sourcepub fn with_maximum_payload_size(self, n: usize) -> Self
pub fn with_maximum_payload_size(self, n: usize) -> Self
Override the chunking threshold (default 256 KiB).
Sourcepub fn with_send_queue_capacity(self, n: usize) -> Self
pub fn with_send_queue_capacity(self, n: usize) -> Self
Set the bounded send-queue capacity (Phase 5.G).
Sourcepub fn with_send_queue_overflow(self, p: SendQueueOverflow) -> Self
pub fn with_send_queue_overflow(self, p: SendQueueOverflow) -> Self
Set the overflow policy for the bounded send queue (Phase 5.G).
Trait Implementations§
Source§impl Clone for RemoteSettings
impl Clone for RemoteSettings
Source§fn clone(&self) -> RemoteSettings
fn clone(&self) -> RemoteSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more