Registers event types with a Chronicle event store.
Called automatically by Chronicle.Registration.Coordinator during startup.
You can also call it directly to register event types at runtime.
Example
{:ok, channel} = Chronicle.Connections.Connection.channel(:my_conn)
:ok =
Chronicle.Events.EventTypes.register(
channel,
"my-store",
[MyApp.Events.AccountOpened],
[MyApp.Migrations.AccountOpenedV2Migration]
)
Summary
Functions
Registers event type modules and their migrations with Chronicle.
Functions
Registers event type modules and their migrations with Chronicle.
Each event type module must use Chronicle.Events.EventType. Chronicle groups all
known generations of the same event type into a single registration, includes
schemas for each known generation, and attaches any registered migrations.
Returns :ok on success or {:error, reason} on failure.