Trait MetricsCollector

Source
pub trait MetricsCollector:
    Send
    + Sync
    + Debug {
    // Required methods
    fn collect_vm_metrics<'life0, 'life1, 'async_trait>(
        &'life0 self,
        vm_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f32>, AutoscalerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn collect_node_metrics<'life0, 'life1, 'async_trait>(
        &'life0 self,
        node_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f32>, AutoscalerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn collect_aggregate_metrics<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f32>, AutoscalerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Interface for collecting metrics from VMs and nodes

Required Methods§

Source

fn collect_vm_metrics<'life0, 'life1, 'async_trait>( &'life0 self, vm_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f32>, AutoscalerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Collect metrics from a specific VM

Source

fn collect_node_metrics<'life0, 'life1, 'async_trait>( &'life0 self, node_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f32>, AutoscalerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Collect metrics from a specific node

Source

fn collect_aggregate_metrics<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f32>, AutoscalerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Collect aggregate metrics for all VMs and nodes

Implementors§