Liking cljdoc? Tell your friends :D

integrant.core


buildclj/s

(build config keys f)
(build config keys f assertf)

Apply a function f to each key value pair in a configuration map. Keys are traversed in dependency order, and any references in the value expanded. The function should take two arguments, a key and value, and return a new value. An optional fourth argument, assertf, may be supplied to provide an assertion check on the system, key and expanded value.

Apply a function f to each key value pair in a configuration map. Keys are
traversed in dependency order, and any references in the value expanded. The
function should take two arguments, a key and value, and return a new value.
An optional fourth argument, assertf, may be supplied to provide an assertion
check on the system, key and expanded value.
sourceraw docstring

composite-keywordclj/s

(composite-keyword kws)

Return a unique keyword that is derived from an ordered collection of keywords. The function will return the same keyword for the same collection.

Return a unique keyword that is derived from an ordered collection of
keywords. The function will return the same keyword for the same collection.
sourceraw docstring

dependency-graphclj/s

(dependency-graph config)

Return a dependency graph of all the refs in a config. Resolve derived dependencies.

Return a dependency graph of all the refs in a config. Resolve derived
dependencies.
sourceraw docstring

derived-from?clj/s

(derived-from? key candidate)

Return true if a key is derived from candidate keyword or vector of keywords.

Return true if a key is derived from candidate keyword or vector of
keywords.
sourceraw docstring

expandclj/s

(expand config)

Replace all refs with the values they correspond to.

Replace all refs with the values they correspond to.
sourceraw docstring

find-derivedclj/s

(find-derived m k)

Return a seq of all entries in a map, m, where the key is derived from the a candidate key, k. If there are no matching keys, nil is returned. The candidate key may be a keyword, or vector of keywords.

Return a seq of all entries in a map, m, where the key is derived from the
a candidate key, k. If there are no matching keys, nil is returned. The
candidate key may be a keyword, or vector of keywords.
sourceraw docstring

find-derived-1clj/s

(find-derived-1 m k)

Return the map entry in a map, m, where the key is derived from the keyword, k. If there are no matching keys, nil is returned. If there is more than one matching key, an ambiguous key exception is raised.

Return the map entry in a map, m, where the key is derived from the keyword,
k. If there are no matching keys, nil is returned. If there is more than one
matching key, an ambiguous key exception is raised.
sourceraw docstring

halt!clj/s

(halt! system)
(halt! system keys)

Halt a system map by applying halt-key! in reverse dependency order.

Halt a system map by applying halt-key! in reverse dependency order.
sourceraw docstring

halt-key!clj/smultimethod

(halt-key! key value)

Halt a running or suspended implementation associated with a key. This is often used for stopping processes or cleaning up resources. For example, a database connection might be closed. This multimethod must be idempotent. The return value of this multimethod is discarded.

Halt a running or suspended implementation associated with a key. This is
often used for stopping processes or cleaning up resources. For example, a
database connection might be closed. This multimethod must be idempotent.
The return value of this multimethod is discarded.
sourceraw docstring

initclj/s

(init config)
(init config keys)

Turn a config map into an system map. Keys are traversed in dependency order, initiated via the init-key multimethod, then the refs associated with the key are expanded.

Turn a config map into an system map. Keys are traversed in dependency
order, initiated via the init-key multimethod, then the refs associated with
the key are expanded.
sourceraw docstring

init-keyclj/smultimethod

(init-key key value)

Turn a config value associated with a key into a concrete implementation. For example, a database URL might be turned into a database connection.

Turn a config value associated with a key into a concrete implementation.
For example, a database URL might be turned into a database connection.
sourceraw docstring

load-namespacesclj

(load-namespaces config)
(load-namespaces config keys)

Attempt to load the namespaces referenced by the keys in a configuration. If a key is namespaced, both the namespace and the namespace concatenated with the name will be tried. For example, if a key is :foo.bar/baz, then the function will attempt to load the namespaces foo.bar and foo.bar.baz. Upon completion, a list of all loaded namespaces will be returned.

Attempt to load the namespaces referenced by the keys in a configuration.
If a key is namespaced, both the namespace and the namespace concatenated
with the name will be tried. For example, if a key is :foo.bar/baz, then the
function will attempt to load the namespaces foo.bar and foo.bar.baz. Upon
completion, a list of all loaded namespaces will be returned.
sourceraw docstring

pre-init-specclj/smultimethod

Return a spec for the supplied key that is used to check the associated value before the key is initiated.

Return a spec for the supplied key that is used to check the associated
value before the key is initiated.
sourceraw docstring

read-stringclj

(read-string s)
(read-string opts s)

Read a config from a string of edn. Refs may be denotied by tagging keywords with #ig/ref.

Read a config from a string of edn. Refs may be denotied by tagging keywords
with #ig/ref.
sourceraw docstring

Refcljs

source

refclj/s

(ref key)

Create a reference to a top-level key in a config map.

Create a reference to a top-level key in a config map.
sourceraw docstring

ref?clj/s

(ref? x)

Return true if its argument is a ref.

Return true if its argument is a ref.
sourceraw docstring

resumeclj/s

(resume config system)
(resume config system keys)

Turn a config map into a system map, reusing resources from an existing system when it's possible to do so. Keys are traversed in dependency order, resumed with the resume-key multimethod, then the refs associated with the key are expanded.

Turn a config map into a system map, reusing resources from an existing
system when it's possible to do so. Keys are traversed in dependency order,
resumed with the resume-key multimethod, then the refs associated with the
key are expanded.
sourceraw docstring

resume-keyclj/smultimethod

(resume-key key value old-value old-impl)

Turn a config value associated with a key into a concrete implementation, but reuse resources (e.g. connections, running threads, etc) from an existing implementation. By default this multimethod calls init-key and ignores the additional argument.

Turn a config value associated with a key into a concrete implementation,
but reuse resources (e.g. connections, running threads, etc) from an existing
implementation. By default this multimethod calls init-key and ignores the
additional argument.
sourceraw docstring

reverse-run!clj/s

(reverse-run! system keys f)

Apply a side-effectful function f to each key value pair in a system map. Keys are traversed in reverse dependency order. The function should take two arguments, a key and value.

Apply a side-effectful function f to each key value pair in a system map.
Keys are traversed in reverse dependency order. The function should take two
arguments, a key and value.
sourceraw docstring

run!clj/s

(run! system keys f)

Apply a side-effectful function f to each key value pair in a system map. Keys are traversed in dependency order. The function should take two arguments, a key and value.

Apply a side-effectful function f to each key value pair in a system map.
Keys are traversed in dependency order. The function should take two
arguments, a key and value.
sourceraw docstring

suspend!clj/s

(suspend! system)
(suspend! system keys)

Suspend a system map by applying suspend-key! in reverse dependency order.

Suspend a system map by applying suspend-key! in reverse dependency order.
sourceraw docstring

suspend-key!clj/smultimethod

(suspend-key! key value)

Suspend a running implementation associated with a key, so that it may be eventually passed to resume-key. By default this multimethod calls halt-key!, but it may be customized to do things like keep a server running, but buffer incoming requests until the server is resumed.

Suspend a running implementation associated with a key, so that it may be
eventually passed to resume-key. By default this multimethod calls halt-key!,
but it may be customized to do things like keep a server running, but buffer
incoming requests until the server is resumed.
sourceraw docstring

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

× close