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

Add context-aware versions of retry.OnError and retry.OnConflict #124585

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 28, 2024

  1. Add context-aware versions of retry.OnError and retry.OnConflict

    The current util methods for retry don't take in a context. This adds in
    versions which do take a context and respect the context cancellation or
    deadline. The implementation is rather simple, since the underlying
    method used, wait.ExponentialBackoff already has a context-aware
    version, wait.ExponentialBackoffWithContext.
    
    The documentation updates follow how the http.Request package refers to
    the context-aware version:
    
    https://pkg.go.dev/net/http@go1.22.2#NewRequest
    
    http.NewRequest refers to http.NewRequestWithContext and the latter
    contains the fuller documentation.
    steve-261370 committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    6819fc5 View commit details
    Browse the repository at this point in the history