#[repr(i32)]pub enum LoadMetric {
Connections = 0,
Requests = 1,
ConnectionTime = 2,
}
Expand description
how sozu measures which backend is less loaded
Variants§
Connections = 0
number of TCP connections
Requests = 1
number of active HTTP requests
ConnectionTime = 2
time to connect to the backend, weighted by the number of active connections (peak EWMA)
Implementations§
Source§impl LoadMetric
impl LoadMetric
Source§impl LoadMetric
impl LoadMetric
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for LoadMetric
impl Clone for LoadMetric
Source§fn clone(&self) -> LoadMetric
fn clone(&self) -> LoadMetric
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 moreSource§impl Debug for LoadMetric
impl Debug for LoadMetric
Source§impl Default for LoadMetric
impl Default for LoadMetric
Source§fn default() -> LoadMetric
fn default() -> LoadMetric
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LoadMetric
impl<'de> Deserialize<'de> for LoadMetric
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<LoadMetric> for i32
impl From<LoadMetric> for i32
Source§fn from(value: LoadMetric) -> i32
fn from(value: LoadMetric) -> i32
Converts to this type from the input type.
Source§impl Hash for LoadMetric
impl Hash for LoadMetric
Source§impl Ord for LoadMetric
impl Ord for LoadMetric
Source§fn cmp(&self, other: &LoadMetric) -> Ordering
fn cmp(&self, other: &LoadMetric) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LoadMetric
impl PartialEq for LoadMetric
Source§impl PartialOrd for LoadMetric
impl PartialOrd for LoadMetric
Source§impl Serialize for LoadMetric
impl Serialize for LoadMetric
Source§impl TryFrom<i32> for LoadMetric
impl TryFrom<i32> for LoadMetric
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<LoadMetric, UnknownEnumValue>
fn try_from(value: i32) -> Result<LoadMetric, UnknownEnumValue>
Performs the conversion.
impl Copy for LoadMetric
impl Eq for LoadMetric
impl StructuralPartialEq for LoadMetric
Auto Trait Implementations§
impl Freeze for LoadMetric
impl RefUnwindSafe for LoadMetric
impl Send for LoadMetric
impl Sync for LoadMetric
impl Unpin for LoadMetric
impl UnwindSafe for LoadMetric
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.