sighandlers

package
v0.0.0-...-b702281 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 75

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

func FinalSave(state dockerstate.TaskEngineState, dataClient data.Client, 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

func StartDebugHandler()

func StartDefaultTerminationHandler

func StartDefaultTerminationHandler(state dockerstate.TaskEngineState, dataClient data.Client, taskEngine engine.TaskEngine, cancel context.CancelFunc)

StartDefaultTerminationHandler defines a default termination handler suitable for running in a process

Types

type TerminationHandler

type TerminationHandler func(state dockerstate.TaskEngineState, dataClient data.Client, taskEngine engine.TaskEngine, cancel context.CancelFunc)

TerminationHandler defines a handler used for terminating the agent

Directories

Path Synopsis
Package exitcodes defines agent exit codes
Package exitcodes defines agent exit codes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL