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

Functions

Retry up to max_attempts attempts.

Retry for no more than max_duration.

Types

@type policy() :: (attempts :: pos_integer(), elapsed_at_next :: pos_integer() ->
               should_terminate :: boolean())

Functions

Link to this function

limit_attempts(max_attempts)

View Source
@spec limit_attempts(max_attempts :: pos_integer()) :: policy()

Retry up to max_attempts attempts.

Link to this function

limit_duration(max_duration)

View Source
@spec limit_duration(max_duration :: pos_integer()) :: policy()

Retry for no more than max_duration.