Liking cljdoc? Tell your friends :D

metabase.events

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!.

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!`.
raw docstring

initialize-events!clj

(initialize-events!)

Initialize the asynchronous internal events system.

Initialize the asynchronous internal events system.
sourceraw docstring

object->model-idclj

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

object->user-idclj

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

publish-event!clj

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

start-event-listener!clj

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

topic->modelclj

(topic->model topic)

Determine a valid model identifier for the given TOPIC.

Determine a valid `model` identifier for the given TOPIC.
sourceraw docstring

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

× close