Documentation ¶
Index ¶
- Variables
- type Service
- func (s *Service) Exists() bool
- func (s *Service) Install() error
- func (s *Service) InstallCommands() ([]string, error)
- func (s *Service) Installed() bool
- func (s *Service) Remove() error
- func (s *Service) Running() bool
- func (s *Service) Start() error
- func (s *Service) Stop() error
- func (s *Service) StopAndRemove() error
- func (s *Service) UpdateConfig(conf common.Conf)
Constants ¶
This section is empty.
Variables ¶
View Source
var InitDir = "/etc/init"
InitDir holds the default init directory name.
View Source
var InstallStartRetryAttempts = utils.AttemptStrategy{ Total: 1 * time.Second, Delay: 250 * time.Millisecond, }
Functions ¶
This section is empty.
Types ¶
type Service ¶
Service provides visibility into and control over an upstart service.
func MachineAgentUpstartService ¶
func MachineAgentUpstartService(name, toolsDir, dataDir, logDir, tag, machineId string, env map[string]string) *Service
MachineAgentUpstartService returns the upstart config for a machine agent based on the tag and machineId passed in.
func (*Service) Exists ¶
Exists returns whether the service configuration exists in the init directory with the same content that this Service would have if installed.
func (*Service) InstallCommands ¶
InstallCommands returns shell commands to install and start the service.
func (*Service) Installed ¶
Installed returns whether the service configuration exists in the init directory.
func (*Service) StopAndRemove ¶
StopAndRemove stops the service and then deletes the service configuration from the init directory.
func (*Service) UpdateConfig ¶
Click to show internal directories.
Click to hide internal directories.