(listen conn handler)
(listen conn
handler
{:keys [init timeout on-timeout result]
:or {init {}
timeout 15000
on-timeout (fn* [p1__11168#]
(throw (ex-info "Timeout"
{:kaocha.cljs2.funnel-client/ctx
p1__11168#})))
result (fn* [p1__11169#]
(and (reduced? p1__11169#)
(clojure.core/deref p1__11169#)))}})
"Coffee-grinder" that processes messages we receive from funnel. Messages are dispatched to a handler function, a context map is threaded through each handler.
Options: :timeout
in milliseconds, will call the :on-timeout
callback when
reached, defaults to throwing an exception. Set to falsey to wait indefintely.
:init
, init value for the context to be threaded through. :result
gets
called on each iteration to see if the loop should finish. Defaults to waiting
for a reduced
value.
"Coffee-grinder" that processes messages we receive from funnel. Messages are dispatched to a handler function, a context map is threaded through each handler. Options: `:timeout` in milliseconds, will call the `:on-timeout` callback when reached, defaults to throwing an exception. Set to falsey to wait indefintely. `:init`, init value for the context to be threaded through. `:result` gets called on each iteration to see if the loop should finish. Defaults to waiting for a `reduced` value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close