增加重试配置初始化 + 重试逻辑处理
This commit is contained in:
@ -38,6 +38,14 @@ type requestConfig struct {
|
||||
//
|
||||
// Date : 16:25 2024/5/31
|
||||
func (rc *requestConfig) initDefaultConfig(reqConfig *define.Request) {
|
||||
if nil == reqConfig.RetryRule {
|
||||
reqConfig.RetryRule = &define.RequestRetryRule{
|
||||
RetryCount: 0,
|
||||
RetryTimeInterval: 0,
|
||||
RetryHttpCodeList: make([]int64, 0),
|
||||
RetryBusinessCodeList: make([]string, 0),
|
||||
}
|
||||
}
|
||||
if nil == reqConfig.Header {
|
||||
reqConfig.Header = map[string]string{}
|
||||
}
|
||||
|
Reference in New Issue
Block a user