[#3896cn] Add support for suspending a server and blocking boot when suspended

This commit is contained in:
Dane Everitt
2019-11-30 15:19:08 -08:00
parent fa42ed92fb
commit 0ce95aa2e3
5 changed files with 78 additions and 3 deletions

14
server/errors.go Normal file
View File

@@ -0,0 +1,14 @@
package server
type suspendedError struct {
}
func (e *suspendedError) Error() string {
return "server is currently in a suspended state"
}
func IsSuspendedError(err error) bool {
_, ok := err.(*suspendedError)
return ok
}