Liking cljdoc? Tell your friends :D

io.randomseed.utils.bus

Random utils, inter-thread bus.

Random utils, inter-thread bus.
raw docstring

closeclj

(close wrk)
source

configclj

(config wid)
(config workers wid)
source

control-channelclj

(control-channel wrk)
source

current-ns-strclj

source

data-channelclj

(data-channel wrk)
source

empty-outcomeclj

source

empty-replyclj

source

get-commandclj

(get-command wrk)
source

get-dataclj

(get-data wrk)
source

get-resultclj

(get-result wrk)
source

handle-commandclj

(handle-command wrk f)
source

handle-requestclj

(handle-request wrk req f & handler-args)
source

id-request->responseclj

(id-request->response wrk req id)
(id-request->response wrk req id & args)

Sends a blocking request and waits for any response.

Sends a blocking request and waits for any response.
sourceraw docstring

list-workersclj

(list-workers)
(list-workers workers)
source

new-control-channelclj

(new-control-channel)
source

new-data-channelclj

(new-data-channel)
source

new-outcomeclj

(new-outcome)
(new-outcome req)
(new-outcome req res)
(new-outcome req res data)

Used to wrap the outcome of request handling and to convert the output to the Outcome object.

Used to wrap the outcome of request handling and to convert the output to the Outcome
object.
sourceraw docstring

new-replyclj

(new-reply)
(new-reply body)
(new-reply body data)

Used to enrich the output of a handling function so it can return both: response body and additional data.

Used to enrich the output of a handling function so it can return both: response
body and additional data.
sourceraw docstring

new-requestclj

(new-request wrk req)
(new-request wrk req id & args)
source

new-responseclj

(new-response wrk res)
(new-response wrk res req)
(new-response wrk res req id)
source

new-workerclj

(new-worker w id config f)
(new-worker w id config f multi?)
source

new-worker!clj

(new-worker! id config f)
(new-worker! workers id config f)
source

new-worker-with-widclj

(new-worker-with-wid w id config f multi?)
source

Outcomeclj

source

outcome?clj

(outcome? v)
source

process-requestclj

(process-request wrk f & args)

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).

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.

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.

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.

Otherwise an Outcome object will be returned with :request, :response and :data fields.

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).

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.

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.

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.

Otherwise an Outcome object will be returned with :request, :response and :data
fields.
sourceraw docstring

put-commandclj

(put-command wrk msg)
source

put-dataclj

(put-data wrk msg)
source

receive-requestclj

(receive-request wrk)
source

receive-responseclj

(receive-response wrk)
source

remove-workerclj

(remove-worker workers wrk)
source

remove-worker!clj

(remove-worker! wrk)
(remove-worker! wrokers wrk)
source

Replyclj

source

reply?clj

(reply? v)
source

Requestclj

source

request->responseclj

(request->response wrk req)
(request->response wrk req & args)

Sends a blocking request and waits for any response.

Sends a blocking request and waits for any response.
sourceraw docstring

request?clj

(request? v)
source

Responseclj

source

response?clj

(response? v)
source

send-id-requestclj

(send-id-request wrk req id)
(send-id-request wrk req id & args)
source

send-requestclj

(send-request wrk req)
(send-request wrk req & args)
source

send-responseclj

(send-response wrk res)
(send-response wrk res req)
(send-response wrk res req id & args)
source

start-workerclj

(start-worker id config f & args)
source

stop-workerclj

(stop-worker wrk)
(stop-worker wrk msg-or-fn)
source

try-process-requestclj

(try-process-request wrk f & args)

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).

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.

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.

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.

Otherwise an Outcome object will be returned with :request, :response and :data fields.

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).

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.

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.

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.

Otherwise an Outcome object will be returned with :request, :response and :data
fields.
sourceraw docstring

try-put-commandclj

(try-put-command wrk msg)
source

try-put-dataclj

(try-put-data wrk msg)
source

try-send-id-requestclj

(try-send-id-request wrk req id)
(try-send-id-request wrk req id & args)
source

try-send-requestclj

(try-send-request wrk req)
(try-send-request wrk req & args)
source

try-send-responseclj

(try-send-response wrk res)
(try-send-response wrk res req)
(try-send-response wrk res req id & args)
source

update-configclj

(update-config workers wrk f & args)
source

update-config!clj

(update-config! & args)
source

update-workerclj

(update-worker workers wrk)
(update-worker workers wrk f & args)
source

update-worker!clj

(update-worker! & args)
source

wait-for-commandclj

(wait-for-command wrk)
source

wait-for-dataclj

(wait-for-data wrk)
source

wait-for-requestclj

(wait-for-request wrk)
source

wait-for-responseclj

(wait-for-response wrk)
source

wait-for-resultclj

(wait-for-result wrk)
source

Workerclj

source

workerclj

(worker v)
(worker workers v)
source

worker-exists?clj

(worker-exists? v)
(worker-exists? workers v)
source

worker-idclj

(worker-id v)
source

worker?clj

(worker? v)
source

Workersclj

source

workersclj

source

workers?clj

(workers? v)
source

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

× close