Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForEachDataLine ¶
ForEachDataLine scans an SSE stream and invokes fn for each data line.
It supports both plain `data: ...` streams and named events using `event: ...` followed by `data: ...`.
Context cancellation is honoured during blocking reads: if ctx is cancelled while waiting for the next line, ForEachDataLine returns ctx.Err() promptly.
Types ¶
Click to show internal directories.
Click to hide internal directories.