pub struct QueueAutoScaler { /* private fields */ }Expand description
Auto-scaler that manages dynamic queue resizing
Implementations§
Source§impl QueueAutoScaler
impl QueueAutoScaler
Sourcepub fn new(config: AutoScaleConfig) -> Self
pub fn new(config: AutoScaleConfig) -> Self
Create a new auto-scaler with the given configuration
Sourcepub fn on_event_processed<M: Message>(
&mut self,
queue: &mut PriorityEventQueue<M>,
) -> Option<ScalingDecision>
pub fn on_event_processed<M: Message>( &mut self, queue: &mut PriorityEventQueue<M>, ) -> Option<ScalingDecision>
Process an event and potentially trigger scaling
Sourcepub fn evaluate_scaling<M: Message>(
&mut self,
queue: &mut PriorityEventQueue<M>,
) -> Option<ScalingDecision>
pub fn evaluate_scaling<M: Message>( &mut self, queue: &mut PriorityEventQueue<M>, ) -> Option<ScalingDecision>
Evaluate whether scaling is needed
Sourcepub fn metrics(&self) -> ScalingMetrics
pub fn metrics(&self) -> ScalingMetrics
Get current scaling metrics for monitoring
Auto Trait Implementations§
impl Freeze for QueueAutoScaler
impl RefUnwindSafe for QueueAutoScaler
impl Send for QueueAutoScaler
impl Sync for QueueAutoScaler
impl Unpin for QueueAutoScaler
impl UnwindSafe for QueueAutoScaler
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
Source§impl<T> Inspectable for T
impl<T> Inspectable for T
Source§fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
Conditionally inspect this value
Source§fn inspect_with<F>(self, label: &str, f: F) -> Self
fn inspect_with<F>(self, label: &str, f: F) -> Self
Inspect with a custom formatter