Skip to main content

RemoteSettings

Struct RemoteSettings 

Source
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: String

Wire transport scheme — by default "akka.tcp".

§hostname: Option<String>

Local hostname to advertise. None means bind-only.

§port: u16

Local TCP port to bind. 0 lets the OS pick.

§max_frame_size: usize

Maximum frame size in bytes (length-prefix + payload).

§heartbeat_interval: Duration

How often the writer emits a Heartbeat PDU when idle.

§heartbeat_timeout: Duration

Heartbeat absence after which an endpoint is considered failing.

§handshake_timeout: Duration

Hard cap on the time we wait for the Associate handshake reply.

§quarantine_duration: Duration

Time window during which a quarantined remote may not reassociate.

§backoff_initial: Duration

Initial backoff for endpoint reconnect attempts.

§backoff_max: Duration

Cap on reconnect backoff (with jitter).

§backoff_multiplier: f64

Reconnect backoff multiplier per attempt.

§max_reconnect_attempts: u32

Number of reconnect attempts before giving up.

§ack_window: u32

Sliding-window size for ack’d delivery.

§send_buffer_len: usize

Send buffer length (per-endpoint, bounded mpsc).

§default_serializer_id: u32

Default serializer id used for outbound messages whose type does not have a more specific serializer registered.

§require_cookie: Option<String>

Cookie required during handshake. None disables cookie auth.

§watch_heartbeat_interval: Duration

Watch heartbeat tick interval (RemoteWatcher).

§watch_failure_threshold: u32

Watch 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: usize

Maximum sample size kept in the heart-beat history.

§phi_min_std_deviation: Duration

Floor on the inter-arrival std-dev (avoids over-confidence on suspiciously stable links). default: 100ms.

§phi_acceptable_heartbeat_pause: Duration

Pause window the detector tolerates before suspicion grows.

§tls: TlsConfig

TLS configuration. Default is unconfigured (!enabled()). Phase 5.E.

§maximum_payload_size: usize

Maximum payload bytes per wire frame. Larger payloads are fragmented via chunking::Chunker. Phase 5.F.

§send_queue_capacity: usize

Bounded 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: SendQueueOverflow

What to do when the bounded send queue is full.

Implementations§

Source§

impl RemoteSettings

Source

pub fn from_config(_cfg: &Config) -> Self

Read overrides from the given config. Any missing key falls back to the default value. Layout mirrors.

Source

pub fn with_hostname(self, host: impl Into<String>) -> Self

Source

pub fn with_port(self, port: u16) -> Self

Source

pub fn with_protocol(self, p: impl Into<String>) -> Self

Source

pub fn with_phi_threshold(self, t: f64) -> Self

Override the phi-accrual threshold (default 8.0).

Source

pub fn with_phi_sample_size(self, n: usize) -> Self

Override the phi-accrual sample size (default 1000).

Source

pub fn with_phi_min_std_deviation(self, d: Duration) -> Self

Override the std-dev floor (default 100ms).

Source

pub fn with_phi_acceptable_pause(self, d: Duration) -> Self

Override the acceptable heart-beat pause (default 3s).

Source

pub fn with_tls(self, t: TlsConfig) -> Self

Override the TLS configuration (default: disabled).

Source

pub fn with_maximum_payload_size(self, n: usize) -> Self

Override the chunking threshold (default 256 KiB).

Source

pub fn with_send_queue_capacity(self, n: usize) -> Self

Set the bounded send-queue capacity (Phase 5.G).

Source

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

Source§

fn clone(&self) -> RemoteSettings

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RemoteSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RemoteSettings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Extension for T
where T: Any + Send + Sync,