Documentation ¶
Overview ¶
Package sighandlers handle signals and behave appropriately. SIGTERM:
Flush state to disk and exit
SIGUSR1:
Print a dump of goroutines to the logger and DON'T exit
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FinalSave ¶ added in v1.0.0
func FinalSave(saver statemanager.Saver, taskEngine engine.TaskEngine) error
FinalSave should be called immediately before exiting, and only before exiting, in order to flush tasks to disk. It waits a short timeout for state to settle if necessary. If unable to reach a steady-state and save within this short timeout, it returns an error
func StartDebugHandler ¶ added in v1.3.1
func StartDebugHandler()
func StartDefaultTerminationHandler ¶ added in v1.16.0
func StartDefaultTerminationHandler(saver statemanager.Saver, taskEngine engine.TaskEngine, cancel context.CancelFunc)
StartDefaultTerminationHandler defines a default termination handler suitable for running in a process
Types ¶
type TerminationHandler ¶ added in v1.16.0
type TerminationHandler func(saver statemanager.Saver, taskEngine engine.TaskEngine, cancel context.CancelFunc)
TerminationHandler defines a handler used for terminating the agent
Click to show internal directories.
Click to hide internal directories.