Liking cljdoc? Tell your friends :D

com.wsscode.async.processing


*default-timeout*clj/s

source

await!clj/s

(await! {:com.wsscode.async.processing/keys [request-id timeout] :as msg})

Wait for some async response, this returns a channel that will receive the data once the other side responds to the ::request-id.

When message doesn't have a ::request-id this function is a noop, so its safe to call in the message return point of your code.

Wait for some async response, this returns a channel that will receive the data
once the other side responds to the ::request-id.

When message doesn't have a ::request-id this function is a noop, so its safe to
call in the message return point of your code.
sourceraw docstring

capture-response!clj/s

(capture-response! {:com.wsscode.async.processing/keys [response-id
                                                        request-response]})

Use this helper in the receiving side of events, right before sending to your original handler message. This will ensure that response messages are propagated back to the listener.

Use this helper in the receiving side of events, right before sending to your original
handler message. This will ensure that response messages are propagated back to the
listener.
sourceraw docstring

event-queue!clj/s

(event-queue! handler)
(event-queue! {:com.wsscode.async.processing/keys [channel]} handler)

Returns a callback handler that will respond to events in a serialized queue. When the user handler returns a channel, the next message will wait until the current one finished processing before moving on. Use this on callback handlers that need serialization to avoid concurrency issues.

Returns a callback handler that will respond to events in a serialized queue. When
the user handler returns a channel, the next message will wait until the current one
finished processing before moving on. Use this on callback handlers that need serialization
to avoid concurrency issues.
sourceraw docstring

random-request-idclj/s

(random-request-id)

Portable helper to generate random UUID.

Portable helper to generate random UUID.
sourceraw docstring

reply-messageclj/s

(reply-message {:com.wsscode.async.processing/keys [request-id]} value)

Helper to make a response map for a given message with a request-id.

Use this to generate response data from async events.

Helper to make a response map for a given message with a request-id.

Use this to generate response data from async events.
sourceraw docstring

response-notifiers*clj/s

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close