Commit Graph

8 Commits

Author SHA1 Message Date
21a4b03c57 feat(watchdog): add auto boot up for watchdog progress 2026-05-09 15:30:03 +08:00
1432651a14 fix(watchdog): fix watchdog unable to send webhook and simplify the parsing of json config
- Change webhook config headers and body from map to string format
- Move command parsing logic to separate function in command.go
- Add debug logging for webhook operations
- Improve exception handling with proper JSON parsing
- Simplify config loading logic with default values
2026-04-28 20:48:54 +08:00
0890c8136f feat(watchdog): add exception handling and webhook integration
- Implement exception handling in TCP client to process error messages
- Add webhook functionality to send notifications for exceptions
- Introduce utility functions for string parsing
- Update config with webhook template
2026-04-28 15:46:31 +08:00
df8df78bab refactor(config): improve config file handling and error messages
- Replace manual address formatting with net.JoinHostPort in tcpClient
- Simplify debug/error messages in IsInstanceRunning by removing redundant output
- Fix incorrect map reference for RunUser in CreateInstanceHandler
- Extract config file creation logic into handleConfigFileCreate
- Add auth_token to response data in GetInstanceInfoHandler
- Remove redundant AuthToken field from InstanceInfo struct
2026-04-21 18:39:11 +08:00
2426933f49 fix(watchdog): now the client could successfully send more msgs to watchdog instead of the only connection msg
- Add debug logging for watchdog operations
- Standardize message format for instance operations
- Improve TCP message handling with proper line termination
- Enhance error handling in watchdog operations
- Add proper cleanup of recvChan in sendMsg
- Update response handling in instance handlers
2026-04-07 23:29:07 +08:00
de6a8cdcb0 fix(watchdog): refactored tcp recvMsg function, now the watchdog can be connected correctly
- Refactor TCP message reading to use ReadBytes and TrimSpace for better reliability
- Add connection success logging in main.go
- Update .gitignore to include logs.db-journal
2026-04-02 22:22:44 +08:00
78bd1cb3cc style: using is struct to handle all judgements global envs 2026-04-02 21:38:50 +08:00
aa22b04a1f feat(watchdog): add watchdog service with TCP client implementation
- Implement TCP client for watchdog service communication
- Add watchdog configuration in config.json
- Update main.go to initialize and connect to watchdog
- Add watchdog related functions (connect, command handling)
- Update README.md with new watchdog feature
- Improve route setup logging in router.go
2026-04-02 18:42:44 +08:00