AshCommanded.Commanded.SnapshotConfiguration (AshCommanded v0.1.0)
View SourceProvides configuration options for Commanded to use AshCommanded's snapshot functionality.
This module standardizes snapshot configuration options for Commanded applications.
Summary
Functions
Returns the snapshot options to use when dispatching a command.
Returns the snapshot options to use when configuring a Commanded application.
Functions
@spec dispatch_options() :: Keyword.t()
Returns the snapshot options to use when dispatching a command.
Returns
A keyword list of snapshot options for command dispatch
Examples
iex> AshCommanded.Commanded.SnapshotConfiguration.dispatch_options()
[snapshot_module: AshCommanded.Commanded.SnapshotAdapter]
Returns the snapshot options to use when configuring a Commanded application.
Parameters
threshold
- The number of events to process before taking a snapshot (default: 100)
Returns
A keyword list of snapshot options for Commanded
Examples
iex> AshCommanded.Commanded.SnapshotConfiguration.snapshot_options(500)
[snapshot_every: 500, snapshot_module: AshCommanded.Commanded.SnapshotAdapter]