event_bus v0.3.1 EventBus
Simple event bus implementation.
Link to this section Summary
Functions
Fetch event data
Send the event processing completed to the watcher
Send the event processing skipped to the watcher
Send event to all listeners
Subscribe to the bus
List the subscribers to the bus
Unsubscribe from the bus
Link to this section Functions
Send the event processing completed to the watcher
Examples
EventBus.mark_as_completed({MyEventListener, :hello_received, "123"})
Send the event processing skipped to the watcher
Examples
EventBus.mark_as_skipped({MyEventListener, :unmatched_occurred, "124"})
Send event to all listeners.
Examples
EventBus.notify({:webhook_received, %{"message" => "Hi all!"}})
:ok