支持设置流控实例
This commit is contained in:
@ -9,6 +9,7 @@ package define
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/go-resty/resty/v2"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -37,6 +38,7 @@ type Request struct {
|
||||
ReadTimeout int64 `json:"read_timeout"` // 读取超时时间
|
||||
RetryRule *RequestRetryRule `json:"retry_rule"` // 重试规则
|
||||
Logger *zap.Logger `json:"-"` // 日志记录器
|
||||
RateLimiter resty.RateLimiter `json:"-"` // 流控实例
|
||||
}
|
||||
|
||||
// RequestRetryRule 重试规则
|
||||
|
Reference in New Issue
Block a user