Skip to main content

NetworkValidator

Trait NetworkValidator 

Source
pub trait NetworkValidator: Send + Sync {
    // Required methods
    fn check_connectivity<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        service_name: &'life1 str,
        options: &'life2 NetworkCheckOptions,
    ) -> Pin<Box<dyn Future<Output = Result<ConnectivityStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn verify_service_health<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        service_name: &'life1 str,
        options: &'life2 NetworkCheckOptions,
    ) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn test_latency<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        service_name: &'life1 str,
        options: &'life2 NetworkCheckOptions,
    ) -> Pin<Box<dyn Future<Output = Result<LatencyInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn batch_check<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        service_names: &'life1 [String],
        options: &'life2 NetworkCheckOptions,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<NetworkCheckResult>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

网络连通性验证

Required Methods§

Source

fn check_connectivity<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, service_name: &'life1 str, options: &'life2 NetworkCheckOptions, ) -> Pin<Box<dyn Future<Output = Result<ConnectivityStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

检查连通性

Source

fn verify_service_health<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, service_name: &'life1 str, options: &'life2 NetworkCheckOptions, ) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

验证服务健康状态

Source

fn test_latency<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, service_name: &'life1 str, options: &'life2 NetworkCheckOptions, ) -> Pin<Box<dyn Future<Output = Result<LatencyInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

测试延迟

Source

fn batch_check<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, service_names: &'life1 [String], options: &'life2 NetworkCheckOptions, ) -> Pin<Box<dyn Future<Output = Result<Vec<NetworkCheckResult>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

批量检查

Implementors§