Adjusting names

This commit is contained in:
Scott Finlay
2016-11-07 09:40:11 +01:00
parent d7e4062a0e
commit 092d17a74e
5 changed files with 16 additions and 30 deletions

View File

@@ -44,7 +44,7 @@ type CallOptions struct {
// Backoff func
Backoff BackoffFunc
// Check if retriable func
CheckIfRetriable IsRetriableFunc
Retry RetryFunc
// Transport Dial Timeout
DialTimeout time.Duration
// Number of Call attempts
@@ -76,7 +76,7 @@ func newOptions(options ...Option) Options {
Codecs: make(map[string]codec.NewCodec),
CallOptions: CallOptions{
Backoff: DefaultBackoff,
CheckIfRetriable: DefaultCheckIfRetriable,
Retry: DefaultRetry,
Retries: DefaultRetries,
RequestTimeout: DefaultRequestTimeout,
DialTimeout: transport.DefaultDialTimeout,
@@ -224,11 +224,11 @@ func WithBackoff(fn BackoffFunc) CallOption {
}
}
// WithCheckIfRetriable is a CallOption which overrides that which
// WithRetry is a CallOption which overrides that which
// set in Options.CallOptions
func WithCheckIfRetriable(fn IsRetriableFunc) CallOption {
func WithRetry(fn RetryFunc) CallOption {
return func(o *CallOptions) {
o.CheckIfRetriable = fn
o.Retry = fn
}
}