Mailglass.Lifecycle behaviour (Mailglass v1.0.0)

Copy Markdown View Source

Transaction lifecycle seam for adopter-side event composition.

Phase 11 introduces the contract only. The unsubscribe controller's Ecto.Multi integration lands in 11-03 per D-02, where this callback will be invoked inside the durable unsubscribe transaction.

Summary

Functions

Default no-op implementation for lifecycle hooks.

Callbacks

handle_event(t, map)

@callback handle_event(Ecto.Multi.t(), map()) :: Ecto.Multi.t()

Functions

handle_event(multi, attrs)

@spec handle_event(Ecto.Multi.t(), map()) :: Ecto.Multi.t()

Default no-op implementation for lifecycle hooks.

Returns the in-flight multi unchanged so adopters can opt out without branching in the caller.