feat(errorHandle): add service error handling and recovery logic

Implement error handling mechanism with retry logic for failed services. Includes:
- ServiceControl struct to track service state
- HandleErrorProcess function to attempt service restarts
- Integration with monitor to automatically recover services
- Enhanced exception handling with status checks and monitoring restart
This commit is contained in:
2026-04-29 12:11:25 +08:00
parent db192f2209
commit 3ce076b8dc
3 changed files with 102 additions and 3 deletions

13
errorHandle/vars.go Normal file
View File

@@ -0,0 +1,13 @@
package errorHandle
import (
"time"
)
type ServiceControl struct {
ServiceName string
RetryCount int
ErrorType string
ErrorMsg string
ErrorTime time.Time
}