Class: Braintrust::Server::SSEStreamBody
- Inherits:
-
Object
- Object
- Braintrust::Server::SSEStreamBody
- Defined in:
- lib/braintrust/server/sse.rb
Overview
Rack 3 streaming response body that writes SSE events via ‘call(stream)`.
Required for servers using the protocol-rack adapter (e.g. Falcon), which dispatches ‘each`-based bodies through a buffered Enumerable path. Bodies that respond only to `call` are dispatched through the Streaming path for true async writes.
Instance Method Summary collapse
- #call(stream) ⇒ Object
-
#initialize(&block) ⇒ SSEStreamBody
constructor
A new instance of SSEStreamBody.
Constructor Details
#initialize(&block) ⇒ SSEStreamBody
Returns a new instance of SSEStreamBody.
29 30 31 |
# File 'lib/braintrust/server/sse.rb', line 29 def initialize(&block) @block = block end |