shutdown

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHandlerExists error = errors.New("handler with given name already exists")
)

Functions

func Inhibit

func 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()

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