Documentation
¶
Overview ¶
Package hostprotect writes the OOM protection drop-in for the control plane unit. install.sh writes the same file; a test keeps the two from drifting.
Index ¶
Constants ¶
View Source
const EnvOptOut = "LEVELRAIL_PROTECT"
EnvOptOut set to 0 skips the drop-in, matching install.sh.
View Source
const Marker = "# Written by install.sh (levelrail host protection)."
Marker is the first line of the drop-in. A file without it was edited by hand and is never replaced.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Host ¶
type Host struct {
Service string
UnitDir string
SystemdRun string
Geteuid func() int
Getenv func(string) string
Reload func(context.Context) error
}
Host holds the paths and hooks Apply needs, so tests can point it at a temp tree.
func DefaultHost ¶
DefaultHost targets the real host for one service name.
Click to show internal directories.
Click to hide internal directories.