service

package
v0.0.0-...-f19ae85 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2015 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListServices

func ListServices(initDir string) ([]string, error)

ListServices lists all installed services on the running system

Types

type Service

type Service interface {
	// Installed will return a boolean value that denotes
	// whether or not the service is installed
	Installed() bool
	// Exists returns whether the service configuration exists in the
	// init directory with the same content that this Service would have
	// if installed.
	Exists() bool
	// Running returns a boolean value that denotes
	// whether or not the service is running
	Running() bool
	// Start will try to start the service
	Start() error
	// Stop will try to stop the service
	Stop() error
	// StopAndRemove will stop the service and remove it
	StopAndRemove() error
	// Remove will remove the service
	Remove() error
	// Install installs a service
	Install() error
	// Config adds a config to the service, overwritting the current one
	UpdateConfig(conf common.Conf)
}

Service represents a service running on the current system

func NewService

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

NewService returns an interface to a service apropriate for the current system

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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