mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-28 07:49:37 +08:00
【新增】添加接口调用限流
This commit is contained in:
@@ -6,6 +6,7 @@ type Server struct {
|
||||
Port int `yaml:"port"`
|
||||
Model string `yaml:"model"`
|
||||
Cors bool `yaml:"cors"`
|
||||
Rate *Rate `yaml:"rate"`
|
||||
IsInitTable bool `yaml:"isInitTable"`
|
||||
DbType string `yaml:"db-type"`
|
||||
ExcelDir string `yaml:"excel-dir"`
|
||||
@@ -33,3 +34,8 @@ type Tls struct {
|
||||
KeyFile string `yaml:"key-file"` // 私钥文件路径
|
||||
CertFile string `yaml:"cert-file"` // 证书文件路径
|
||||
}
|
||||
|
||||
type Rate struct {
|
||||
IsRate bool `yaml:"is-rate"` // 是否限流
|
||||
RateNum float64 `yaml:"rate-num"` // 限流数量
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user