Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retry: Add StandardRetryPolicy and standard_policy mod #698

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Oct 7, 2022

  1. retry: Add StandardRetryPolicy and standard_policy mod

    This PR adds a new `standard_policy` module within the retry module
    that provides a batteries included policy to be used with the retry
    middleware. The policy combines the `Budget` type and generic backoff
    utlities from the `backoff` module to provide an easy to use policy
    with good defaults.
    
    This PR also includes a `StandardRetryPolicyBuilder` as well as two
    new traits `IsRetryable` and `CloneRequest`. These each have blanket
    impls for closures. The reason that this implementation breaks these
    out into two different traits is to allow `tower-http` to provide
    a custom `CloneRequest` implementation that will be able to clone
    some sort of `ReplayBody` and let the user pass in the retry decision
    implementation.
    
    Ref #682
    LucioFranco committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    70544a2 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2022

  1. Fix tests

    LucioFranco committed Oct 12, 2022
    Configuration menu
    Copy the full SHA
    a3cdc6f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    88b7df9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2d24ccb View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2022

  1. Apply suggestions from code review

    Co-authored-by: Eliza Weisman <[email protected]>
    LucioFranco and hawkw committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    d97afa5 View commit details
    Browse the repository at this point in the history
  2. Fix rename

    LucioFranco committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    31e3326 View commit details
    Browse the repository at this point in the history