adk_retry (erlang_adk v0.7.0)
View SourceBounded retry execution with isolated monitored attempts.
Backoff consumes the same absolute deadline as callback execution. Each attempt runs in a fresh lightweight process, so a callback crash, timeout, or excessive heap cannot take down or indefinitely block its caller.
Summary
Functions
Compatibility entry point retained for callers of the original API.
Types
-type retry_opts() :: #{max_attempts => pos_integer(), initial_delay => non_neg_integer(), max_delay => non_neg_integer(), backoff_factor => number(), attempt_timeout => pos_integer() | infinity, timeout => non_neg_integer() | infinity, deadline => integer() | infinity, max_heap_words => pos_integer() | infinity, jitter => none | full}.
Functions
-spec execute(fun(() -> {ok, term()} | {error, term()}), retry_opts()) -> {ok, term()} | {error, term()}.
-spec execute(fun(() -> {ok, term()} | {error, term()}), pos_integer(), non_neg_integer(), retry_opts()) -> {ok, term()} | {error, term()}.
Compatibility entry point retained for callers of the original API.