pub struct RoutingPoolState {
pub round_robin_cursor: usize,
pub selection_counter: u64,
pub health: HashMap<String, TargetHealth>,
}Expand description
Mutable routing pool state (cursors, counters, per-target health).
Fields§
§round_robin_cursor: usizeCursor for round-robin among healthy indices.
selection_counter: u64Monotonic counter driving weighted / P2C selection.
health: HashMap<String, TargetHealth>Per-target health keyed by target id.
Implementations§
Source§impl RoutingPoolState
impl RoutingPoolState
Sourcepub fn ensure_targets(
&mut self,
pool: &[RoutingTarget],
config: CircuitBreakerConfig,
)
pub fn ensure_targets( &mut self, pool: &[RoutingTarget], config: CircuitBreakerConfig, )
Ensure every target in pool has a health entry.
Trait Implementations§
Source§impl Clone for RoutingPoolState
impl Clone for RoutingPoolState
Source§fn clone(&self) -> RoutingPoolState
fn clone(&self) -> RoutingPoolState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RoutingPoolState
impl Debug for RoutingPoolState
Source§impl Default for RoutingPoolState
impl Default for RoutingPoolState
Source§fn default() -> RoutingPoolState
fn default() -> RoutingPoolState
Returns the “default value” for a type. Read more
impl Eq for RoutingPoolState
Source§impl PartialEq for RoutingPoolState
impl PartialEq for RoutingPoolState
impl StructuralPartialEq for RoutingPoolState
Auto Trait Implementations§
impl Freeze for RoutingPoolState
impl RefUnwindSafe for RoutingPoolState
impl Send for RoutingPoolState
impl Sync for RoutingPoolState
impl Unpin for RoutingPoolState
impl UnsafeUnpin for RoutingPoolState
impl UnwindSafe for RoutingPoolState
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