Documentation
¶
Index ¶
- func GeneratePlist(cfg LaunchdConfig) string
- func GenerateSystemUnit(cfg SystemdConfig) string
- func GenerateUserUnit(cfg SystemdConfig) string
- func GetBinaryPath() (string, error)
- func GetLaunchdSystemInstructions(plistContent, plistPath string) string
- func GetLaunchdUserInstructions(plistPath, user string) string
- func GetSystemDaemonPath(user string) string
- func GetSystemUnitPath() string
- func GetSystemdSystemInstructions(unitContent string) string
- func GetSystemdUserInstructions(unitPath string) string
- func GetUserAgentPath(home, user string) (string, error)
- func GetUserUnitPath(home string) (string, error)
- func InstallUserAgent(plistContent, plistPath string) error
- func InstallUserUnit(unitContent string, home string) error
- func IsPlatformSupported() bool
- type LaunchdConfig
- type Platform
- type SystemdConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePlist ¶
func GeneratePlist(cfg LaunchdConfig) string
GeneratePlist generates a launchd property list (plist) file
func GenerateSystemUnit ¶
func GenerateSystemUnit(cfg SystemdConfig) string
GenerateSystemUnit generates a systemd system-level unit file
func GenerateUserUnit ¶
func GenerateUserUnit(cfg SystemdConfig) string
GenerateUserUnit generates a systemd user-level unit file
func GetBinaryPath ¶
GetBinaryPath attempts to locate the memorizer binary Tries in order: os.Executable(), ~/.local/bin, PATH
func GetLaunchdSystemInstructions ¶
GetLaunchdSystemInstructions returns formatted instructions for system-level launchd setup
func GetLaunchdUserInstructions ¶
GetLaunchdUserInstructions returns formatted instructions for user-level launchd setup
func GetSystemDaemonPath ¶
GetSystemDaemonPath returns the path for a system-level launchd daemon plist
func GetSystemUnitPath ¶
func GetSystemUnitPath() string
GetSystemUnitPath returns the path for a system-level systemd unit file
func GetSystemdSystemInstructions ¶
GetSystemdSystemInstructions returns formatted instructions for system-level systemd setup
func GetSystemdUserInstructions ¶
GetSystemdUserInstructions returns formatted instructions for user-level systemd setup
func GetUserAgentPath ¶
GetUserAgentPath returns the path for a user-level launchd agent plist
func GetUserUnitPath ¶
GetUserUnitPath returns the path for a user-level systemd unit file
func InstallUserAgent ¶
InstallUserAgent writes a user-level launchd agent plist file
func InstallUserUnit ¶
InstallUserUnit writes a user-level systemd unit file
func IsPlatformSupported ¶
func IsPlatformSupported() bool
IsPlatformSupported returns true if the current platform supports service manager integration
Types ¶
type LaunchdConfig ¶
LaunchdConfig holds configuration for generating launchd plist files