Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSEFrame ¶
SSEFrame is one parsed server-sent-event frame collected from a stream body.
func ReadSSEFramesUntil ¶
func ReadSSEFramesUntil( body io.ReadCloser, timeout time.Duration, stop func([]SSEFrame) bool, ) ([]SSEFrame, error)
ReadSSEFramesUntil reads SSE frames from body until stop reports success, the stream ends, or timeout expires. The helper owns body for the duration of the read and closes it on early termination so the scanner goroutine exits.
Click to show internal directories.
Click to hide internal directories.