Documentation
¶
Overview ¶
Package supervisor owns the two PID-1 responsibilities of weft-init: (1) reaping every orphaned child the kernel reparents to us, and (2) supervising the user-declared containers — start, watch, restart per policy, stop cleanly.
Splitting them matters: the reaper must run unconditionally even for processes we never started (containerd-style runtimes fork helpers we don't track), whereas the supervisor only watches the PIDs it knows about.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reaped ¶
type Reaped struct {
PID int
Status syscall.WaitStatus
Rusage syscall.Rusage
}
Reaped is one zombie collection event.
type Reaper ¶
type Reaper struct {
// contains filtered or unexported fields
}
Reaper consumes SIGCHLD and Wait4()'s every child the kernel hands us. Exits the goroutine cleanly when ctx is cancelled.
Reaped child PIDs and their status are published on the returned channel so the per-container Supervisor can correlate exits to containers it cares about. The channel is closed when the reaper exits.
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
Supervisor drives the lifecycle of one Pod's containers via an OCI runtime. It does NOT prepare the bundles (rootfs unpacking and config.json generation live in the bundler package); it receives ready-to-run bundle directories and a runtime client.