2022-02-23 14:37:52 +08:00
|
|
|
package paramtable
|
|
|
|
|
2022-12-16 15:59:23 +08:00
|
|
|
type httpConfig struct {
|
|
|
|
Enabled ParamItem `refreshable:"false"`
|
|
|
|
DebugMode ParamItem `refreshable:"false"`
|
2023-08-08 10:15:07 +08:00
|
|
|
Port 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",
|
|
|
|
Version: "2.1.0",
|
|
|
|
Doc: "high-level restful api",
|
|
|
|
PanicIfEmpty: false,
|
|
|
|
Export: true,
|
|
|
|
}
|
|
|
|
p.Port.Init(base.mgr)
|
2022-04-29 15:15:47 +08:00
|
|
|
}
|