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

Make retrying transport and http errors configurable #1122

Merged
merged 5 commits into from
Sep 22, 2021

Commits on Sep 10, 2021

  1. Only wrap transport if it is a transport.Transport

    Note: This is a breaking change
    
    Authored-by: Dennis Leon <leonde@vmware.com>
    DennisDenuto committed Sep 10, 2021
    Configuration menu
    Copy the full SHA
    6a5f6b3 View commit details
    Browse the repository at this point in the history
  2. Provide additional information in transport.Error

    - Useful by consumers providing their own Predicate to determine whether to retry or not
    
    Authored-by: Dennis Leon <leonde@vmware.com>
    DennisDenuto committed Sep 10, 2021
    Configuration menu
    Copy the full SHA
    504619a View commit details
    Browse the repository at this point in the history
  3. Add options to configure predicate/backoff when handling higher level…

    … http retries
    
    Authored-by: Dennis Leon <leonde@vmware.com>
    DennisDenuto committed Sep 10, 2021
    Configuration menu
    Copy the full SHA
    a09fa36 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2021

  1. backfill test

    - add test to assert behavior around using a transport.Wrapper results
    in no additional wrapping such as retry is done.
    
    refactoring
    
    - add comments
    - rename transport.Transport -> transport.Wrapper
    - make transport package return transport.Wrapper
    
    Authored-by: Dennis Leon <leonde@vmware.com>
    DennisDenuto committed Sep 11, 2021
    Configuration menu
    Copy the full SHA
    13a1b0b View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2021

  1. Stop exposing Inner from transport.Wrapper

    - Consumers should construct a transport.Wrapper via constructor
    transport.NewWithContext
    - options retryBackoff and retryPredicate should only apply to http
    errors and not lower level transport errors. (Consumers can still provide
    a transport with the retry behavior they want)
    
    Authored-by: Dennis Leon <leonde@vmware.com>
    DennisDenuto committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    4e8dccb View commit details
    Browse the repository at this point in the history