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

Struct StreamStoppedEvent

pkg/runtime/event.go:499–505  ·  view source on GitHub ↗

StreamStoppedEvent reports that a RunStream loop has stopped. Reason carries the turnEndReason* classification (normal, error, canceled) so consumers can tell successful completion apart from crashes and user-initiated stops. Delivery is best-effort: it is emitted non-blockingly during teardown and

Source from the content-addressed store, hash-verified

497// the guaranteed terminal signal. Do not assume session-end hooks have finished
498// when this event arrives: it is emitted before they run.
499type StreamStoppedEvent struct {
500 AgentContext
501
502 Type string `json:"type"`
503 SessionID string `json:"session_id,omitempty"`
504 Reason string `json:"reason,omitempty"`
505}
506
507func StreamStopped(sessionID, agentName, reason string) Event {
508 return &StreamStoppedEvent{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected