MCPcopy
hub / github.com/docker/docker-agent / errorStream

Struct errorStream

pkg/telemetry/genai/genai_test.go:166–171  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
166type errorStream struct {
167 finishFirst bool
168 finishWithError bool
169 sent bool
170 err error
171}
172
173func (s *errorStream) Recv() (chat.MessageStreamResponse, error) {
174 if s.finishWithError && !s.sent {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected