Adding the ability to specify a function to check if micro should retry a failed rpc call

This commit is contained in:
Scott Finlay
2016-11-03 10:45:31 +01:00
parent 2c65a38ba9
commit d7e4062a0e
4 changed files with 44 additions and 4 deletions

View File

@@ -68,6 +68,8 @@ var (
DefaultClient Client = newRpcClient()
// DefaultBackoff is the default backoff function for retries
DefaultBackoff = exponentialBackoff
// DefaultCheckIfRetriable is the default check-for-retry function for retries
DefaultCheckIfRetriable = AlwaysRetry
// DefaultRetries is the default number of times a request is tried
DefaultRetries = 1
// DefaultRequestTimeout is the default request timeout