(-replace-global-interceptor global-interceptors
{interceptor-id :id :as interceptor})
(clear-global-interceptors {global-interceptors-a
schema/a-frame-router-global-interceptors-a
:as _router})
(clear-global-interceptors {global-interceptors-a
schema/a-frame-router-global-interceptors-a
:as _router}
id)
(create-router app
{global-interceptors schema/a-frame-router-global-interceptors
executor schema/a-frame-router-executor
buffer-size schema/a-frame-router-buffer-size
:or {buffer-size 100}
:as opts})
(create-router app
{global-interceptors schema/a-frame-router-global-interceptors
buffer-size schema/a-frame-router-buffer-size
:or {buffer-size 100}
:as opts})
(dispatch {event-s schema/a-frame-router-event-stream :as _router}
event-or-extended-event)
dispatch an Event or ExtendedEvent
dispatch an Event or ExtendedEvent
(dispatch-n router events-or-extended-events)
dispatch a seq of Events or ExtendedEvents in a backpressure sensitive way
dispatch a seq of Events or ExtendedEvents in a backpressure sensitive way
(dispatch-n-sync {app schema/a-frame-app-ctx :as router}
events-or-extended-events)
puts events onto a temporary stream, handles events from the stream, and returns when the stream is empty
puts events onto a temporary stream, handles events from the stream, and returns when the stream is empty
(dispatch-sync {app schema/a-frame-app-ctx :as router} event-or-extended-event)
puts the event-v on to a temporary stream, handles events from the stream and return when the stream is empty.
returns Promise<interceptor-context> from the handling of the event-v, so dispatch-sync can be called to handle an event locally, and then extract a result from the interceptor context
errors at any point during the handling of the event-v or any dispatches resulting from it will propagate back to the caller - if the caller was itself an event then the handling of that event will fail
puts the event-v on to a temporary stream, handles events from the stream and return when the stream is empty. returns Promise<interceptor-context> from the handling of the event-v, so dispatch-sync can be called to handle an event locally, and then extract a result from the interceptor context errors at any point during the handling of the event-v or any dispatches resulting from it will propagate back to the caller - if the caller was itself an event then the handling of that event will fail
(handle-event {app schema/a-frame-app-ctx
global-interceptors-a schema/a-frame-router-global-interceptors-a
:as router}
catch?
extended-ev)
(handle-event-stream {event-s schema/a-frame-router-event-stream :as router})
handle a regular, infinite, event-stream
handle a regular, infinite, event-stream
(handle-sync-event-stream {tmp-event-s schema/a-frame-router-event-stream
:as tmp-router})
handle events off of the stream until the stream is empty, at which point return the interceptor context of the very first event off of the stream
letting errors propagate out of the loop currently causes crashes on cljs (cf: stream.operations/reduce) so we catch errors inside the loop and wrap them in UncaughtErrorWrapper for rethrowing outside the loop
handle events off of the stream until the stream is empty, at which point return the interceptor context of the very first event off of the stream letting errors propagate out of the loop currently causes crashes on cljs (cf: stream.operations/reduce) so we catch errors inside the loop and wrap them in UncaughtErrorWrapper for rethrowing outside the loop
(reg-global-interceptor {global-interceptors-a
schema/a-frame-router-global-interceptors-a
:as _router}
{interceptor-id :id :as interceptor})
(stop-a-frame-router {event-s schema/a-frame-router-event-stream :as _router})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close