-
Notifications
You must be signed in to change notification settings - Fork 0
/
io.randomseed.utils.bus.html
18 lines (18 loc) · 36.6 KB
/
io.randomseed.utils.bus.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>io.randomseed.utils.bus documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script><link rel="stylesheet" type="text/css" href="css/randomseed.css" /></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Random:utils</span> <span class="project-version">1.2.34</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="10_introduction.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>io</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>randomseed</span></div></div></li><li class="depth-3"><a href="io.randomseed.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bot.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bot</span></div></a></li><li class="depth-4 branch current"><a href="io.randomseed.utils.bus.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bus</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.crypto.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crypto</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.db.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.fs.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>fs</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ip</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.log.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>log</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.map.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>map</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.nop-cache.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>nop-cache</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reitit</span></div></div></li><li class="depth-5"><a href="io.randomseed.utils.reitit.http.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.set.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>set</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.validators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validators</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.validators.common.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.var.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>var</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.vec.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vec</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-close"><div class="inner"><span>close</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-config"><div class="inner"><span>config</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-control-channel"><div class="inner"><span>control-channel</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-current-ns-str"><div class="inner"><span>current-ns-str</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-data-channel"><div class="inner"><span>data-channel</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-empty-outcome"><div class="inner"><span>empty-outcome</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-empty-reply"><div class="inner"><span>empty-reply</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-get-command"><div class="inner"><span>get-command</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-get-data"><div class="inner"><span>get-data</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-get-result"><div class="inner"><span>get-result</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-handle-command"><div class="inner"><span>handle-command</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-handle-request"><div class="inner"><span>handle-request</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-id-request-.3Eresponse"><div class="inner"><span>id-request->response</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-list-workers"><div class="inner"><span>list-workers</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-new-control-channel"><div class="inner"><span>new-control-channel</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-new-data-channel"><div class="inner"><span>new-data-channel</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-new-outcome"><div class="inner"><span>new-outcome</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-new-reply"><div class="inner"><span>new-reply</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-new-request"><div class="inner"><span>new-request</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-new-response"><div class="inner"><span>new-response</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-new-worker"><div class="inner"><span>new-worker</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-new-worker.21"><div class="inner"><span>new-worker!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-new-worker-with-wid"><div class="inner"><span>new-worker-with-wid</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-outcome.3F"><div class="inner"><span>outcome?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-process-request"><div class="inner"><span>process-request</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-put-command"><div class="inner"><span>put-command</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-put-data"><div class="inner"><span>put-data</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-receive-request"><div class="inner"><span>receive-request</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-receive-response"><div class="inner"><span>receive-response</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-remove-worker"><div class="inner"><span>remove-worker</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-remove-worker.21"><div class="inner"><span>remove-worker!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-reply.3F"><div class="inner"><span>reply?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-request-.3Eresponse"><div class="inner"><span>request->response</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-request.3F"><div class="inner"><span>request?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-response.3F"><div class="inner"><span>response?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-send-id-request"><div class="inner"><span>send-id-request</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-send-request"><div class="inner"><span>send-request</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-send-response"><div class="inner"><span>send-response</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-start-worker"><div class="inner"><span>start-worker</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-stop-worker"><div class="inner"><span>stop-worker</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-try-process-request"><div class="inner"><span>try-process-request</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-try-put-command"><div class="inner"><span>try-put-command</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-try-put-data"><div class="inner"><span>try-put-data</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-try-send-id-request"><div class="inner"><span>try-send-id-request</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-try-send-request"><div class="inner"><span>try-send-request</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-try-send-response"><div class="inner"><span>try-send-response</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-update-config"><div class="inner"><span>update-config</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-update-config.21"><div class="inner"><span>update-config!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-update-worker"><div class="inner"><span>update-worker</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-update-worker.21"><div class="inner"><span>update-worker!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-wait-for-command"><div class="inner"><span>wait-for-command</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-wait-for-data"><div class="inner"><span>wait-for-data</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-wait-for-request"><div class="inner"><span>wait-for-request</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-wait-for-response"><div class="inner"><span>wait-for-response</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-wait-for-result"><div class="inner"><span>wait-for-result</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-worker"><div class="inner"><span>worker</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-worker-exists.3F"><div class="inner"><span>worker-exists?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-worker-id"><div class="inner"><span>worker-id</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-worker.3F"><div class="inner"><span>worker?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-workers"><div class="inner"><span>workers</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.bus.html#var-workers.3F"><div class="inner"><span>workers?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">io.randomseed.utils.bus</h1><h4 class="added">added in 1.0.0</h4><div class="doc"><div class="markdown"><p>Random utils, inter-thread bus.</p>
</div></div><div class="public anchor" id="var-close"><h3>close</h3><div class="usage"><code>(close wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L101">view source</a></div></div><div class="public anchor" id="var-config"><h3>config</h3><div class="usage"><code>(config wid)</code><code>(config workers wid)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L89">view source</a></div></div><div class="public anchor" id="var-control-channel"><h3>control-channel</h3><div class="usage"><code>(control-channel wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L111">view source</a></div></div><div class="public anchor" id="var-current-ns-str"><h3>current-ns-str</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L26">view source</a></div></div><div class="public anchor" id="var-data-channel"><h3>data-channel</h3><div class="usage"><code>(data-channel wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L112">view source</a></div></div><div class="public anchor" id="var-empty-outcome"><h3>empty-outcome</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L267">view source</a></div></div><div class="public anchor" id="var-empty-reply"><h3>empty-reply</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L247">view source</a></div></div><div class="public anchor" id="var-get-command"><h3>get-command</h3><div class="usage"><code>(get-command wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L122">view source</a></div></div><div class="public anchor" id="var-get-data"><h3>get-data</h3><div class="usage"><code>(get-data wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L123">view source</a></div></div><div class="public anchor" id="var-get-result"><h3>get-result</h3><div class="usage"><code>(get-result wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L124">view source</a></div></div><div class="public anchor" id="var-handle-command"><h3>handle-command</h3><div class="usage"><code>(handle-command wrk f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L126">view source</a></div></div><div class="public anchor" id="var-handle-request"><h3>handle-request</h3><div class="usage"><code>(handle-request wrk req f & handler-args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L314">view source</a></div></div><div class="public anchor" id="var-id-request-.3Eresponse"><h3>id-request->response</h3><div class="usage"><code>(id-request->response wrk req id)</code><code>(id-request->response wrk req id & args)</code></div><div class="doc"><div class="markdown"><p>Sends a blocking request and waits for any response.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L303">view source</a></div></div><div class="public anchor" id="var-list-workers"><h3>list-workers</h3><div class="usage"><code>(list-workers)</code><code>(list-workers workers)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L82">view source</a></div></div><div class="public anchor" id="var-new-control-channel"><h3>new-control-channel</h3><div class="usage"><code>(new-control-channel)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L56">view source</a></div></div><div class="public anchor" id="var-new-data-channel"><h3>new-data-channel</h3><div class="usage"><code>(new-data-channel)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L57">view source</a></div></div><div class="public anchor" id="var-new-outcome"><h3>new-outcome</h3><div class="usage"><code>(new-outcome)</code><code>(new-outcome req)</code><code>(new-outcome req res)</code><code>(new-outcome req res data)</code></div><div class="doc"><div class="markdown"><p>Used to wrap the outcome of request handling and to convert the output to the Outcome object.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L270">view source</a></div></div><div class="public anchor" id="var-new-reply"><h3>new-reply</h3><div class="usage"><code>(new-reply)</code><code>(new-reply body)</code><code>(new-reply body data)</code></div><div class="doc"><div class="markdown"><p>Used to enrich the output of a handling function so it can return both: response body and additional data.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L250">view source</a></div></div><div class="public anchor" id="var-new-request"><h3>new-request</h3><div class="usage"><code>(new-request wrk req)</code><code>(new-request wrk req id & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L132">view source</a></div></div><div class="public anchor" id="var-new-response"><h3>new-response</h3><div class="usage"><code>(new-response wrk res)</code><code>(new-response wrk res req)</code><code>(new-response wrk res req id)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L148">view source</a></div></div><div class="public anchor" id="var-new-worker"><h3>new-worker</h3><div class="usage"><code>(new-worker w id config f)</code><code>(new-worker w id config f multi?)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L434">view source</a></div></div><div class="public anchor" id="var-new-worker.21"><h3>new-worker!</h3><div class="usage"><code>(new-worker! id config f)</code><code>(new-worker! workers id config f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L440">view source</a></div></div><div class="public anchor" id="var-new-worker-with-wid"><h3>new-worker-with-wid</h3><div class="usage"><code>(new-worker-with-wid w id config f multi?)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L422">view source</a></div></div><div class="public anchor" id="var-outcome.3F"><h3>outcome?</h3><div class="usage"><code>(outcome? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L44">view source</a></div></div><div class="public anchor" id="var-process-request"><h3>process-request</h3><div class="usage"><code>(process-request wrk f & args)</code></div><div class="doc"><div class="markdown"><p>Receives a request from the control channel and calls a handler f on worker object, request and args provided. Blocks on receiving (waits for data) and on sending (waits for the channel to have some space for a new message).</p>
<p>If the handler function returns nil or :io.randomseed.utils.bus/no-response, the response should not be created and the returned value is an empty Outcome object.</p>
<p>If the handler returns a Reply object, the response should be generated even if its :body field is nil. This is helpful in cases where nil responses are required.</p>
<p>If the handler returns a Reply object but its :body is set to :io.randomseed.utils.bus/no-response then no response will be generated and the response in the returned Outcome object will be set to nil.</p>
<p>Otherwise an Outcome object will be returned with :request, :response and :data fields.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L395">view source</a></div></div><div class="public anchor" id="var-put-command"><h3>put-command</h3><div class="usage"><code>(put-command wrk msg)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L114">view source</a></div></div><div class="public anchor" id="var-put-data"><h3>put-data</h3><div class="usage"><code>(put-data wrk msg)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L115">view source</a></div></div><div class="public anchor" id="var-receive-request"><h3>receive-request</h3><div class="usage"><code>(receive-request wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L172">view source</a></div></div><div class="public anchor" id="var-receive-response"><h3>receive-response</h3><div class="usage"><code>(receive-response wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L173">view source</a></div></div><div class="public anchor" id="var-remove-worker"><h3>remove-worker</h3><div class="usage"><code>(remove-worker workers wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L505">view source</a></div></div><div class="public anchor" id="var-remove-worker.21"><h3>remove-worker!</h3><div class="usage"><code>(remove-worker! wrk)</code><code>(remove-worker! wrokers wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L510">view source</a></div></div><div class="public anchor" id="var-reply.3F"><h3>reply?</h3><div class="usage"><code>(reply? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L43">view source</a></div></div><div class="public anchor" id="var-request-.3Eresponse"><h3>request->response</h3><div class="usage"><code>(request->response wrk req)</code><code>(request->response wrk req & args)</code></div><div class="doc"><div class="markdown"><p>Sends a blocking request and waits for any response.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L292">view source</a></div></div><div class="public anchor" id="var-request.3F"><h3>request?</h3><div class="usage"><code>(request? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L41">view source</a></div></div><div class="public anchor" id="var-response.3F"><h3>response?</h3><div class="usage"><code>(response? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L42">view source</a></div></div><div class="public anchor" id="var-send-id-request"><h3>send-id-request</h3><div class="usage"><code>(send-id-request wrk req id)</code><code>(send-id-request wrk req id & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L185">view source</a></div></div><div class="public anchor" id="var-send-request"><h3>send-request</h3><div class="usage"><code>(send-request wrk req)</code><code>(send-request wrk req & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L175">view source</a></div></div><div class="public anchor" id="var-send-response"><h3>send-response</h3><div class="usage"><code>(send-response wrk res)</code><code>(send-response wrk res req)</code><code>(send-response wrk res req id & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L215">view source</a></div></div><div class="public anchor" id="var-start-worker"><h3>start-worker</h3><div class="usage"><code>(start-worker id config f & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L520">view source</a></div></div><div class="public anchor" id="var-stop-worker"><h3>stop-worker</h3><div class="usage"><code>(stop-worker wrk)</code><code>(stop-worker wrk msg-or-fn)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L544">view source</a></div></div><div class="public anchor" id="var-try-process-request"><h3>try-process-request</h3><div class="usage"><code>(try-process-request wrk f & args)</code></div><div class="doc"><div class="markdown"><p>Receives a request from the control channel and calls a handler f on worker object, request and args provided. Does not block on receiving (returns immediately when there is no data on the control channel and blocks on sending (waits for the channel to have some space for a new message).</p>
<p>If the handler function returns nil or :io.randomseed.utils.bus/no-response, the response should not be created and the returned value is an empty Outcome object.</p>
<p>If the handler returns a Reply object, the response should be generated even if its :body field is nil. This is helpful in cases where nil responses are required.</p>
<p>If the handler returns a Reply object but its :body is set to :io.randomseed.utils.bus/no-response then no response will be generated and the response in the returned Outcome object will be set to nil.</p>
<p>Otherwise an Outcome object will be returned with :request, :response and :data fields.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L369">view source</a></div></div><div class="public anchor" id="var-try-put-command"><h3>try-put-command</h3><div class="usage"><code>(try-put-command wrk msg)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L120">view source</a></div></div><div class="public anchor" id="var-try-put-data"><h3>try-put-data</h3><div class="usage"><code>(try-put-data wrk msg)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L121">view source</a></div></div><div class="public anchor" id="var-try-send-id-request"><h3>try-send-id-request</h3><div class="usage"><code>(try-send-id-request wrk req id)</code><code>(try-send-id-request wrk req id & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L205">view source</a></div></div><div class="public anchor" id="var-try-send-request"><h3>try-send-request</h3><div class="usage"><code>(try-send-request wrk req)</code><code>(try-send-request wrk req & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L195">view source</a></div></div><div class="public anchor" id="var-try-send-response"><h3>try-send-response</h3><div class="usage"><code>(try-send-response wrk res)</code><code>(try-send-response wrk res req)</code><code>(try-send-response wrk res req id & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L229">view source</a></div></div><div class="public anchor" id="var-update-config"><h3>update-config</h3><div class="usage"><code>(update-config workers wrk f & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L478">view source</a></div></div><div class="public anchor" id="var-update-config.21"><h3>update-config!</h3><div class="usage"><code>(update-config! & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L495">view source</a></div></div><div class="public anchor" id="var-update-worker"><h3>update-worker</h3><div class="usage"><code>(update-worker workers wrk)</code><code>(update-worker workers wrk f & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L459">view source</a></div></div><div class="public anchor" id="var-update-worker.21"><h3>update-worker!</h3><div class="usage"><code>(update-worker! & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L467">view source</a></div></div><div class="public anchor" id="var-wait-for-command"><h3>wait-for-command</h3><div class="usage"><code>(wait-for-command wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L116">view source</a></div></div><div class="public anchor" id="var-wait-for-data"><h3>wait-for-data</h3><div class="usage"><code>(wait-for-data wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L117">view source</a></div></div><div class="public anchor" id="var-wait-for-request"><h3>wait-for-request</h3><div class="usage"><code>(wait-for-request wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L170">view source</a></div></div><div class="public anchor" id="var-wait-for-response"><h3>wait-for-response</h3><div class="usage"><code>(wait-for-response wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L171">view source</a></div></div><div class="public anchor" id="var-wait-for-result"><h3>wait-for-result</h3><div class="usage"><code>(wait-for-result wrk)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L118">view source</a></div></div><div class="public anchor" id="var-worker"><h3>worker</h3><div class="usage"><code>(worker v)</code><code>(worker workers v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L63">view source</a></div></div><div class="public anchor" id="var-worker-exists.3F"><h3>worker-exists?</h3><div class="usage"><code>(worker-exists? v)</code><code>(worker-exists? workers v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L74">view source</a></div></div><div class="public anchor" id="var-worker-id"><h3>worker-id</h3><div class="usage"><code>(worker-id v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L70">view source</a></div></div><div class="public anchor" id="var-worker.3F"><h3>worker?</h3><div class="usage"><code>(worker? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L39">view source</a></div></div><div class="public anchor" id="var-workers"><h3>workers</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L50">view source</a></div></div><div class="public anchor" id="var-workers.3F"><h3>workers?</h3><div class="usage"><code>(workers? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/bus.clj#L40">view source</a></div></div></div></body></html>