Liking cljdoc? Tell your friends :D

rill.wheel.trigger

Triggers are called when events are committed.

Triggers are called when events are committed.
raw docstring

install-triggerclj

(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.
sourceraw docstring

remove-triggerclj

(remove-trigger event-type key)
source

triggersclj

Global registry of triggers. Atom containing map of event-type -> key -> callback.

Global registry of triggers. Atom containing map of
event-type -> key -> callback.
sourceraw docstring

with-triggersclj

(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.
sourceraw docstring

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

× close