Pure pieces of the server-sent events bridge: the wire format, the identity a session user maps to, and the decision on which topics a stream may open.
Pure pieces of the server-sent events bridge: the wire format, the identity a session user maps to, and the decision on which topics a stream may open.
(connection-tenant {:keys [user tenant] :as request})The resolved tenant if the user may act in it, else the user's own; a client
can name the resolved one in a header (BOU-947). The rule of
wagoe.core.http.access/in-tenant-scope?, which realtime does not depend on.
The resolved tenant if the user may act in it, else the user's own; a client can name the resolved one in a header (BOU-947). The rule of `wagoe.core.http.access/in-tenant-scope?`, which realtime does not depend on.
(format-event event data)One SSE event. Each line of data gets its own data: field, as the spec
requires; the browser joins them back with newlines. A lone CR ends a line
in SSE too, so it splits here rather than inject a field.
One SSE event. Each line of `data` gets its own `data:` field, as the spec requires; the browser joins them back with newlines. A lone CR ends a line in SSE too, so it splits here rather than inject a field.
An SSE comment line. Browsers ignore it; it keeps proxies from timing the stream out and makes a dead client surface as a failed write.
An SSE comment line. Browsers ignore it; it keeps proxies from timing the stream out and makes a dead client surface as a failed write.
(request-topics query-params)The topic query parameter as a vector of topic names; repeated params
arrive as a vector.
The `topic` query parameter as a vector of topic names; repeated params arrive as a vector.
Tells EventSource to reconnect in 10 s; sent, then closed, when a node has no stream slot free.
Tells EventSource to reconnect in 10 s; sent, then closed, when a node has no stream slot free.
(subscription-decision topics allowed? max-topics)Decide whether topics may be streamed; allowed? answers per topic.
Returns {:ok topics} or {:error {:type ... :message ...}}.
Decide whether `topics` may be streamed; `allowed?` answers per topic.
Returns {:ok topics} or {:error {:type ... :message ...}}.(user-identity user)The connection identity for a signed-in user (:user on the request), or
nil when there is none or its id is not a UUID.
The connection identity for a signed-in user (`:user` on the request), or nil when there is none or its id is not a UUID.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |