etcd: go.etcd.io/etcd/pkg/osutil Index | Files

package osutil

import "go.etcd.io/etcd/pkg/osutil"

Package osutil implements operating system-related utility functions.

Index

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 8 packages (graph) and is imported by 10 packages. Updated 2018-08-29. Refresh now. Tools for package owners.