Liking cljdoc? Tell your friends :D

wagoe.realtime.core.sse

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.
raw docstring

format-eventclj

(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.
sourceraw docstring

heartbeatclj

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.
sourceraw docstring

request-topicsclj

(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.
sourceraw docstring

retry-laterclj

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.
sourceraw docstring

subscription-decisionclj

(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 ...}}.
sourceraw docstring

user-identityclj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close