Triggers are called when events are committed.
Triggers are called when events are committed.
(install-trigger event-type key f)
Globally register a callback f
for event-type
with key
key
. Replaces previously installed trigger with event-type
and
key
.
When a matching event
is succesfully committed to repository
,
callback will be called as (f repository target-aggregate event)
,
where target-aggregate
is the target of event
in the state prior
to commit.
Globally register a callback `f` for `event-type` with key `key`. Replaces previously installed trigger with `event-type` and `key`. When a matching `event` is succesfully committed to `repository`, callback will be called as `(f repository target-aggregate event)`, where `target-aggregate` is the target of `event` in the state prior to commit.
Global registry of triggers. Atom containing map of event-type -> key -> callback.
Global registry of triggers. Atom containing map of event-type -> key -> callback.
(with-triggers repo)
Wrap a repository with triggers. The standard rill.wheel
repository constructors call this wrapper so library users should
not have to call this function.
Wrap a repository with triggers. The standard `rill.wheel` repository constructors call this wrapper so library users should not have to call this function.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close