Documentation
¶
Overview ¶
Package daemon holds the background agent's plumbing: a single-instance lock and OS service integration (launchd on macOS, systemd on Linux).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRunning = errors.New("daemon already running")
ErrRunning means another daemon already holds the lock.
View Source
var ErrUnsupported = errors.New("automatic start isn't supported on this OS yet — run `sme daemon` yourself")
ErrUnsupported is returned on platforms without service integration yet.
Functions ¶
Types ¶
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
Lock is held for the daemon's lifetime; the OS releases it if we crash.
type Service ¶
type Service struct {
OS string // darwin | linux
Exe string // absolute path to the sme binary
Home string // SYNCMYENV_HOME
LogPath string
Path string // where the unit/plist file goes
}
Service describes how the daemon is installed on this machine.
func NewService ¶
NewService resolves paths for the current OS and binary.
Click to show internal directories.
Click to hide internal directories.