errorStream yields an optional finish-reason chunk then returns a transport error on the next Recv. When finishWithError is true it returns both the finish reason and the error in the same Recv call.
| 164 | // transport error on the next Recv. When finishWithError is true it returns |
| 165 | // both the finish reason and the error in the same Recv call. |
| 166 | type errorStream struct { |
| 167 | finishFirst bool |
| 168 | finishWithError bool |
| 169 | sent bool |
| 170 | err error |
| 171 | } |
| 172 | |
| 173 | func (s *errorStream) Recv() (chat.MessageStreamResponse, error) { |
| 174 | if s.finishWithError && !s.sent { |
nothing calls this directly
no outgoing calls
no test coverage detected