View Source OnePiece.Commanded.Aggregate.StatelessLifespan (OnePiece.Commanded v0.19.1)

Stops the aggregate after a command, event or error.

Summary

Functions

Stops the aggregate after a command.

Stops the aggregate after an error.

Stops the aggregate after an event.

Functions

Stops the aggregate after a command.

iex> OnePiece.Commanded.Aggregate.StatelessLifespan.after_command(%MyCommandOne{})
:stop

Stops the aggregate after an error.

iex> OnePiece.Commanded.Aggregate.StatelessLifespan.after_error({:error, :something_happened})
:stop

Stops the aggregate after an event.

iex> OnePiece.Commanded.Aggregate.StatelessLifespan.after_event(%DepositAccountOpened{})
:stop