Class: A2A::SSE::RestStream
- Defined in:
- lib/a2a/sse/rest_stream.rb
Overview
SSE stream for the HTTP+JSON/REST binding.
Per the A2A spec, REST streaming returns SSE where each ‘data:` line is a bare StreamResponse JSON object (no envelope wrapping).
This is essentially just an alias for Stream — the base class already emits bare JSON. We keep this as a named class for symmetry with JsonRpcStream and to make binding code self-documenting.
Usage:
stream = A2A::SSE::RestStream.new(task_id: "t1", context_id: "c1")
Async do
stream.task(status: { state: "TASK_STATE_WORKING", timestamp: "..." })
stream.finish
end
[200, A2A::SSE::Stream.headers, stream]
Constant Summary
Constants inherited from Stream
Instance Attribute Summary
Attributes inherited from Stream
Method Summary
Methods inherited from Stream
#event, #finish, headers, #initialize
Constructor Details
This class inherits a constructor from A2A::SSE::Stream