2022-02-23 14:37:52 +08:00
|
|
|
package paramtable
|
|
|
|
|
2022-12-16 15:59:23 +08:00
|
|
|
type httpConfig struct {
|
2023-11-01 11:42:16 +08:00
|
|
|
Enabled ParamItem `refreshable:"false"`
|
|
|
|
DebugMode ParamItem `refreshable:"false"`
|
|
|
|
Port ParamItem `refreshable:"false"`
|
|
|
|
AcceptTypeAllowInt64 ParamItem `refreshable:"false"`
|
2023-11-19 17:14:20 +08:00
|
|
|
EnablePprof ParamItem `refreshable:"false"`
|
|
|
|
RequestTimeoutMs ParamItem `refreshable:"false"`
|
2022-02-23 14:37:52 +08:00
|
|
|
}
|
|
|
|
|
2022-12-16 15:59:23 +08:00
|
|
|
func (p *httpConfig) init(base *BaseTable) {
|
|
|
|
p.Enabled = ParamItem{
|
|
|
|
Key: "proxy.http.enabled",
|
|
|
|
DefaultValue: "true",
|
|
|
|
Version: "2.1.0",
|
2023-02-23 11:37:46 +08:00
|
|
|
Doc: "Whether to enable the http server",
|
|
|
|
Export: true,
|
2022-12-16 15:59:23 +08:00
|
|
|
}
|
|
|
|
p.Enabled.Init(base.mgr)
|
|
|
|
|
|
|
|
p.DebugMode = ParamItem{
|
|
|
|
Key: "proxy.http.debug_mode",
|
|
|
|
DefaultValue: "false",
|
|
|
|
Version: "2.1.0",
|
2023-02-23 11:37:46 +08:00
|
|
|
Doc: "Whether to enable http server debug mode",
|
|
|
|
Export: true,
|
2022-12-16 15:59:23 +08:00
|
|
|
}
|
|
|
|
p.DebugMode.Init(base.mgr)
|
2023-08-08 10:15:07 +08:00
|
|
|
|
|
|
|
p.Port = ParamItem{
|
|
|
|
Key: "proxy.http.port",
|
2023-09-19 10:01:23 +08:00
|
|
|
Version: "2.3.0",
|
2023-08-08 10:15:07 +08:00
|
|
|
Doc: "high-level restful api",
|
|
|
|
PanicIfEmpty: false,
|
|
|
|
Export: true,
|
|
|
|
}
|
|
|
|
p.Port.Init(base.mgr)
|
2023-11-01 11:42:16 +08:00
|
|
|
|
|
|
|
p.AcceptTypeAllowInt64 = ParamItem{
|
|
|
|
Key: "proxy.http.acceptTypeAllowInt64",
|
|
|
|
DefaultValue: "false",
|
|
|
|
Version: "2.3.2",
|
|
|
|
Doc: "high-level restful api, whether http client can deal with int64",
|
|
|
|
PanicIfEmpty: false,
|
|
|
|
Export: true,
|
|
|
|
}
|
|
|
|
p.AcceptTypeAllowInt64.Init(base.mgr)
|
2023-11-19 17:14:20 +08:00
|
|
|
|
|
|
|
p.EnablePprof = ParamItem{
|
|
|
|
Key: "proxy.http.enablePprof",
|
|
|
|
DefaultValue: "true",
|
|
|
|
Version: "2.3.3",
|
|
|
|
Doc: "Whether to enable pprof middleware on the metrics port",
|
|
|
|
Export: true,
|
|
|
|
}
|
|
|
|
p.EnablePprof.Init(base.mgr)
|
2022-04-29 15:15:47 +08:00
|
|
|
}
|