Documentation ¶
Index ¶
Constants ¶
View Source
const ServiceTimeout = 10 * time.Second
Variables ¶
This section is empty.
Functions ¶
func NoRestartErr ¶
NoRestartErr wraps the given error err (which may be nil) to make sure that `errors.Is(err, suture.ErrDoNotRestart) == true`.
func OnSupervisorDone ¶
func OnSupervisorDone(sup *suture.Supervisor, fn func())
OnSupervisorDone calls fn when sup is done.
func SpecWithDebugLogger ¶
func SpecWithInfoLogger ¶
Types ¶
type ExitStatus ¶
type ExitStatus int
const ( ExitSuccess ExitStatus = 0 ExitError ExitStatus = 1 ExitNoUpgradeAvailable ExitStatus = 2 ExitRestart ExitStatus = 3 ExitUpgrade ExitStatus = 4 )
func (ExitStatus) AsInt ¶
func (s ExitStatus) AsInt() int
type FatalErr ¶
type FatalErr struct { Err error Status ExitStatus }
func AsFatalErr ¶
func AsFatalErr(err error, status ExitStatus) *FatalErr
AsFatalErr wraps the given error creating a FatalErr. If the given error already is of type FatalErr, it is not wrapped again.
type ServiceWithError ¶
Click to show internal directories.
Click to hide internal directories.