Provides a very simply event bus using core.async
to allow publishing and subscribing to interesting topics
happening throughout the Metabase system in a decoupled way.
The most appropriate way to initialize event listeners in any metabase.events.*
namespace is to implement the
events-init
function which accepts zero arguments. This function is dynamically resolved and called exactly once
when the application goes through normal startup procedures. Inside this function you can do any work needed and add
your events subscribers to the bus as usual via start-event-listener!
.
Provides a very simply event bus using `core.async` to allow publishing and subscribing to interesting topics happening throughout the Metabase system in a decoupled way. ## Regarding Events Initialization: The most appropriate way to initialize event listeners in any `metabase.events.*` namespace is to implement the `events-init` function which accepts zero arguments. This function is dynamically resolved and called exactly once when the application goes through normal startup procedures. Inside this function you can do any work needed and add your events subscribers to the bus as usual via `start-event-listener!`.
(initialize-events!)
Initialize the asynchronous internal events system.
Initialize the asynchronous internal events system.
(object->model-id topic object)
Determine the appropriate model_id
(if possible) for a given OBJECT.
Determine the appropriate `model_id` (if possible) for a given OBJECT.
(object->user-id object)
Determine the appropriate user_id
(if possible) for a given OBJECT.
Determine the appropriate `user_id` (if possible) for a given OBJECT.
(publish-event! topic event-item)
Publish an item into the events stream. Returns the published item to allow for chaining.
Publish an item into the events stream. Returns the published item to allow for chaining.
(start-event-listener! topics channel handler-fn)
Initialize an event listener which runs on a background thread via go-loop
.
Initialize an event listener which runs on a background thread via `go-loop`.
(topic->model topic)
Determine a valid model
identifier for the given TOPIC.
Determine a valid `model` identifier for the given TOPIC.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close