signals

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 8 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context() context.Context

Context returns a context which will be canceled when either the SIGINT (windows and non windows) or SIGTERM (non windows) signal is caught. If either signal is caught a second time, the program is terminated immediately with exit code 1.

func OnHUP added in v0.18.0

func OnHUP(ctx context.Context) <-chan context.Context

OnHUP returns a channel that yields a new context each time a SIGHUP signal is received. Each context is canceled when the next SIGHUP arrives or when the parent context is canceled. The channel is closed when the parent context is canceled.

func ReloadPipeName added in v0.18.0

func ReloadPipeName(pid int) string

ReloadPipeName returns the named pipe path used by a dapr process with the given PID to listen for reload signals on Windows. On POSIX systems this is not used (SIGHUP is used instead), but returns the same value as the Windows implementation so that cross-platform code can compute the expected name.

func SignalReload added in v0.18.0

func SignalReload(pid int) error

SignalReload sends SIGHUP to the process with the given PID on POSIX systems, triggering a runtime reload.

Types

This section is empty.

Jump to

Keyboard shortcuts

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