Use tower-reconnect

This commit is contained in:
Lucio Franco
2019-08-31 02:14:45 -04:00
parent 2ce4a7969e
commit 644cc310f7
8 changed files with 149 additions and 48 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ pub mod hello_world {
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let origin = http::Uri::from_static("http://[::1]:50051");
let svc = Client::connect(origin).await?;
let svc = Client::connect(origin)?;
let mut client = hello_world::GreeterClient::new(svc);
+1 -4
View File
@@ -1,7 +1,4 @@
use futures::TryStreamExt;
use hyper::client::conn::Builder;
use hyper::client::connect::HttpConnector;
use hyper::client::service::{Connect, MakeService};
use route_guide::{Point, RouteNote};
use std::time::{Duration, Instant};
use tokio::timer::Interval;
@@ -16,7 +13,7 @@ mod route_guide {
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let origin = http::Uri::from_static("http://[::1]:10000");
let svc = Client::connect(origin).await?;
let svc = Client::connect(origin)?;
let mut client = route_guide::RouteGuideClient::new(svc);
let start = Instant::now();