pub struct ServiceInstanceState { /* private fields */ }Expand description
ServiceInstanceState contains state of every service node
Implementations§
Source§impl ServiceInstanceState
impl ServiceInstanceState
pub fn new(fixed_weight: Option<bool>) -> Self
pub fn get_active_requests_count(&mut self, current_time: Option<i64>) -> i64
pub fn is_healthy(&self) -> bool
pub fn increment_failure_counts(&mut self) -> i64
pub fn increment_request_counts(&mut self) -> i64
pub fn increment_active_requests(&mut self) -> i64
pub fn decrement_active_requests(&mut self) -> i64
pub fn set_connection_failed_time(&mut self, message: Option<String>)
pub fn set_first_connection_time(&mut self)
pub fn set_response_time(&mut self, time: i64)
Trait Implementations§
Source§impl Clone for ServiceInstanceState
impl Clone for ServiceInstanceState
Source§fn clone(&self) -> ServiceInstanceState
fn clone(&self) -> ServiceInstanceState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ServiceInstanceState
impl RefUnwindSafe for ServiceInstanceState
impl Send for ServiceInstanceState
impl Sync for ServiceInstanceState
impl Unpin for ServiceInstanceState
impl UnwindSafe for ServiceInstanceState
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