Process-local channel event bus.
Extensions use this to talk to mounted channels without depending on their implementation namespaces. Channels subscribe while running and translate events into their local state/events. No listener failure may take down the publisher or sibling listeners.
Process-local channel event bus. Extensions use this to talk to mounted channels without depending on their implementation namespaces. Channels subscribe while running and translate events into their local state/events. No listener failure may take down the publisher or sibling listeners.
(add-channel-event-listener! channel-id listener-id listener-fn)Subscribe listener-fn to events for channel-id.
Listener receives the event map exactly as published. Re-registering the
same listener-id for a channel replaces the old listener. Returns
listener-id.
Subscribe `listener-fn` to events for `channel-id`. Listener receives the event map exactly as published. Re-registering the same `listener-id` for a channel replaces the old listener. Returns `listener-id`.
(channel-event-listeners channel-id)Return a snapshot of listener ids registered for channel-id. Diagnostic
helper; callers must not rely on ordering.
Return a snapshot of listener ids registered for `channel-id`. Diagnostic helper; callers must not rely on ordering.
(publish-channel-event! channel-id event)Publish event to currently-running subscribers of channel-id.
The event is assoc'ed with :channel/id when absent. Returns the number of
listeners invoked. Listener exceptions are caught and logged.
Publish `event` to currently-running subscribers of `channel-id`. The event is assoc'ed with `:channel/id` when absent. Returns the number of listeners invoked. Listener exceptions are caught and logged.
(remove-channel-event-listener! channel-id listener-id)Remove a listener registered with add-channel-event-listener!. Returns
nil.
Remove a listener registered with [[add-channel-event-listener!]]. Returns nil.
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 |