Skip to content

Commit 81c60ca

Browse files
sync upstream
1 parent 7e0e95e commit 81c60ca

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

pkg/retry/v1/config.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,19 @@ import (
1212
type RetryConfig struct {
1313
mc map[nameConfig]*methodConfig
1414
retryThrottling *retryThrottling
15-
waitForReady bool
1615
}
1716

1817
type RetryOption func(c *RetryConfig)
1918

2019
type grpcRetryPolicy struct {
2120
MethodConfig []*methodConfig `json:"methodConfig"`
2221
RetryThrottling retryThrottling `json:"retryThrottling"`
23-
WaitForReady bool `json:"waitForReady"`
2422
}
2523

2624
type methodConfig struct {
27-
NameConfig []nameConfig `json:"name"`
28-
RetryPolicy retryPolicy `json:"retryPolicy"`
25+
NameConfig []nameConfig `json:"name"`
26+
RetryPolicy retryPolicy `json:"retryPolicy"`
27+
WaitForReady bool `json:"waitForReady"`
2928
}
3029

3130
type nameConfig struct {

pkg/retry/v1/default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ func defaultRetryConfig() *RetryConfig {
1616
MaxTokens: 100,
1717
TokenRatio: 0.1,
1818
},
19-
waitForReady: true,
2019
}
2120
}
2221

@@ -30,5 +29,6 @@ func defaultMethodConfig() *methodConfig {
3029
BackoffMultiplier: 2,
3130
RetryableStatusCodes: []string{"UNAVAILABLE"},
3231
},
32+
WaitForReady: true,
3333
}
3434
}

pkg/retry/v1/dial_option.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func RetryDialOption(opts ...RetryOption) (grpc.DialOption, error) {
3333
mc = append(mc, v)
3434
}
3535

36-
c, err := json.Marshal(&grpcRetryPolicy{MethodConfig: mc, RetryThrottling: *config.retryThrottling, WaitForReady: config.waitForReady})
36+
c, err := json.Marshal(&grpcRetryPolicy{MethodConfig: mc, RetryThrottling: *config.retryThrottling})
3737
if err != nil {
3838
return nil, err
3939
}

0 commit comments

Comments
 (0)