resty_v2 -> resty_v3
This commit is contained in:
@ -39,6 +39,7 @@ type RequestConfigGroupItem struct {
|
||||
FailBehavior *RequestConfigGroupItemFailBehavior `json:"fail_behavior"` // 失败的行为, 不配置, 默认失败break
|
||||
FinalFailureAllow bool `json:"final_failure_allow"` // 已经确定当前请求是最终失败了,当前请求是否允许执行
|
||||
CacheInstance abstract.ICache `json:"-"` // 数据缓存实例
|
||||
RateLimiter abstract.RateLimiter `json:"-"` // 流控实例
|
||||
ResponseParser abstract.IResponse `json:"-"` // 响应数据解析
|
||||
Condition any `json:"condition"` // TODO: 请求条件, 特定条件下不执行当前请求
|
||||
}
|
||||
|
@ -149,6 +149,7 @@ func (c *client) doRequest(apiList []*RequestConfigGroupItem) bool {
|
||||
apiCfg.RequestCfg.Query = param[strings.ToLower(consts.RequestDataLocationQuery.String())] // query
|
||||
if httpClient, err = httpclient.NewHttpClient(apiCfg.RequestCfg, &httpclient.RequestOption{
|
||||
CacheInstance: apiCfg.CacheInstance,
|
||||
RateLimiter: apiCfg.RateLimiter,
|
||||
ResponseParser: apiCfg.ResponseParser,
|
||||
}); nil != err {
|
||||
// 此处获取客户端实例即发生异常, 忽略一切配置, 直接作为全局失败, 后续也不请求了
|
||||
|
Reference in New Issue
Block a user