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
+8 -11
View File
@@ -51,15 +51,14 @@ type Config struct {
Debug bool `json:"debug"`
Watchdog struct {
Enabled bool `json:"enabled"`
Port int `json:"port"`
} `json:"watchdog"`
Notification struct {
Enabled bool `json:"enabled"`
Method string `json:"method"`
} `json:"notification"`
Webhook struct {
Method string `json:"method"`
URL string `json:"url"`
Method string `json:"method"`
URL string `json:"url"`
Headers string `json:"headers"`
Body string `json:"body"`
} `json:"webhook"`
@@ -73,10 +72,8 @@ var CurrentConfig = Config{
Debug: false,
Watchdog: struct {
Enabled bool `json:"enabled"`
Port int `json:"port"`
}{
Enabled: false,
Port: 0,
},
Notification: struct {
Enabled bool `json:"enabled"`
@@ -86,14 +83,14 @@ var CurrentConfig = Config{
Method: "webhook",
},
Webhook: struct {
Method string `json:"method"`
URL string `json:"url"`
Method string `json:"method"`
URL string `json:"url"`
Headers string `json:"headers"`
Body string `json:"body"`
Body string `json:"body"`
}{
Method: "",
URL: "",
Method: "",
URL: "",
Headers: "Content-Type: application/json",
Body: "",
Body: "",
},
}