Add Retry option for clients

This commit is contained in:
Thinh Nguyen 2017-04-12 16:47:40 -04:00
parent d7dc4e618b
commit ea34e23118
No known key found for this signature in database
GPG Key ID: C565BDA2570826DE

View File

@ -203,6 +203,13 @@ func Retries(i int) Option {
}
}
// Retry sets the retry function to be used when re-trying.
func Retry(fn RetryFunc) Option {
return func(o *Options) {
o.CallOptions.Retry = fn
}
}
// The request timeout.
// Should this be a Call Option?
func RequestTimeout(d time.Duration) Option {