Documentation ¶
Index ¶
- func Install(plist Plist, writer io.Writer) (err error)
- func PlistDestination(label string) string
- func Restart(label string, writer io.Writer) error
- func ShowServices(filters []string, name string, out io.Writer) (err error)
- func ShowStatus(label string, writer io.Writer) error
- func Start(label string, writer io.Writer) error
- func Stop(label string, writer io.Writer) error
- func Uninstall(label string, writer io.Writer) error
- type Plist
- type Service
- func (s Service) Install(p Plist) (err error)
- func (s Service) Label() string
- func (s Service) Load(restart bool) error
- func (s Service) LoadStatus() (*ServiceStatus, error)
- func (s *Service) SetWriter(writer io.Writer)
- func (s Service) StatusDescription() string
- func (s Service) Uninstall() (err error)
- func (s Service) Unload() error
- type ServiceStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PlistDestination ¶
func ShowServices ¶
ShowServices outputs keybase service info.
func ShowStatus ¶
ShowStatus shows status info for a service
Types ¶
type Plist ¶
type Plist struct {
// contains filtered or unexported fields
}
Plist defines a launchd plist
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service defines a service
func ListServices ¶
ListServices will return service with label that starts with a filter string.
func (Service) LoadStatus ¶
func (s Service) LoadStatus() (*ServiceStatus, error)
Status returns service status
func (Service) StatusDescription ¶
StatusDescription returns the service status description
type ServiceStatus ¶
type ServiceStatus struct {
// contains filtered or unexported fields
}
ServiceStatus defines status for a service
func (ServiceStatus) Description ¶
func (s ServiceStatus) Description() string
Description returns service status info
func (ServiceStatus) IsRunning ¶
func (s ServiceStatus) IsRunning() bool
IsRunning is true if the service is running (with a pid)
func (ServiceStatus) LastExitStatus ¶
func (s ServiceStatus) LastExitStatus() string
LastExitStatus will be blank if pid > 0, or a number "123"
func (ServiceStatus) Pid ¶
func (s ServiceStatus) Pid() string
Pid for status (empty string if not running)
Click to show internal directories.
Click to hide internal directories.