Documentation
¶
Overview ¶
Package sse provides Server-Sent Events (SSE) support for streaming responses from neoma API handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WriteTimeout = 5 * time.Second
WriteTimeout is the deadline applied to each SSE write operation.
Functions ¶
func Register ¶
func Register[I any](api core.API, op core.Operation, eventTypeMap map[string]any, handler func(ctx context.Context, input *I, send Sender))
Register adds an SSE endpoint to the API. It configures the operation's response schema from the eventTypeMap and streams events via the handler's Sender callback.
Types ¶
Click to show internal directories.
Click to hide internal directories.