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
-5
View File
@@ -65,7 +65,6 @@ func LoadConfig(configPath string, getInitSystem func() string) error {
global.CurrentConfig.InstancePath = fileConfig.InstancePath
global.CurrentConfig.Debug = fileConfig.Debug
global.CurrentConfig.Watchdog.Enabled = fileConfig.Watchdog.Enabled
global.CurrentConfig.Watchdog.Port = fileConfig.Watchdog.Port
global.CurrentConfig.Notification.Enabled = fileConfig.Notification.Enabled
global.CurrentConfig.Notification.Method = fileConfig.Notification.Method
global.CurrentConfig.Webhook.Method = fileConfig.Webhook.Method
@@ -93,10 +92,6 @@ func LoadConfig(configPath string, getInitSystem func() string) error {
global.CurrentConfig.InstancePath = "./configs"
}
if fileConfig.Watchdog.Port == 0 {
global.CurrentConfig.Watchdog.Port = 12380
}
if err := os.MkdirAll(global.CurrentConfig.InstancePath, 0755); err != nil {
return fmt.Errorf("failed to create config directory: %w", err)
}