View Source Again.Termination (again v0.1.1)
Describes when to continue retrying and when to stop based on policy execution.
Time unit is milliseconds unless otherwose noted.
Summary
Types
@type policy() :: (attempts :: pos_integer(), elapsed_at_next :: pos_integer() -> should_terminate :: boolean())
Functions
@spec limit_attempts(max_attempts :: pos_integer()) :: policy()
Retry up to max_attempts
attempts.
@spec limit_duration(max_duration :: pos_integer()) :: policy()
Retry for no more than max_duration
.