Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunAndExit ¶
func RunAndExit(runnables ...Runnable)
RunAndExit runs the set of runnables with MRun, listens to SIGTERM/SIGINT and terminates the process with a non-zero code when a runnable fails.
Types ¶
type Logger ¶
type Logger interface {
Infof(format string, args ...interface{})
Warnf(format string, args ...interface{})
}
Logger is the contract our logger
type MRun ¶
type MRun struct {
Logger Logger
// contains filtered or unexported fields
}
MRun orchestrates the execution of a set of Runnable.
func (*MRun) SetSignalsHandler ¶
SetSignalsHandler installs the signal handler that trigger a shutdown. The signals defaults to SIGINT and SIGTERM.
Click to show internal directories.
Click to hide internal directories.