pub struct BottleneckConfig {
pub bottleneck_type: BottleneckType,
pub severity: f64,
pub endpoint_pattern: Option<String>,
pub duration_secs: Option<u64>,
}Expand description
Bottleneck configuration
Fields§
§bottleneck_type: BottleneckTypeBottleneck type
severity: f64Severity (0.0-1.0, where 1.0 is maximum bottleneck)
endpoint_pattern: Option<String>Affected endpoint pattern (None = all endpoints)
duration_secs: Option<u64>Duration in seconds (None = indefinite)
Implementations§
Source§impl BottleneckConfig
impl BottleneckConfig
Sourcepub fn new(bottleneck_type: BottleneckType, severity: f64) -> Self
pub fn new(bottleneck_type: BottleneckType, severity: f64) -> Self
Create a new bottleneck configuration
Sourcepub fn with_endpoint_pattern(self, pattern: String) -> Self
pub fn with_endpoint_pattern(self, pattern: String) -> Self
Set endpoint pattern
Sourcepub fn with_duration(self, duration_secs: u64) -> Self
pub fn with_duration(self, duration_secs: u64) -> Self
Set duration
Trait Implementations§
Source§impl Clone for BottleneckConfig
impl Clone for BottleneckConfig
Source§fn clone(&self) -> BottleneckConfig
fn clone(&self) -> BottleneckConfig
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 BottleneckConfig
impl Debug for BottleneckConfig
Source§impl<'de> Deserialize<'de> for BottleneckConfig
impl<'de> Deserialize<'de> for BottleneckConfig
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
Auto Trait Implementations§
impl Freeze for BottleneckConfig
impl RefUnwindSafe for BottleneckConfig
impl Send for BottleneckConfig
impl Sync for BottleneckConfig
impl Unpin for BottleneckConfig
impl UnwindSafe for BottleneckConfig
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