For the ServerStreamingExecute function, let's say the stream.Send has an error and I want to handle it. Should I just log.Print it or should I return an error in the response?
Also for the ServerStreamingExecute function, the second argument it accepts stream is a type interface rather than type struct. The interface is called Machine_ServerStreamingExecuteServer
while the struct is called machineServerStreamingExecuteServer.
Why do we have to use the type interface here?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Toran, thanks so much for this tutorial!!
I am quite new to gRPC and have a few questions.
For the ServerStreamingExecute function, let's say the stream.Send has an error and I want to handle it. Should I just log.Print it or should I return an error in the response?
Also for the ServerStreamingExecute function, the second argument it accepts
stream
is a type interface rather than type struct. The interface is calledMachine_ServerStreamingExecuteServer
while the struct is called
machineServerStreamingExecuteServer
.Why do we have to use the type interface here?