Documentation
¶
Overview ¶
Package sse provides shared server-sent event decoding helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrStop = errors.New("sse: stop stream")
ErrStop stops SSE decoding without surfacing an error.
Functions ¶
func Decode ¶
Decode reads one SSE stream from reader until EOF, context cancellation, or a handler error.
Decode never closes reader; the caller owns its lifecycle. Context cancellation interrupts a blocked Read only when the underlying reader is context-aware, such as an HTTP response body whose request carries ctx. The handler runs synchronously and must return before Decode can continue or stop.
Types ¶
Click to show internal directories.
Click to hide internal directories.