Hand-crafted gRPC-go client using server streaming

23 views
Skip to first unread message

Ryan Lubke

unread,
Oct 25, 2017, 10:50:29 AM10/25/17
to grpc.io
Hey Folks,

Some background first.  We have a requirement to support multiple serialization formats.  To this end, we've created a backend in Java, and are creating clients in multiple languages.  So far, we've been successful with Java, JS, and Python.  We're prototyping Go now (as we learn Go) where we have unary invocations working fine.  However, streaming (we're only interested in server streaming) seems to be a different beast.

Looking at the docs and the generated code, we need to provide a StreamDesc which references a StreamHandler.
This StreamHandler requires access to the server interface that was generated.

Beyond creating a server interface that the client consumes, is there anything that needs to back that interface?

Perhaps there's a simpler approach that I've missed?

Thanks
-rl

Ryan Lubke

unread,
Oct 26, 2017, 3:07:53 PM10/26/17
to grpc.io
Yep, I made it more difficult than it needed to be.  Disregard :)
Reply all
Reply to author
Forward
0 new messages