/// (re)establish channels to all gRPC services that were started
/// with the specified test config
(re)establish channels to all gRPC services that were started
with the specified test config
( re ) establish channels to all gRPC services that were started with the specified test config
async fn reconnect(&mut self, test_config: &TestConfig) -> Result<(), String> {
        let server_type = test_config.server_type();
        self.router_grpc_connection = match server_type {
            ServerType::AllInOne | ServerType::Router => {
                let client_base = test_config.addrs().router_grpc_api().client_base();
                Some(
                    grpc_channel(test_config, client_base.as_ref())
                        .await
                        .map_err(|e| {
                            format!("Can not connect to router at {}: {}", client_base, e)
                        })?,
                )
            }
            _ => None,
        };
        self.ingester_grpc_connection = match server_type {
            ServerType::AllInOne | ServerType::Ingester => {
                let client_base = test_config.addrs().ingester_grpc_api().client_base();
                Some(
                    grpc_channel(test_config, client_base.as_ref())
                        .await
                        .map_err(|e| {
                            format!("Can not connect to ingester at {}: {}", client_base, e)
                        })?,
                )
            }
            _ => None,
        };
        self.querier_grpc_connection = match server_type {
            ServerType::AllInOne | ServerType::Querier => {
                let client_base = test_config.addrs().querier_grpc_api().client_base();
                Some(
                    grpc_channel(test_config, client_base.as_ref())
                        .await
                        .map_err(|e| {
                            format!("Can not connect to querier at {}: {}", client_base, e)
                        })?,
                )
            }
            _ => None,
        };
        self.compactor_grpc_connection = match server_type {
            ServerType::AllInOne | ServerType::Compactor => {
                let client_base = test_config.addrs().compactor_grpc_api().client_base();
                Some(
                    grpc_channel(test_config, client_base.as_ref())
                        .await
                        .map_err(|e| {
                            format!("Can not connect to compactor at {}: {}", client_base, e)
                        })?,
                )
            }
            _ => None,
        };
        Ok(())
    }
async fn reconnect ( & mut self , test_config : & TestConfig ) -> Result < ( ) , String > { let server_type = test_config . server_type ( ) ; self . router_grpc_connection = match server_type { ServerType :: AllInOne | ServerType :: Router => { let client_base = test_config . addrs ( ) . router_grpc_api ( ) . client_base ( ) ; Some ( grpc_channel ( test_config , client_base . as_ref ( ) ) . await . map_err ( | e | { format ! ( " " client_base e ) } ) ? , ) } _ => None , } ; self . ingester_grpc_connection = match server_type { ServerType :: AllInOne | ServerType :: Ingester => { let client_base = test_config . addrs ( ) . ingester_grpc_api ( ) . client_base ( ) ; Some ( grpc_channel ( test_config , client_base . as_ref ( ) ) . await . map_err ( | e | { format ! ( " " client_base e ) } ) ? , ) } _ => None , } ; self . querier_grpc_connection = match server_type { ServerType :: AllInOne | ServerType :: Querier => { let client_base = test_config . addrs ( ) . querier_grpc_api ( ) . client_base ( ) ; Some ( grpc_channel ( test_config , client_base . as_ref ( ) ) . await . map_err ( | e | { format ! ( " " client_base e ) } ) ? , ) } _ => None , } ; self . compactor_grpc_connection = match server_type { ServerType :: AllInOne | ServerType :: Compactor => { let client_base = test_config . addrs ( ) . compactor_grpc_api ( ) . client_base ( ) ; Some ( grpc_channel ( test_config , client_base . as_ref ( ) ) . await . map_err ( | e | { format ! ( " " client_base e ) } ) ? , ) } _ => None , } ; Ok ( ( ) ) }
(re)establish channels to all gRPC services that were started
with the specified test config
( re ) establish channels to all gRPC services that were started with the specified test config
&mut self
test_config
&TestConfig