std.concurrent.request

*bulk*

dynamic

*current*

dynamic

*debug*

dynamic

*inputs*

dynamic

*transact*

dynamic

bulk

added in 3.0

(bulk client thunk)(bulk client thunk opts)

allows query inputs to be combined

bulk-collect

added in 3.0

(bulk-collect client thunk chain)

collects bulk inputs

bulk-context

added in 3.0

(bulk-context)

creates a bulk context

bulk-process

added in 3.0

(bulk-process client {:keys [inputs received]} {:keys [pre], :as opts})

processes the client given bulk inputs

bulk:inputs

added in 3.0

(bulk:inputs client thunk)

capture all inputs on the client

bulk:map

added in 3.0

(bulk:map client f inputs)(bulk:map client f inputs opts)

map function across a client

bulk:transact

added in 3.0

(bulk:transact client thunk)(bulk:transact client thunk opts)

creates a transaction within a bulk context

measure:debug

added in 3.0

(measure:debug {:keys [context]})

creates a debug measure

(measure:debug {}) => (contains {:start fn? :stop fn?})

opts:timer

added in 3.0

(opts:timer timer)

creates the timer

(opts:timer prn) => h/future?

opts:wrap-measure

added in 3.0

(opts:wrap-measure opts measure)

creates the measure opts

(opts:wrap-measure {} prn) => (contains-in {:pre fn?, :chain fn?})

process-bulk

(process-bulk client inputs outputs)(process-bulk client inputs outputs opts)

process-single

(process-single client output)(process-single client output opts)

req

macro

added in 3.0

(req client command)(req client command opts)

execute command on single, bulk and transact calls

(req |client| {:type :eval :form 1})

req-fn

added in 3.0

(req-fn client command)(req-fn client command opts)

function for req

req:bulk

macro

added in 3.0

(req:bulk [client opts] & body)

creates a bulk request

req:in

macro

added in 3.0

(req:in & body)

captures the command input

req:opts

added in 3.0

(req:opts opts)(req:opts opts {:keys [pre post chain], :as m})

clean opts for processing inputs

req:opts-clean

added in 3.0

(req:opts-clean opts)

clean opts for processing inputs

req:opts-init

added in 3.0

(req:opts-init {:keys [measure debug context], :as opts})

initialise request opts

req:return

added in 3.0

(req:return result async)

returns the output

(req:return 1 false)

req:single

added in 3.0

(req:single client command)(req:single client command opts)

creates a single request call

req:single-complete

added in 3.0

(req:single-complete {:keys [async transacted received final post chain], :as opts} result)

completes the req:single call

req:single-prep

added in 3.0

(req:single-prep {:keys [async received transacted chain], :as opts})

prepares req:single options

(req:single-prep {:async true})

req:transact

macro

added in 3.0

(req:transact [client opts] & body)

creates a bulk transaction request

req:unit

added in 3.0

(req:unit client command)(req:unit client command {:keys [pre post transacted catch chain], :as opts})

creates a single request call with *bulk* context

request-bulk

(request-bulk client commands)(request-bulk client commands opts)

request-single

(request-single client command)(request-single client command opts)

transact

added in 3.0

(transact client thunk)

enable transactions on client

(->> (transact |client| (fn [] (req |client| {:type :eval :form 1} {:chain #(* 8 %)}))) (map deref))

transact-combine

(transact-combine client commands)

transact-context

added in 3.0

(transact-context)

creates a transact context

transact-end

(transact-end client)

transact-prep

added in 3.0

(transact-prep client context command {:keys [post chain], :as opts})

prepare req:opts given transaction context

(transact-prep |client| (transact-context) {:type :eval, :form 1} {:chain inc})

transact-start

(transact-start client)

transact:map

added in 3.0

(transact:map client f inputs)(transact:map client f inputs opts)

performs a transaction across the client

(transact:map |client| req-fn {:type :eval :form 1} {:type :eval :form 2})

=> 1 2