Liking cljdoc? Tell your friends :D

restql.core.async-runner


all-done?clj

(all-done? state)

given a state with queries :done :requested and :to-do returns true if all entries are :done

given a state with queries :done :requested and :to-do returns
true if all entries are :done
sourceraw docstring

all-that-can-requestclj

(all-that-can-request state)

takes a state with queries :done :requested and :to-do and returns a sequence of pairs with only the queries that can be executed, because all their dependencies are already met.

Example return: ([:cart {:with ...}] [:freight {:with ...})

takes a state with queries :done :requested and :to-do and returns
a sequence of pairs with only the queries that can be executed, because all
their dependencies are already met.

Example return: ([:cart {:with ...}] [:freight {:with ...})
sourceraw docstring

can-request?clj

(can-request? query-item state)

given a single query item and the map with the current results returns true if all the dependencies of the query-item are resolved

given a single query item and the map with the current results
returns true if all the dependencies of the query-item are
resolved
sourceraw docstring

do-runclj

(do-run query {:keys [request-ch result-ch output-ch]})

it separates all queries in three states, :done :requested and :to-do then sends all to-dos to resolve, changing their statuses to :requested. As the results get ready, update the query status to :done and send all to-dos again. When all queries are :done, the process is complete, and the :done part of the state is returned.

it separates all queries in three states, :done :requested and :to-do
then sends all to-dos to resolve, changing their statuses to :requested.
As the results get ready, update the query status to :done and send all to-dos again.
When all queries are :done, the process is complete, and the :done part of the state is returned.
sourceraw docstring

generate-uuid!clj

(generate-uuid!)
source

get-status-logclj

(get-status-log uid resource result)
source

initialize-stateclj

(initialize-state query)
source

is-done?clj

(is-done? [query-item-key _] state)
source

log-statusclj

(log-status uid resource result)
source

make-requestsclj

(make-requests do-request
               encoders
               {:keys [request-ch result-ch exception-ch]}
               {:keys [_debugging] :as query-opts})

goroutine that keeps listening from request-ch and performs http requests sending their result to result-ch

goroutine that keeps listening from request-ch and performs http requests
sending their result to result-ch
sourceraw docstring

runclj

(run do-request query encoders {:keys [_debugging] :as query-opts})
source

update-stateclj

(update-state state completed)

it passes all to-do queries that could be requested to :requested state and adds a completed request to the :done state

it passes all to-do queries that could be requested to :requested state and
adds a completed request to the :done state
sourceraw docstring

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

× close