Module Chatoyant_runtime.SseSource

Server-sent events parsing for provider streams.

The parser is incremental and keeps incomplete frames in state. It returns only complete events. Provider modules decode event data according to their own stream schemas.

Sourcetype event = {
  1. event : string option;
  2. data : string list;
}
Sourcetype state
Sourceval empty : state
Sourceval feed : state -> string -> state * event list
Sourceval finish : state -> event list
Sourceval is_done : event -> bool
Sourceval data_string : event -> string