Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: Change the RetryPolicy trait to allow waiting on arbitrary thin…
…gs. (#1035) * core: Change the RetryPolicy trait to allow waiting on arbitrary things. Previously the only thing that that a retry would wait for was a period of time, i.e. `Duration`. This adds another function to the `RetryPolicy` trait that allows the implementer to wait on any condition they like. The default implementation of the new method provides backward compatibility by just sleeping for a period of time. * Use async_trait. * Include the Error since you may want to change the `wait` behavior based on the type of error encountered. * Update doc comment to reflect new functionality. * Change the argument ordering. * Update sdk/core/src/policies/retry_policies/retry_policy.rs Co-authored-by: Ryan Levick <[email protected]> Co-authored-by: Ryan Levick <[email protected]>
- Loading branch information