struct CooldownTracker {
last_scale_time: HashMap<ResourceId, u64>,
}
Expand description
Tracks cooldown periods for resources to prevent flapping
Fields§
§last_scale_time: HashMap<ResourceId, u64>
Implementations§
Source§impl CooldownTracker
impl CooldownTracker
fn new() -> Self
fn is_cooled_down( &self, resource_id: &ResourceId, cooldown_seconds: u64, ) -> bool
fn record_scale_action(&mut self, resource_id: &ResourceId)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CooldownTracker
impl RefUnwindSafe for CooldownTracker
impl Send for CooldownTracker
impl Sync for CooldownTracker
impl Unpin for CooldownTracker
impl UnwindSafe for CooldownTracker
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