refactor(watchdog): remove tcp socket connection and add local unix sock connection

This commit is contained in:
2026-05-10 14:38:52 +08:00
parent 9c684241d1
commit ef27e7e0a9
10 changed files with 86 additions and 82 deletions
-7
View File
@@ -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