Documentation
¶
Overview ¶
Package systemd implements socket activation, notifications and user units.
Index ¶
- Constants
- Variables
- func CheckUnitPath(field, path string) error
- func Listeners() (map[string]net.Listener, error)
- func NixProfileBins(home, stateHome, user string) []string
- func Notify(state string) error
- func RenderUnits(d UnitData) (service, socket []byte, err error)
- func StableBinary(exe string, profileBins []string) (string, error)
- type UnitData
Constants ¶
const NixStoreDir = "/nix/store"
NixStoreDir is the directory whose contents can vanish after an upgrade.
Variables ¶
var ErrStoreBinary = errors.New("binary is in the Nix store")
ErrStoreBinary reports an executable in the Nix store that no Nix profile links to.
Functions ¶
func CheckUnitPath ¶
CheckUnitPath reports whether path may be written into a unit file (the rule RenderUnits already applies); field names the path in the error.
func Listeners ¶
Listeners consumes systemd's named descriptors and clears the activation environment. A process that was not socket-activated gets nil, nil.
func NixProfileBins ¶
NixProfileBins returns the P§6 profile bin directories in order. Empty home, stateHome or user drop the entries that need them.
func RenderUnits ¶
RenderUnits renders the architecture's user units. Callers install both files with mode 0644, including when their process umask is 0077.