Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Change Resolve to alias Service #1903

Closed
seanmonstar opened this issue Aug 17, 2019 · 2 comments · Fixed by #2011
Closed

Change Resolve to alias Service #1903

seanmonstar opened this issue Aug 17, 2019 · 2 comments · Fixed by #2011
Labels
A-client Area: client. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.
Milestone

Comments

@seanmonstar
Copy link
Member

After #1782 is done, the Resolve trait should be changed to basically an alias for a Service<Name>. This would allow more composability, being able to use ServiceExt to customize resolvers.

@seanmonstar seanmonstar added A-client Area: client. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful. labels Aug 17, 2019
@seanmonstar seanmonstar added this to the 0.13 milestone Aug 17, 2019
@bstrie
Copy link

bstrie commented Oct 21, 2019

Now that #1792 is closed, what do you have in mind by "basically an alias"? I assume this isn't referring to waiting for rust-lang/rust#41517 , so what should Resolve become?

@seanmonstar
Copy link
Member Author

It'd be similar to HttpService, basically just bounds that mean R: Service<Name, Response = impl Iterator<Item = IpAddr>>. As the top comment mentions, that'd allow composing Services, such as easily adding in a timeout layer.

seanmonstar added a commit that referenced this issue Nov 12, 2019
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`.
seanmonstar added a commit that referenced this issue Nov 12, 2019
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`.
seanmonstar added a commit that referenced this issue Nov 12, 2019
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`.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-client Area: client. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants