Last active
June 4, 2018 12:36
-
-
Save AndrewDryga/67628c4c0fc4afa3af6e0841cc960b3e to your computer and use it in GitHub Desktop.
Sage: Callbacks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@callback transaction(attrs :: map()) :: | |
{:ok, last_effect :: any(), all_effects :: map()} | {:error, reason :: any()} | |
@callback compensation(effect_to_compensate :: any(), effects_so_far :: map(), attrs :: any()) :: | |
:ok | |
| :abort | |
| {:retry, | |
[ | |
{:retry_limit, pos_integer()}, | |
{:base_backoff, pos_integer() | nil}, | |
{:max_backoff, pos_integer()}, | |
{:enable_jitter, boolean()} | |
]} | |
| {:continue, effect :: any()} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment