Discover Packages
github.com/alexedtionweb/niro-stream
internal
sse
package
Version:
v0.3.0-alpha
Opens a new window with list of versions in this module.
Published: Mar 1, 2026
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package sse provides a minimal Server-Sent Events reader.
It handles the SSE wire format used by OpenAI, Anthropic,
and most streaming LLM APIs.
This is an internal package — not part of the public API.
type Event struct {
Data []byte
}
Event represents a single Server-Sent Event.
Reader reads Server-Sent Events from an io.Reader.
NewReader creates an SSE Reader.
Next reads the next SSE data event.
Skips non-data lines (event:, id:, retry:, comments, blank lines).
Returns io.EOF when the stream ends or a [DONE] marker is received.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.