[#389686] Add crash detection logic to daemon

This commit is contained in:
Dane Everitt
2019-11-30 16:43:18 -08:00
parent be14811eb4
commit 8c57583ce9
6 changed files with 125 additions and 7 deletions

View File

@@ -11,4 +11,17 @@ func IsSuspendedError(err error) bool {
_, ok := err.(*suspendedError)
return ok
}
}
type crashTooFrequent struct {
}
func (e *crashTooFrequent) Error() string {
return "server has crashed too soon after the last detected crash"
}
func IsTooFrequentCrashError(err error) bool {
_, ok := err.(*crashTooFrequent)
return ok
}