exon v0.1.4 Exon.EventBus behaviour

An event bus behaviour and convenience macro.

Use Exon.EventBus to define an event bus for your application. You can either use: use Exon.EventBus, :sync or use Exon.EventBus, :async.

Summary

Functions

A shared utility function to apply the event handling method on a handler

Types

context()
context() :: map
event()
event() :: {atom, map}
events()
events() :: [event]

Functions

handle_event(handler, event, payload, context)

A shared utility function to apply the event handling method on a handler

Callbacks

child_spec()
child_spec() :: Supervisor.Spec.spec
publish(events, context)
publish(events, context) :: :ok