pub struct SleepPolicyConfig {
pub warm_threshold_secs: u64,
pub sleep_threshold_secs: u64,
pub cpu_threshold: f32,
pub net_bytes_threshold: u64,
}Expand description
Configurable thresholds for per-pool sleep policy.
When set on a DesiredPool, overrides the system-wide default thresholds
for idle detection and sleep transitions.
Fields§
§warm_threshold_secs: u64Idle seconds before Running → Warm transition (default: 300).
sleep_threshold_secs: u64Idle seconds before Warm → Sleeping transition (default: 900).
cpu_threshold: f32CPU % below which an instance is considered idle (default: 5.0).
net_bytes_threshold: u64Net bytes below which an instance is considered idle (default: 1024).
Trait Implementations§
Source§impl Clone for SleepPolicyConfig
impl Clone for SleepPolicyConfig
Source§fn clone(&self) -> SleepPolicyConfig
fn clone(&self) -> SleepPolicyConfig
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 SleepPolicyConfig
impl Debug for SleepPolicyConfig
Source§impl Default for SleepPolicyConfig
impl Default for SleepPolicyConfig
Source§impl<'de> Deserialize<'de> for SleepPolicyConfig
impl<'de> Deserialize<'de> for SleepPolicyConfig
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 SleepPolicyConfig
impl RefUnwindSafe for SleepPolicyConfig
impl Send for SleepPolicyConfig
impl Sync for SleepPolicyConfig
impl Unpin for SleepPolicyConfig
impl UnsafeUnpin for SleepPolicyConfig
impl UnwindSafe for SleepPolicyConfig
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