SetRetryConfig updates retry attempts, credential retry limit and cooldown wait interval.
(retry int, maxRetryInterval time.Duration, maxRetryCredentials int)
| 2042 | |
| 2043 | // SetRetryConfig updates retry attempts, credential retry limit and cooldown wait interval. |
| 2044 | func (m *Manager) SetRetryConfig(retry int, maxRetryInterval time.Duration, maxRetryCredentials int) { |
| 2045 | if m == nil { |
| 2046 | return |
| 2047 | } |
| 2048 | if retry < 0 { |
| 2049 | retry = 0 |
| 2050 | } |
| 2051 | if maxRetryCredentials < 0 { |
| 2052 | maxRetryCredentials = 0 |
| 2053 | } |
| 2054 | if maxRetryInterval < 0 { |
| 2055 | maxRetryInterval = 0 |
| 2056 | } |
| 2057 | m.requestRetry.Store(int32(retry)) |
| 2058 | m.maxRetryCredentials.Store(int32(maxRetryCredentials)) |
| 2059 | m.maxRetryInterval.Store(maxRetryInterval.Nanoseconds()) |
| 2060 | } |
| 2061 | |
| 2062 | // RegisterExecutor registers a provider executor with the manager. |
| 2063 | func (m *Manager) RegisterExecutor(executor ProviderExecutor) { |
no outgoing calls