Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add non-async version of connect_with_connector #695

Closed
fridge-dev opened this issue Jun 29, 2021 · 0 comments · Fixed by #696
Closed

Add non-async version of connect_with_connector #695

fridge-dev opened this issue Jun 29, 2021 · 0 comments · Fixed by #696
Labels
A-tonic C-enhancement Category: New feature or request E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Experience needed to fix: Medium / intermediate
Milestone

Comments

@fridge-dev
Copy link

Feature Request

Crates

tonic

Motivation

I am using tonic with a custom transport protocol, so I am using connect_with_connector. However, my connector does not need to await anything, so I would like a version of connect_with_connector that is not async fn.

Proposal

Add a method on tonic::transport::Endpoint like pub fn connect_with_connector<C>(&self, connector: C) -> Result<Channel, Error>, emphasis on the non-async part. This would follow how the default transport (TCP) has async fn connect and fn connect_lazy.

Alternatives

My custom transport is also infallible, so another option could be pub fn connect_with_connector_connected<C>(&self, connector: C) -> Channel where C: ... and ... is a non-future type for converting Uri to Channel.

@LucioFranco LucioFranco added this to the 0.5 milestone Jun 29, 2021
@LucioFranco LucioFranco added A-tonic C-enhancement Category: New feature or request E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Experience needed to fix: Medium / intermediate labels Jun 29, 2021
LucioFranco added a commit that referenced this issue Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tonic C-enhancement Category: New feature or request E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Experience needed to fix: Medium / intermediate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants