CrossClj

0.1.1 docs

SourceDocs



RECENT
    VARS
    ->Done
    ->FlatMap
    ->Map
    ->Value
    assert-ast!
    AST
    ast?
    BatchedSource
    cache-id
    cache-path
    cached-or
    collect
    ComposedAST
    DataSource
    dedupe-sources
    default-executor
    execute!
    fetch-many-caching
    fetch-one-caching
    fetch-resource
    fetch-sources
    IExecutor
    inject-into
    interpret-ast
    map
    map->Done
    mapcat
    next-level
    resource-name
    run!
    run!!
    run-defaults
    run-fetch
    run-fetch-multi
    traverse
    value

    « Index of all namespaces of this project

    (->Done value)
    Positional factory function for class urania.core.Done.
    
    (->FlatMap f values)
    Positional factory function for class urania.core.FlatMap.
    
    (->Map f values)
    Positional factory function for class urania.core.Map.
    
    (->Value value)
    Positional factory function for class urania.core.Value.
    
    Private
    (assert-ast! ast)
    protocol
    (-children this)
    (-done? this)
    (-inject this env)
    Private
    (ast? ast)
    protocol
    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.
    (cache-id res)
    Private
    (cached-or env res)
    (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.
    protocol
    A remote data source.
    
    (-fetch this env)
    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.
    Private
    (dedupe-sources sources)
    (execute! ast)(execute! ast opts)
    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.
    Private
    (fetch-many-caching opts sources)
    Private
    (fetch-one-caching opts source)
    Private
    (fetch-resource opts [resource-name sources])
    Private
    (fetch-sources opts [head & tail :as sources])
    protocol
    A policy for executing tasks.
    
    (-execute ex task)
    Perform a task.
    
    Private
    (inject-into env node)
    Private
    (interpret-ast ast-node {:keys [cache], :as opts} success! error!)
    (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.
    (map->Done m__7585__auto__)
    Factory function for class urania.core.Done, taking a map of keywords to field values.
    
    (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.
    Private
    (next-level ast-node)
    (resource-name v)
    (run! ast)(run! ast opts)
    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.
    Private
    (run-fetch {:keys [executor env]} muse)
    Private
    (run-fetch-multi {:keys [executor env]} muse muses)
    (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.
    (value v)
    Given a plain value, wrap it in a data source that will return the
    value immediately.