nginx.go 864 B

1234567891011121314151617181920212223
  1. package settings
  2. type Nginx struct {
  3. AccessLogPath string `json:"access_log_path" protected:"true"`
  4. ErrorLogPath string `json:"error_log_path" protected:"true"`
  5. LogDirWhiteList []string `json:"log_dir_white_list" protected:"true"`
  6. ConfigDir string `json:"config_dir" protected:"true"`
  7. ConfigPath string `json:"config_path" protected:"true"`
  8. PIDPath string `json:"pid_path" protected:"true"`
  9. TestConfigCmd string `json:"test_config_cmd" protected:"true"`
  10. ReloadCmd string `json:"reload_cmd" protected:"true"`
  11. RestartCmd string `json:"restart_cmd" protected:"true"`
  12. StubStatusPort uint `json:"stub_status_port" binding:"omitempty,min=1,max=65535"`
  13. }
  14. var NginxSettings = &Nginx{}
  15. func (n *Nginx) GetStubStatusPort() uint {
  16. if n.StubStatusPort == 0 {
  17. return 51820
  18. }
  19. return n.StubStatusPort
  20. }