(-done? this)
(-children this)
(-inject this env)
A remote data source that can be fetched in batches.
A remote data source that can be fetched in batches.
(-fetch-multi this resources env)
Fetch this and other data sources in a single batch. The returned promise must be a map from the data source identities to their results.
Fetch this and other data sources in a single batch. The returned promise must be a map from the data source identities to their results.
(collect muses)
Given a collection of data sources, return a new data source that will contain a collection with the values of every data source when fetched.
Given a collection of data sources, return a new data source that will contain a collection with the values of every data source when fetched.
A remote data source.
A remote data source.
(-fetch this env)
Fetch this data source
Fetch this data source
(-identity this)
Return an identifier for this data source. Used for caching, note that data sources of different types are cached separately.
Return an identifier for this data source. Used for caching, note that data sources of different types are cached separately.
(execute! ast)
(execute! ast opts)
Executes the data fetching, returning a promise of the [cache result]
pair.
You can pass a second argument with the following options:
:cache
: A map to use as the cache.
:executor
: An implementation of IExecutor
that will be used
to run the fetches. Defaults to urania.core/default-executor
.
In Clojure you can pass a java.util.concurrent.Executor
instance.
:env
: An environment that will be passed to every data fetching
function.Executes the data fetching, returning a promise of the `[cache result]` pair. * fetch data sources concurrently (when possible) * cache result of previously made fetches * batch calls to the same data source (when applicable) You can pass a second argument with the following options: - `:cache`: A map to use as the cache. - `:executor`: An implementation of `IExecutor` that will be used to run the fetches. Defaults to `urania.core/default-executor`. In Clojure you can pass a `java.util.concurrent.Executor` instance. - `:env`: An environment that will be passed to every data fetching function.
A policy for executing tasks.
A policy for executing tasks.
(-execute ex task)
Perform a task.
Perform a task.
(map f muse & muses)
Given a function and one or more data sources, return a new data source that will apply the given function to the results. When mapping over multiple data sources the results will be passed as positional arguments to the given function.
Given a function and one or more data sources, return a new data source that will apply the given function to the results. When mapping over multiple data sources the results will be passed as positional arguments to the given function.
(mapcat f muse & muses)
Given a function and one or more data sources, return a new data source that will apply the given function to the results. The function is assumed to return more data sources that will be flattened into a single data source.
Given a function and one or more data sources, return a new data source that will apply the given function to the results. The function is assumed to return more data sources that will be flattened into a single data source.
(run! ast)
(run! ast opts)
Executes the data fetching, returning a promise of the result.
You can pass a second argument with the following options:
:cache
: A map to use as the cache.
:executor
: An implementation of IExecutor
that will be used
to run the fetches. Defaults to urania.core/default-executor
.
In Clojure you can pass a java.util.concurrent.Executor
instance.
:env
: An environment that will be passed to every data fetching
function.Executes the data fetching, returning a promise of the result. * fetch data sources concurrently (when possible) * cache result of previously made fetches * batch calls to the same data source (when applicable) You can pass a second argument with the following options: - `:cache`: A map to use as the cache. - `:executor`: An implementation of `IExecutor` that will be used to run the fetches. Defaults to `urania.core/default-executor`. In Clojure you can pass a `java.util.concurrent.Executor` instance. - `:env`: An environment that will be passed to every data fetching function.
(run!! ast)
(run!! ast opts)
Dereferences the the promise returned by run!
, blocking until
a result is available.
Not implemented on ClojureScript.
Dereferences the the promise returned by `run!`, blocking until a result is available. Not implemented on ClojureScript.
(traverse f muses)
Given a function and a collection of data sources, apply the function once to each data source and collect the resulting data source results into a data source with every result.
Given a function and a collection of data sources, apply the function once to each data source and collect the resulting data source results into a data source with every result.
(value v)
Given a plain value, wrap it in a data source that will return the value immediately.
Given a plain value, wrap it in a data source that will return the value immediately.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close