Documentation ¶
Index ¶
- func Install(plist Plist, log logger.Logger) error
- func PlistDestination(label string) string
- func Restart(label string, log logger.Logger) error
- func ShowStatus(label string, log logger.Logger) error
- func Start(label string, log logger.Logger) error
- func Stop(label string, wait bool, log logger.Logger) error
- func Uninstall(label string, wait bool, log logger.Logger) error
- type Plist
- type Service
- func (s Service) HasPlist() bool
- func (s Service) Install(p Plist) (err error)
- func (s Service) Label() string
- func (s Service) LoadStatus() (*ServiceStatus, error)
- func (s *Service) SetLogger(log logger.Logger)
- func (s Service) Start() error
- func (s Service) StatusDescription() string
- func (s Service) Stop(wait bool) error
- func (s Service) Uninstall(wait bool) (err error)
- func (s Service) WaitForExit(wait time.Duration) error
- type ServiceStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PlistDestination ¶
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.