Skip to main content

EnvironmentConfig

Struct EnvironmentConfig 

Source
pub struct EnvironmentConfig {
Show 29 fields pub quic_idle_ms: Option<u64>, pub backoff_ms: Option<u64>, pub interval_ms: Option<u64>, pub connect_timeout_ms: Option<u64>, pub auth_timeout_secs: Option<u64>, pub heartbeat_secs: Option<u64>, pub join_timeout_secs: Option<u64>, pub peer_cleanup_secs: Option<u64>, pub peer_check_secs: Option<u64>, pub rebalance_improvement: Option<f64>, pub worker_idle_multiplier: Option<u64>, pub rebalance_startup_grace_secs: Option<u64>, pub rebalance_check_interval_secs: Option<u64>, pub rebalance_min_interval_secs: Option<u64>, pub migration_check_interval_secs: Option<u64>, pub migration_connection_timeout_secs: Option<u64>, pub migration_handoff_timeout_secs: Option<u64>, pub rebalance_good_score_cutoff: Option<f64>, pub rebalance_periodic_improvement: Option<f64>, pub rebalance_consecutive_signals: Option<u32>, pub rebalance_max_per_hour: Option<u32>, pub rebalance_weight_health: Option<f64>, pub rebalance_weight_history: Option<f64>, pub rebalance_weight_breaker: Option<f64>, pub rebalance_empty_delta_threshold: Option<f64>, pub rebalance_empty_bonus_weight: Option<f64>, pub rebalance_empty_health_cutoff: Option<f64>, pub rebalance_health_stale_secs: Option<u64>, pub rebalance_health_stale_factor: Option<f64>,
}

Fields§

§quic_idle_ms: Option<u64>§backoff_ms: Option<u64>§interval_ms: Option<u64>§connect_timeout_ms: Option<u64>§auth_timeout_secs: Option<u64>§heartbeat_secs: Option<u64>§join_timeout_secs: Option<u64>§peer_cleanup_secs: Option<u64>§peer_check_secs: Option<u64>§rebalance_improvement: Option<f64>

Fractional improvement required to consider immediate rebalance (e.g. 0.05 = 5%)

§worker_idle_multiplier: Option<u64>

Multiplier for worker idle timeout (applied to heartbeat_secs)

§rebalance_startup_grace_secs: Option<u64>

Worker-side rebalance: startup grace before considering rebalancing (secs)

§rebalance_check_interval_secs: Option<u64>

Worker-side rebalance: interval between should_rebalance checks (secs)

§rebalance_min_interval_secs: Option<u64>

Worker-side rebalance controller: minimum interval between rebalances (secs)

§migration_check_interval_secs: Option<u64>

Worker-side migration: periodic check interval (secs)

§migration_connection_timeout_secs: Option<u64>

Worker-side migration: connection timeout (secs)

§migration_handoff_timeout_secs: Option<u64>

Worker-side migration: handoff timeout (secs)

§rebalance_good_score_cutoff: Option<f64>

Rebalance: consider current connection “good” above this score; skip periodic rebalance

§rebalance_periodic_improvement: Option<f64>

Rebalance (periodic): required fractional improvement over current (e.g. 0.30)

§rebalance_consecutive_signals: Option<u32>

Rebalance controller: required consecutive signals count (e.g. 3)

§rebalance_max_per_hour: Option<u32>

Rebalance controller: max rebalances per hour

§rebalance_weight_health: Option<f64>

Rebalance scoring weights (health/history/breaker)

§rebalance_weight_history: Option<f64>§rebalance_weight_breaker: Option<f64>§rebalance_empty_delta_threshold: Option<f64>

Empty-manager bonus: min delta between emptiest and next emptiest fullness

§rebalance_empty_bonus_weight: Option<f64>

Empty-manager bonus: scale factor for bonus

§rebalance_empty_health_cutoff: Option<f64>

Empty-manager bonus: minimum health score to qualify

§rebalance_health_stale_secs: Option<u64>

Rebalance: age threshold in seconds before health is considered stale

§rebalance_health_stale_factor: Option<f64>

Rebalance: factor applied to health score when stale (0.0-1.0)

Implementations§

Source§

impl EnvironmentConfig

Source

pub const DEFAULT_HEARTBEAT_SECS: u64 = 2

Source

pub const DEFAULT_AUTH_TIMEOUT_SECS: u64 = 5

Source

pub const DEFAULT_JOIN_TIMEOUT_SECS: u64 = 30

Source

pub const DEFAULT_CONNECT_TIMEOUT_MS: u64 = 10_000

Source

pub fn heartbeat_secs(&self) -> u64

Source

pub fn auth_timeout_secs(&self) -> u64

Source

pub fn join_timeout_secs(&self) -> u64

Source

pub fn connect_timeout_ms(&self) -> u64

Source

pub fn quic_idle_duration(&self) -> Result<Duration, Report>

Source

pub fn worker_idle_multiplier(&self) -> u64

Idle multiplier for worker connections (default 5 × heartbeat)

Source

pub fn rebalance_startup_grace_secs(&self) -> u64

Worker-side rebalance: startup grace before considering rebalancing (default 300s)

Source

pub fn rebalance_check_interval_secs(&self) -> u64

Worker-side rebalance: interval between should_rebalance checks (default 600s)

Source

pub fn rebalance_min_interval_secs(&self) -> u64

Worker-side rebalance controller: minimum interval between rebalances (default 300s)

Source

pub fn migration_check_interval_secs(&self) -> u64

Worker-side migration: periodic check interval (default 180s)

Source

pub fn migration_connection_timeout_secs(&self) -> u64

Worker-side migration: connection timeout (default 15s)

Source

pub fn migration_handoff_timeout_secs(&self) -> u64

Worker-side migration: handoff timeout (default 30s)

Source

pub fn rebalance_good_score_cutoff(&self) -> f64

Periodic rebalance: consider current score “good” above this value

Source

pub fn rebalance_periodic_improvement(&self) -> f64

Periodic rebalance: required fractional improvement over current

Source

pub fn rebalance_consecutive_signals(&self) -> u32

Controller: required consecutive improvement signals

Source

pub fn rebalance_max_per_hour(&self) -> u32

Controller: max rebalances per hour

Source

pub fn rebalance_weight_health(&self) -> f64

Rebalance scoring weights; defaults to 0.6/0.2/0.2

Source

pub fn rebalance_weight_history(&self) -> f64

Source

pub fn rebalance_weight_breaker(&self) -> f64

Source

pub fn rebalance_empty_delta_threshold(&self) -> f64

Empty-manager bonus: required fullness delta between emptiest and next emptiest

Source

pub fn rebalance_empty_bonus_weight(&self) -> f64

Empty-manager bonus: bonus weight applied to emptiest manager score

Source

pub fn rebalance_empty_health_cutoff(&self) -> f64

Empty-manager bonus: minimum health score to qualify

Source

pub fn rebalance_health_stale_secs(&self) -> u64

Source

pub fn rebalance_health_stale_factor(&self) -> f64

Trait Implementations§

Source§

impl Clone for EnvironmentConfig

Source§

fn clone(&self) -> EnvironmentConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for EnvironmentConfig

Source§

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

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

impl Default for EnvironmentConfig

Source§

fn default() -> EnvironmentConfig

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> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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