configurable middleware and metrics & http middleware#9596
Merged
Conversation
mattsse
requested changes
Jul 18, 2024
Comment on lines
+1147
to
+1148
| /// Configurable HTTP middleware | ||
| http_middleware: ServiceBuilder<HttpMiddleware>, |
Collaborator
There was a problem hiding this comment.
could we first install the rpcmiddleware before we look at the HTTP middleware?
Contributor
Author
There was a problem hiding this comment.
yes, sounds good. i just made that change
fc48884 to
1619ae3
Compare
1619ae3 to
5f414b1
Compare
mattsse
approved these changes
Jul 18, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
note: this compiles, but i don't think it would achieve the goal of allowing a builder to pass arbitrary middleware, as you can see here
another thing i tried was splitting the building of the server and the starting of the server into two distinct steps, but the trait bounds started to get very complicated and ultimately i wasn't able to get it working
this trait bound will get the server to start correctly
but i wish that it was more dynamic, i tried something like this
but that didnt work.
i adjusted the visibility of
RpcRequestMetricsServiceto avoid this error'cause it seems like a better solution than using
#[warn(private_bounds)]