pub struct AutoScaler { /* private fields */ }
Implementations§
Source§impl AutoScaler
impl AutoScaler
pub fn new(broker: Arc<RedisBroker>) -> Self
pub fn with_config(broker: Arc<RedisBroker>, config: AutoScalerConfig) -> Self
pub async fn collect_metrics(&self) -> Result<AutoScalerMetrics, TaskQueueError>
pub fn decide_scaling_action( &mut self, metrics: &AutoScalerMetrics, ) -> Result<ScalingAction, TaskQueueError>
pub async fn get_scaling_recommendations( &self, ) -> Result<String, TaskQueueError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AutoScaler
impl !RefUnwindSafe for AutoScaler
impl Send for AutoScaler
impl Sync for AutoScaler
impl Unpin for AutoScaler
impl !UnwindSafe for AutoScaler
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