The generic lens brick: a manifest whose :addon/init-ns is this namespace, :addon/init-fn "addon-ctor", and whose :addon/config names a source addon and a lens fn over its hooks:
{:olympus/lens-source "hive.carto-flow"} required :olympus/lens-fn required: qualified symbol of (fn [source-hooks agent] -> Doc | nil) :olympus/lens-id default: the source id :olympus/addon-id default: "hive.olympus.lens." + source id without its "hive." prefix
with :addon/dependencies #{"hive.olympus" <source>}.
On initialize! it resolves the lens fn (one that does not resolve fails the mount, loudly) and registers on hive.olympus a lens that, at EVERY observation, reads the source's current hooks and applies the fn. An absent or inactive source answers {} hooks, and the lens fn decides what to say.
The generic lens brick: a manifest whose :addon/init-ns is this namespace,
:addon/init-fn "addon-ctor", and whose :addon/config names a source addon
and a lens fn over its hooks:
{:olympus/lens-source "hive.carto-flow"} required
:olympus/lens-fn required: qualified
symbol of
(fn [source-hooks agent]
-> Doc | nil)
:olympus/lens-id default: the source id
:olympus/addon-id default: "hive.olympus.lens."
+ source id without its
"hive." prefix
with :addon/dependencies #{"hive.olympus" <source>}.
On initialize! it resolves the lens fn (one that does not resolve fails the
mount, loudly) and registers on hive.olympus a lens that, at EVERY
observation, reads the source's current hooks and applies the fn. An absent
or inactive source answers {} hooks, and the lens fn decides what to say.(addon-ctor config)Pure constructor resolved from a lens brick manifest.
Pure constructor resolved from a lens brick manifest.
(brick-addon-id source-id)Addon id for the brick lensing SOURCE-ID into Olympus.
Addon id for the brick lensing SOURCE-ID into Olympus.
(lens-of config lens-fn)The lens (fn [agent]) CONFIG describes: LENS-FN applied to the source's hooks, read afresh at every call.
The lens (fn [agent]) CONFIG describes: LENS-FN applied to the source's hooks, read afresh at every call.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |