Documentation
¶
Overview ¶
Package restoreproxy is the PID 1 of a restore destination container. It waits for the agent to finish the restore, then follows the restored process and exits with its status, so the container's lifecycle is the workload's.
Index ¶
Constants ¶
View Source
const DefaultPollInterval = 5 * time.Second
DefaultPollInterval backs up inotify. It only matters when a watch event is lost, so it is slow.
Variables ¶
View Source
var ForwardedSignals = []os.Signal{ syscall.SIGTERM, syscall.SIGINT, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGUSR1, syscall.SIGUSR2, }
ForwardedSignals are passed on to the restored process. SIGKILL and SIGSTOP cannot be caught, so kubelet's final SIGKILL takes the whole container down.
Functions ¶
func ControlDirFromEnv ¶
func ControlDirFromEnv() string
ControlDirFromEnv resolves the control directory the restore Pod contract mounts into the container.
Types ¶
type Config ¶
type Config struct {
// ControlDir holds RestoreCompleteFile and RestoreFailedFile.
ControlDir string
// ProcRoot is normally /proc. The restored PID is read relative to it.
ProcRoot string
// Signals delivers the ForwardedSignals the caller subscribed to.
Signals <-chan os.Signal
// PollInterval backs up inotify while waiting for the restore.
PollInterval time.Duration
Log logr.Logger
}
Config is what Run needs from the process around it.
Click to show internal directories.
Click to hide internal directories.