etcd: Index | Files

package osutil

import ""

Package osutil implements operating system-related utility functions.


Package Files

interrupt_unix.go osutil.go signal_linux.go

func Exit Uses

func Exit(code int)

Exit relays to os.Exit if no interrupt handlers are running, blocks otherwise.

func HandleInterrupts Uses

func HandleInterrupts(lg *zap.Logger)

HandleInterrupts calls the handler functions on receiving a SIGINT or SIGTERM.

func RegisterInterruptHandler Uses

func RegisterInterruptHandler(h InterruptHandler)

RegisterInterruptHandler registers a new InterruptHandler. Handlers registered after interrupt handing was initiated will not be executed.

func Unsetenv Uses

func Unsetenv(key string) error

type InterruptHandler Uses

type InterruptHandler func()

InterruptHandler is a function that is called on receiving a SIGTERM or SIGINT signal.

Package osutil imports 7 packages (graph) and is imported by 309 packages. Updated 2020-02-14. Refresh now. Tools for package owners.