shutdown

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHandlerExists = errors.New("handler with given name already exists")
)
View Source
var (
	ErrNotStarted = errors.New("shutdown signal handler has not yet been started")
)

Functions

func Inhibit

func Inhibit()

Inhibit temporarily inhibit signals from shutting down Libpod.

func Register

func Register(name string, handler func(os.Signal) error) error

Register registers a function that will be executed when Podman is terminated by a signal. Handlers are invoked LIFO - the last handler registered is the first run.

func SetExitCode added in v5.3.0

func SetExitCode(i int)

SetExitCode when we exit after we ran all shutdown handlers, it should be positive.

func Start

func Start() error

Start begins handling SIGTERM and SIGINT and will run the given on-signal handlers when one is called and then exit with the exit code of 1 if not overwritten with SetExitCode(). This can be cancelled by calling Stop().

func Stop

func Stop() error

Stop the shutdown signal handler.

func Uninhibit

func Uninhibit()

Uninhibit stop inhibiting signals from shutting down Libpod.

Types

This section is empty.

Jump to

Keyboard shortcuts

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