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
13 lines
167 B
Go
13 lines
167 B
Go
package errorHandle
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type ServiceControl struct {
|
|
ServiceName string
|
|
RetryCount int
|
|
ErrorType string
|
|
ErrorMsg string
|
|
ErrorTime time.Time
|
|
} |