Trait MetricsCollector

Source
pub trait MetricsCollector:
    Send
    + Sync
    + Debug {
    // Required methods
    fn collect_instance_metrics<'life0, 'life1, 'async_trait>(
        &'life0 self,
        instance_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 app instances and nodes

Required Methods§

Source

fn collect_instance_metrics<'life0, 'life1, 'async_trait>( &'life0 self, instance_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 app instance

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 app instances and nodes

Implementors§