-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make retrying transport and http errors configurable (#1122)
* Only wrap transport if it is a transport.Transport Note: This is a breaking change Authored-by: Dennis Leon <leonde@vmware.com> * 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> * Add options to configure predicate/backoff when handling higher level http retries Authored-by: Dennis Leon <leonde@vmware.com> * 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> * 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>
- Loading branch information
1 parent
c71ca9b
commit 34b7f00
Showing
10 changed files
with
233 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.