Skip to main content

Module streaming

Module streaming 

Source
Expand description

Streaming a task.

The ordering rules are the whole of this module. sequence_number starts at 0 and increases by exactly one per event, so a client can detect a dropped event rather than silently rendering a gap. The first event is response.created. Exactly one terminal event — response.completed, response.incomplete or response.failed — ends the stream, and it carries the complete response object, so a client that watched nothing in between still ends up with the same result the non-streaming path returns.

Structs§

StreamEvent
One streamed event.

Functions§

sse
Stream a task as it runs, in a well-ordered event sequence.