shutdown

package
v4.9.5 Latest Latest
Warning

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

Go to latest
Published: May 30, 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 Start

func Start() error

Start begins handling SIGTERM and SIGINT and will run the given on-signal handlers when one is called. 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.

func Unregister

func Unregister(name string) error

Unregister un-registers a given shutdown handler.

Types

This section is empty.

Jump to

Keyboard shortcuts

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