Documentation ¶
Index ¶
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 Conf ¶
type Conf struct { Service // Desc is the upstart service's description. Desc string // Env holds the environment variables that will be set when the command runs. Env map[string]string // Limit holds the ulimit values that will be set when the command runs. Limit map[string]string // Cmd is the command (with arguments) that will be run. // The command will be restarted if it exits with a non-zero exit code. Cmd string // Out, if set, will redirect output to that path. Out string }
Conf is responsible for defining and installing upstart services. Its fields represent elements of an upstart service configuration file.
func MachineAgentUpstartService ¶
func MachineAgentUpstartService(name, toolsDir, dataDir, logDir, tag, machineId string, env map[string]string) *Conf
MachineAgentUpstartService returns the upstart config for a machine agent based on the tag and machineId passed in.
func (*Conf) InstallCommands ¶
InstallCommands returns shell commands to install and start the service.
type Service ¶
Service provides visibility into and control over an upstart service.
func NewService ¶
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.
Click to show internal directories.
Click to hide internal directories.