-
Notifications
You must be signed in to change notification settings - Fork 688
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
chore: export NodeHealthProxyLayer #5768
chore: export NodeHealthProxyLayer #5768
Conversation
80ef594
to
46e5144
Compare
@@ -43,7 +42,7 @@ pub use jsonrpsee::{ | |||
core::id_providers::{RandomIntegerIdProvider, RandomStringIdProvider}, | |||
server::{middleware::rpc::RpcServiceBuilder, BatchRequestConfig}, | |||
}; | |||
pub use middleware::{Metrics, MiddlewareLayer, RpcMetrics}; | |||
pub use middleware::{Metrics, MiddlewareLayer, NodeHealthProxyLayer, RpcMetrics}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it useful to export the middleware implementation?
it's not possible to opt in/out from it anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to reimpl these rpc-servers and wanna add more layer.
Current, start_server
could not add more layers for http.
So need to define the another.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow, you want to write your own start server
or an API to inject your own http middleware?
Anyway, doesn't hurt to re-export it from my-side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to write an issue which what functionality you want.
We could expose APIs for folks to inject their own middleware both http and rpc... but it's a little tricky to get the traits bounds satisfied properly.
bot fmt |
@bkchr https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7410937 was started for your command Comment |
@bkchr Command |
3962ec0
No description provided.