Documentation
¶
Overview ¶
Package realtime declares the browser presentation-event realtime compiler capability and exposes dependency-free SSE helpers.
Index ¶
Constants ¶
const ImportPath = "github.com/cssbruno/gowdk/addons/realtime"
ImportPath is the canonical Go import path for the realtime addon.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PresentationFanout ¶
type PresentationFanout = contracts.PresentationFanout
PresentationFanout sends browser-facing presentation events.
type SSEHub ¶
type SSEHub = runtimerealtime.SSEHub
SSEHub fans presentation events out to connected server-sent events clients.
type SSEOption ¶
type SSEOption = runtimerealtime.SSEOption
SSEOption configures a dependency-free SSE hub.
func WithSSEAudienceFromRequest ¶ added in v0.8.0
WithSSEAudienceFromRequest assigns server-owned audience labels to one SSE client. Scoped presentation events are delivered only when every event label is present in the client audience set.
func WithSSEBufferSize ¶
WithSSEBufferSize sets each SSE client's queued message buffer.
func WithSSEReplayLimit ¶ added in v0.12.0
WithSSEReplayLimit keeps a bounded in-memory replay buffer for browser reconnects that send Last-Event-ID.
func WithSSERetryMillis ¶ added in v0.12.0
WithSSERetryMillis sets the browser EventSource reconnect delay advertised by the generated SSE stream.
type SSEStats ¶ added in v0.12.0
type SSEStats = runtimerealtime.SSEStats
SSEStats reports process-local SSE hub counters for app-owned metrics export.