(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-event-options)
dispatch an Event or EventOptions
dispatch an Event or EventOptions
(dispatch-n router event-or-event-options-list)
dispatch a seq of Events or EventOptions in a backpressure sensitive way
dispatch a seq of Events or EventOptions in a backpressure sensitive way
(dispatch-n-sync {app schema/a-frame-app-ctx :as router}
event-or-event-options-list)
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-event-options)
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 schema/a-frame-router-global-interceptors
:as router}
catch?
event-options)
(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
(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