Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultGracePeriod = 30 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func FindPID ¶
FindPID scans /proc for a process whose argv[0] matches processName. Requires shareProcessNamespace: true in the Kubernetes pod spec.
func GracefulStop ¶
func GracefulStop(ctx context.Context, signaler ProcessSignaler, processName string, gracePeriod time.Duration) error
GracefulStop sends SIGTERM to the named process, waits up to gracePeriod for it to exit, then escalates to SIGKILL. When signaler is nil the package-level functions are used directly.
Types ¶
Click to show internal directories.
Click to hide internal directories.