Don't run pre-boot actions if the server is already running

This commit is contained in:
Dane Everitt
2020-09-11 23:11:57 -07:00
parent 8bcb3d7c62
commit 5a62f83ec8
3 changed files with 12 additions and 14 deletions

View File

@@ -1,17 +1,9 @@
package server
type suspendedError struct {
}
import "github.com/pkg/errors"
func (e *suspendedError) Error() string {
return "server is currently in a suspended state"
}
func IsSuspendedError(err error) bool {
_, ok := err.(*suspendedError)
return ok
}
var ErrIsRunning = errors.New("server is running")
var ErrSuspended = errors.New("server is currently in a suspended state")
type crashTooFrequent struct {
}