pub struct ScalingThreshold {
pub metric_name: String,
pub scale_up_threshold: MetricValue,
pub scale_down_threshold: MetricValue,
pub scale_factor: f64,
pub cooldown_seconds: u64,
}
Expand description
Defines when and how to scale based on metric thresholds
Fields§
§metric_name: String
The metric to watch (e.g., “cpu_percent”)
scale_up_threshold: MetricValue
Scale up when metric goes above this value
scale_down_threshold: MetricValue
Scale down when metric goes below this value
scale_factor: f64
How much to scale by (e.g., 1.5 = increase by 50%)
cooldown_seconds: u64
Minimum time between scaling actions (prevents flapping)
Trait Implementations§
Source§impl Clone for ScalingThreshold
impl Clone for ScalingThreshold
Source§fn clone(&self) -> ScalingThreshold
fn clone(&self) -> ScalingThreshold
Returns a copy 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 ScalingThreshold
impl Debug for ScalingThreshold
Source§impl<'de> Deserialize<'de> for ScalingThreshold
impl<'de> Deserialize<'de> for ScalingThreshold
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 ScalingThreshold
impl RefUnwindSafe for ScalingThreshold
impl Send for ScalingThreshold
impl Sync for ScalingThreshold
impl Unpin for ScalingThreshold
impl UnwindSafe for ScalingThreshold
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