Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRunCmdOpts = RunCmdOpts{ SetupSignalHandler: core.SetupSignalHandler, }
Functions ¶
func UsageOptions ¶
Types ¶
type RunCmdOpts ¶
type RunCmdOpts struct {
// Stop signals are SIGINT and SIGTERM
// We can start graceful shutdown when first context is closed and forcefully stop when the second one is closed.
// Note that the handler closes usr2Received as soon as SIGTERM has been
// received, exactly one SIGUSR2 is buffered and notifications are
// non-blocking, so the guarantee is that at least one SIGUSR2 is delivered.
SetupSignalHandler func() (firstStopSignalReceived context.Context, secondStopSignalReceived context.Context, usr2Received <-chan struct{})
}
Click to show internal directories.
Click to hide internal directories.