feat(client): change Resolve to be Service<Name>

Closes #1903

BREAKING CHANGE: The `Resolve` trait is gone. All custom resolves should
  implement `tower::Service` instead.

  The error type of `HttpConnector` has been changed away from
  `std::io::Error`.
This commit is contained in:
Sean McArthur
2019-11-12 12:06:16 -08:00
parent 039281b89c
commit 9d9233ce7c
3 changed files with 171 additions and 132 deletions

View File

@@ -1722,7 +1722,7 @@ mod dispatch_impl {
impl hyper::service::Service<Destination> for DebugConnector {
type Response = (DebugStream, Connected);
type Error = io::Error;
type Error = <HttpConnector as hyper::service::Service<Destination>>::Error;
type Future = Pin<Box<dyn Future<
Output = Result<Self::Response, Self::Error>
> + Send>>;