How to send initial request to a bidirectional stream? #3726
-
As the title suggests, I've set up a bidirectional stream that has an initial payload. The server-side implementation takes in a payload as a struct, but I cannot find the corresponding protobuf definition for this initial payload. Trying to call the method without sending an initial payload triggers an error. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It would help a lot if you could provide a simple example that illustrated what you are after. I'm gathering that this is for gRPC but an actual simple design and example implementation would go a long way to clarify other points :) |
Beta Was this translation helpful? Give feedback.
-
I'm very sorry. It appears I did not use goa's generated code correctly. I accidentally used the protobuffer generated code directly rather than using the generated code that enwraps it. For anyone wondering about this question later on, use the generated code under gen, not under gen/grpc. There, the method is a function of the client, and it takes in the initial payload as an argument. Again, sorry for this question. It was caused by user error. |
Beta Was this translation helpful? Give feedback.
I'm very sorry. It appears I did not use goa's generated code correctly. I accidentally used the protobuffer generated code directly rather than using the generated code that enwraps it.
For anyone wondering about this question later on, use the generated code under gen, not under gen/grpc. There, the method is a function of the client, and it takes in the initial payload as an argument.
Again, sorry for this question. It was caused by user error.