package
0.0.0-20250312152250-ea85ec9d2454
Repository: https://github.com/snapcore/snapd.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
No description provided by the author
EnsureAtLeast checks whether the installed version of systemd is greater or equal than the given one.
EnsureMountUnitFileContent creates a mount unit file.
EscapeUnitNamePath works like systemd-escape --path FIXME: we could use github.com/coreos/go-systemd/unit/escape.go and EscapePath from it.
ExistingMountUnitPath finds the location of an existing mount unit.
HostFsTypeAndMountOptions returns filesystem type and options to actually mount the given fstype at runtime, i.e.
IsContainer returns true if the system is running in a container.
IsSystemdTooOld returns true if the error is a result of a failed check whether systemd version is at least what was asked for.
No description provided by the author
MockNewSystemd can be used to replace the constructor of the Systemd types with a function that returns a mock object.
MockStopDelays is used from tests so that Stop can be less forgiving there.
MockSystemctl allows to mock the systemctl invocations.
MockSystemctlWithDelay allows to mock the systemctl invocations.
MockSystemdSysctl lets mock and intercept calls to systemd-sysctl from the package.
No description provided by the author
MountUnitPath returns the path of a {,auto}mount unit.
New returns a Systemd that uses the default root directory and omits --root argument when executing systemctl.
NewEmulationMode returns a Systemd that runs in emulation mode where systemd is not really called, but instead its functions are emulated by other means.
NewJournalStreamFile creates log stream file descriptor to the journal.
NewUnderRoot returns a Systemd that operates on the given rootdir.
SdNotify sends the given state string notification to systemd.
SecurityTagToUnitName converts a security tag to a unit name.
Sysctl invokes systemd-sysctl to configure sysctl(8) kernel parameters from disk configuration.
UnitNameToSecurityTag converts a unit name to a security tag.
# Constants
BeforeDriversLoadMountUnit mounts things before kernel modules are loaded either by udevd or by systemd-modules-load.service.
EmulationModeBackend identifies the implementation backend emulating a subset of systemd against a filesystem.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
the target prerequisite for systemd units we generate.
RegularMountUnit is a mount with the usual dependencies.
RunningSystemdBackend identifies the implementation backend talking to the running system systemd daemon.
the default target for systemd units that we generate.
the default target for systemd socket units that we generate.
No description provided by the author
the default target for systemd timer units that we generate.
No description provided by the author
No description provided by the author
the target for systemd user session units that we generate.
# Variables
allow mocking the systemd version.
# Structs
EnsureMountUnitFlags contains flags that modify behavior of EnsureMountUnitFile TODO should we call directly EnsureMountUnitFileWithOptions and remove this type instead?.
Error is returned if the systemd action failed.
No description provided by the author
RunOptions can be passed to systemd.Run().
No description provided by the author
# Type aliases
Backend identifies the implementation backend in use by a Systemd instance.
InstanceMode determines which instance of systemd to control.
KeyringMode describes how the kernel keyring is setup, see systemd.exec(5).
A Log is a single entry in the systemd journal.
MountUnitType is an enum for the supported mount unit types.
No description provided by the author
No description provided by the author