feat: add stub_status_port configuration for Nginx settings

This commit is contained in:
Jacky 2025-04-11 08:32:02 +00:00
parent 2d56914af1
commit 509443a6e7
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
9 changed files with 88 additions and 40 deletions

View file

@ -10,6 +10,14 @@ type Nginx struct {
TestConfigCmd string `json:"test_config_cmd" protected:"true"`
ReloadCmd string `json:"reload_cmd" protected:"true"`
RestartCmd string `json:"restart_cmd" protected:"true"`
StubStatusPort uint `json:"stub_status_port" binding:"omitempty,min=1,max=65535"`
}
var NginxSettings = &Nginx{}
func (n *Nginx) GetStubStatusPort() uint {
if n.StubStatusPort == 0 {
return 51820
}
return n.StubStatusPort
}