What travels through a component's flow — the contract the procs
(process-event.controller, process-event.view) and the flow's callers
share.
IN (on the flow's in-chan, whoever sends it):
{:event [event-name params] ; required :signals {…} ; the component's slice of the client's signals, or nil :request-ctx {:logged-user … :app-config … :request-method …} ; only for an event that came with a request :mulog-ctx ctx ; optional: the sender's trace, re-established :reply promise} ; optional: rides through to the render
Plain data: no Ring request. adapters.handlers.request/->event-msg builds
one from a request; server-event builds one for a server event.
BETWEEN the procs and OUT (on the flow's out-chan): {:event :initial-ctx
:ctx …} with the same :mulog-ctx and :reply, plus :html once the view
has rendered — or an error message when a step threw (error, error-of).
What travels through a component's flow — the contract the procs
(`process-event.controller`, `process-event.view`) and the flow's callers
share.
IN (on the flow's in-chan, whoever sends it):
{:event [event-name params] ; required
:signals {…} ; the component's slice of the client's signals, or nil
:request-ctx {:logged-user … :app-config … :request-method …}
; only for an event that came with a request
:mulog-ctx ctx ; optional: the sender's trace, re-established
:reply promise} ; optional: rides through to the render
Plain data: no Ring request. `adapters.handlers.request/->event-msg` builds
one from a request; `server-event` builds one for a server event.
BETWEEN the procs and OUT (on the flow's out-chan): {:event :initial-ctx
:ctx …} with the same `:mulog-ctx` and `:reply`, plus `:html` once the view
has rendered — or an error message when a step threw (`error`, `error-of`).(error e msg)The message a proc emits instead of its result when e was thrown while
handling msg: keeps the trace and the reply, so the error reaches whoever
waits on it.
The message a proc emits instead of its result when `e` was thrown while handling `msg`: keeps the trace and the reply, so the error reaches whoever waits on it.
(error-of msg)The exception an error message carries, or nil for any other message.
The exception an error message carries, or nil for any other message.
(server-event event-name params)The in-chan message for an event the server sends (no request, no signals); the caller's trace rides along.
The in-chan message for an event the server sends (no request, no signals); the caller's trace rides along.
(with-reply out {:keys [reply]})Carries the incoming message's :reply (if any) onto an outgoing one.
Carries the incoming message's `:reply` (if any) onto an outgoing one.
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 |