Documentation ¶
Index ¶
- Variables
- func AddHandler(handler func())
- func Check(err error) bool
- func Debug(a ...interface{})
- func Debugc(fn func() string)
- func Debugf(format string, a ...interface{})
- func Debugs(a interface{})
- func Error(a ...interface{})
- func Errorc(fn func() string)
- func Errorf(format string, a ...interface{})
- func Errors(a interface{})
- func Fatal(a ...interface{})
- func Fatalc(fn func() string)
- func Fatalf(format string, a ...interface{})
- func Fatals(a interface{})
- func GoroutineDump() string
- func Info(a ...interface{})
- func Infoc(fn func() string)
- func Infof(format string, a ...interface{})
- func Infos(a interface{})
- func Listener()
- func Request()
- func RequestRestart()
- func Requested() bool
- func Trace(a ...interface{})
- func Tracec(fn func() string)
- func Tracef(format string, a ...interface{})
- func Traces(a interface{})
- func Warn(a ...interface{})
- func Warnc(fn func() string)
- func Warnf(format string, a ...interface{})
- func Warns(a interface{})
- type HandlerWithSource
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Restart bool // = true // Chan is used to receive SIGINT (Ctrl+C) signals. Chan chan os.Signal // Signals is the list of signals that cause the interrupt Signals = []os.Signal{os.Interrupt} // ShutdownRequestChan is a channel that can receive shutdown requests ShutdownRequestChan = qu.T() // AddHandlerChan is used to add an interrupt handler to the list of // handlers to be invoked on SIGINT (Ctrl+C) signals. AddHandlerChan = make(chan HandlerWithSource) // HandlersDone is closed after all interrupt handlers run the first time // an interrupt is signaled. HandlersDone = make(qu.C) DataDir string )
Functions ¶
func AddHandler ¶
func AddHandler(handler func())
AddHandler adds a handler to call when a SIGINT (Ctrl+C) is received.
func GoroutineDump ¶ added in v0.4.14
func GoroutineDump() string
GoroutineDump returns a string with the current goroutine dump in order to show what's going on in case of timeout.
func Listener ¶
func Listener()
Listener listens for interrupt signals, registers interrupt callbacks, and responds to custom shutdown signals as required
func RequestRestart ¶
func RequestRestart()
RequestRestart sets the reset flag and requests a restart
Types ¶
type HandlerWithSource ¶ added in v0.4.14
type HandlerWithSource struct { Source string Fn func() }
Click to show internal directories.
Click to hide internal directories.