util

package module
v0.0.0-...-448cf80 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ShutdownChannel listens for shutdown signals
	ShutdownChannel = make(chan os.Signal, 1)

	// ShuttingDown checks to see if application is terminating
	ShuttingDown = false

	// RunningProcesses describes a wait group
	RunningProcesses = &sync.WaitGroup{}
)

Functions

func Kill

func Kill(p *os.Process)

Kill terminates a process

func ReplacerFromMap

func ReplacerFromMap(args map[string]string) *strings.Replacer

ReplacerFromMap creates a strings.Replacer object from a map of orig => replacement

func SetCloseHandler

func SetCloseHandler()

SetCloseHandler starts up signal handlers for app termination

func WaitTimeout

func WaitTimeout(p *os.Process, timeout time.Duration) (*os.ProcessState, error)

WaitTimeout kills a process after a specified duration

Types

This section is empty.

Jump to

Keyboard shortcuts

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