upstart

package
v0.0.0-...-c60bc85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2017 License: LGPL-3.0 Imports: 12 Imported by: 0

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 Service

type Service struct {
	Name string
	Conf common.Conf
}

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 NewService

func NewService(name string, conf common.Conf) *Service

func (*Service) Exists

func (s *Service) Exists() bool

Exists returns whether the service configuration exists in the init directory with the same content that this Service would have if installed.

func (*Service) Install

func (s *Service) Install() error

Install installs and starts the service.

func (*Service) InstallCommands

func (s *Service) InstallCommands() ([]string, error)

InstallCommands returns shell commands to install and start the service.

func (*Service) Installed

func (s *Service) Installed() bool

Installed returns whether the service configuration exists in the init directory.

func (*Service) Remove

func (s *Service) Remove() error

Remove deletes the service configuration from the init directory.

func (*Service) Running

func (s *Service) Running() bool

Running returns true if the Service appears to be running.

func (*Service) Start

func (s *Service) Start() error

Start starts the service.

func (*Service) Stop

func (s *Service) Stop() error

Stop stops the service.

func (*Service) StopAndRemove

func (s *Service) StopAndRemove() error

StopAndRemove stops the service and then deletes the service configuration from the init directory.

func (*Service) UpdateConfig

func (s *Service) UpdateConfig(conf common.Conf)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL