-
Notifications
You must be signed in to change notification settings - Fork 19
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
Multiplex gRPC servers #309
Conversation
For my use case at least, it would be more ergonomic if |
On closer inspection, |
grpc/server/src/Mu/GRpc/Server.hs
Outdated
@@ -29,6 +29,7 @@ module Mu.GRpc.Server | |||
, runGRpcAppTLS, TLSSettings | |||
-- * Convert a 'Server' into a WAI application | |||
, gRpcApp, gRpcAppTrans | |||
, gRpcMultipleApp, gRpcMultipleAppTrans |
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.
As per @akshaymankar suggestion, we should consider exporting MultipleServers
too?
, gRpcMultipleApp, gRpcMultipleAppTrans | |
, gRpcMultipleApp, gRpcMultipleAppTrans, MultipleServers(..) |
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.
Also gRpcMultipleServerHandlers
. Also, if that is being exposed it might be best to remove ToMultipleServers
and instead provide functions to just translate tuples into MultipleServers
and make these functions directly depend on MultipleServers
I've pushed a simplification of the approach: instead of using a hand-rolled heterogeneus list ( gRpcMultipleApp msgAvro [Srv server1, Srv server2] @akshaymankar @kutyel thoughts? If that seems OK, I'll add some documentation and merge the PR. |
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.
LGTM!
Looks good to me too 💯 |
Closes #244