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

Implement tower::Layer for tonic_web::Config #1117

Closed
slinkydeveloper opened this issue Oct 18, 2022 · 2 comments · Fixed by #1119
Closed

Implement tower::Layer for tonic_web::Config #1117

slinkydeveloper opened this issue Oct 18, 2022 · 2 comments · Fixed by #1119

Comments

@slinkydeveloper
Copy link
Contributor

Feature Request

Per title, tonic_web::Config is doing pretty much the job of a tower::Layer (see Config::enable function). Would it be possible to implement the tower::Layer interface directly?

Crates

  • tonic_web

Motivation

Better integration with tower based layers/services

Proposal

Implement tower::Layer for tonic_web::Config

Alternatives

Implement the layer manually now with a newtype

@LucioFranco
Copy link
Member

Yeah, this also seems like a fair ask. I would be interested in a PR for this to see how it looks.

slinkydeveloper added a commit to slinkydeveloper/tonic that referenced this issue Oct 19, 2022
Signed-off-by: slinkydeveloper <francescoguard@gmail.com>
@slinkydeveloper
Copy link
Contributor Author

Here is the PR: #1119

slinkydeveloper added a commit to slinkydeveloper/tonic that referenced this issue Oct 24, 2022
Signed-off-by: slinkydeveloper <francescoguard@gmail.com>
slinkydeveloper added a commit to slinkydeveloper/tonic that referenced this issue Oct 24, 2022
Signed-off-by: slinkydeveloper <francescoguard@gmail.com>
slinkydeveloper added a commit to slinkydeveloper/tonic that referenced this issue Oct 24, 2022
Signed-off-by: slinkydeveloper <francescoguard@gmail.com>
slinkydeveloper added a commit to slinkydeveloper/tonic that referenced this issue Oct 25, 2022
Signed-off-by: slinkydeveloper <francescoguard@gmail.com>
slinkydeveloper added a commit to slinkydeveloper/tonic that referenced this issue Oct 31, 2022
Signed-off-by: slinkydeveloper <francescoguard@gmail.com>
slinkydeveloper added a commit to slinkydeveloper/tonic that referenced this issue Oct 31, 2022
Signed-off-by: slinkydeveloper <francescoguard@gmail.com>
slinkydeveloper added a commit to slinkydeveloper/tonic that referenced this issue Oct 31, 2022
Signed-off-by: slinkydeveloper <francescoguard@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants