-
Notifications
You must be signed in to change notification settings - Fork 96
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 dynamic input type and output type #312
Comments
I don't fully understand the problem you're solving - sorry! It sounds like you have a client that's using the Why not have the client use the gRPC protocol instead (using the |
But the client is web, do not support using grpc. |
connect-go supports both the gRPC-Web and Connect protocols on both the client and server, are those not sufficient? |
Got it! That makes sense. The best option is to wait a few weeks and use |
So, the answer is use a grpc-web proxy?
We are also using php, I think the priority of support php is very low. |
I think that the best answer is to use the gRPC-Web protocol and Envoy. You'll get the widest possible language support and a hardened, fast proxy without any custom code. That does give up many of the benefits of the Connect protocol, though. If you'd rather use the Connect protocol and write your own proxy, nothing's stopping you! The trick is that you don't want to serialize or deserialize the messages at all - the gRPC, gRPC-Web, and Connect protocols all use standard protobuf binary encoding (or the standard protojson encoding), so you can copy the binary around without deserializing into Go structures. Naturally, this is also a lot faster than constantly using You can do this by overriding the built-in Best of luck! |
Is your feature request related to a problem? Please describe.
Trying to build a connect gateway, support post and grpc.
The proto is dynamic, generated from grpc reflect, but connect handler can not use the dynamic type due to handler code like this
I think connect-go can support dynamic pb type, the input and output type is based on reflect MessageType, maybe pass from
HandlerOption
, soNewUnaryHandler[any,any]()
can work as expected.Describe the solution you'd like
Describe alternatives you've considered
Additional context
connect protocol makes grpc eaiser, but for migration, need a gateway to translate the protocol for other languages that don't speak connect protocol.
The text was updated successfully, but these errors were encountered: