Documentation
¶
Index ¶
Constants ¶
View Source
const RestartSignal = syscall.SIGUSR2
RestartSignal is the signal that causes the pod to be restarted.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RestartSignalHandler ¶
type RestartSignalHandler interface {
Close()
Closed() <-chan struct{}
}
RestartSignalHandler waits to receive a signal that tells the pod to restart.
func NewRestartSignalHandler ¶
func NewRestartSignalHandler( ctx context.Context, k8sClient ctrlclient.Client, elected <-chan struct{}) RestartSignalHandler
NewRestartSignalHandler returns a new signal handler that waits to receive a SIGUSR2 signal, upon which the pod is restarted via the package's Restart(context.Context, ctrlclient.Client, string) error method. Calling the handler's Close() method will stop the signal handler.
Click to show internal directories.
Click to hide internal directories.