Documentation
¶
Overview ¶
Package userservice runs gitd for the person signed in, under their system's own manager of user services: systemd's user instance on Linux, launchd on macOS. gitd then starts with their session and is restarted when it fails, with nothing to keep a terminal open for.
Index ¶
Constants ¶
const ( Name = "gitd" Label = "dev.gitd.gitd" )
Name is the service's name: gitd.service for systemd; launchd's label is Label.
Variables ¶
ErrUnavailable is a system with no manager of user services to reach: a container, a session without systemd's user instance, an SSH session on macOS with no GUI login.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
// Start installs the service to start with the user's session and starts it now,
// restarting it when what it runs changed.
Start(Service) error
// Stop stops the service and removes it, so that it no longer starts.
Stop() error
// Installed says whether Start installed the service.
Installed() bool
// Log says where the service's output is read.
Log() string
}
Manager starts gitd as a user service, and stops it.