refactor(watchdog): remove tcp socket connection and add local unix sock connection
This commit is contained in:
@@ -37,8 +37,6 @@ func GetSettingsHandler(w http.ResponseWriter, r *http.Request) {
|
||||
value = global.CurrentConfig.Debug
|
||||
case "Watchdog.Enabled":
|
||||
value = global.CurrentConfig.Watchdog.Enabled
|
||||
case "Watchdog.Port":
|
||||
value = global.CurrentConfig.Watchdog.Port
|
||||
case "Notification.Enabled":
|
||||
value = global.CurrentConfig.Notification.Enabled
|
||||
case "Notification.Method":
|
||||
@@ -68,7 +66,6 @@ func GetSettingsHandler(w http.ResponseWriter, r *http.Request) {
|
||||
"InstancePath": global.CurrentConfig.InstancePath,
|
||||
"Debug": global.CurrentConfig.Debug,
|
||||
"Watchdog.Enabled": global.CurrentConfig.Watchdog.Enabled,
|
||||
"Watchdog.Port": global.CurrentConfig.Watchdog.Port,
|
||||
"Notification.Enabled": global.CurrentConfig.Notification.Enabled,
|
||||
"Notification.Method": global.CurrentConfig.Notification.Method,
|
||||
"Webhook.Method": global.CurrentConfig.Webhook.Method,
|
||||
@@ -131,10 +128,6 @@ func SetSettingsHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if v, ok := value.(bool); ok {
|
||||
global.CurrentConfig.Watchdog.Enabled = v
|
||||
}
|
||||
case "Watchdog.Port":
|
||||
if v, ok := value.(float64); ok {
|
||||
global.CurrentConfig.Watchdog.Port = int(v)
|
||||
}
|
||||
case "Notification.Enabled":
|
||||
if v, ok := value.(bool); ok {
|
||||
global.CurrentConfig.Notification.Enabled = v
|
||||
|
||||
Reference in New Issue
Block a user