Merge pull request #158 from Taik/master

Add Retry option for clients
This commit is contained in:
Asim Aslam 2017-04-13 13:26:15 +01:00 committed by GitHub
commit 742b83cbb1

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 {