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

Support turning any Service into a MakeService #1302

Merged
merged 3 commits into from Aug 22, 2022
Merged

Support turning any Service into a MakeService #1302

merged 3 commits into from Aug 22, 2022

Conversation

davidpdrsn
Copy link
Member

Fixes #1120

@davidpdrsn davidpdrsn enabled auto-merge (squash) August 22, 2022 16:36
Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I just wonder: Is axum the right crate for this functionality? (as opposed to hyper / tower-util / tower-http)

@davidpdrsn
Copy link
Member Author

tower already has Shared which is identical to IntoMakeService. We could add a helper to tower::ServiceExt. But I kinda still wanna keep it in axum 😕 feels a bit more discoverable plus its one fewer dependency users have to add.

I don't think IntoMakeServiceWithConnectInfo could live in tower-http however. It uses the Connected trait which has an impl for AddrStream from hyper. Don't think tower-http should have a public dependency on hyper.

@davidpdrsn davidpdrsn merged commit fa51cf5 into main Aug 22, 2022
@davidpdrsn davidpdrsn deleted the service-ext branch August 22, 2022 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Middleware cannot change the request in a way that impacts routing
2 participants