(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
(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 ...})
(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
(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.
(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
(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
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close