init

package
v0.0.0-...-8ac10f7 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	//InitUnknown type is Unknown
	InitUnknown = 0

	//InitSystemD is SystemD
	InitSystemD = 1

	//InitUpdateRcD is UpdateRC
	InitUpdateRcD = 2

	//InitChkConfig is InitD
	InitChkConfig = 3
)

Variables

View Source
var (
	//ErrInvalidInitSystem the Init System is not valid
	ErrInvalidInitSystem = errors.New("Invalid Init System")
)

Functions

This section is empty.

Types

type Init

type Init struct {
	// contains filtered or unexported fields
}

Init is a static class that captures install package rules

func NewInit

func NewInit() *Init

NewInit generates a Init object

func (*Init) AddDependentService

func (init *Init) AddDependentService(serviceName string, depName string) error

AddDependentService to the service

func (*Init) Disable

func (init *Init) Disable(serviceName string) error

Disable the service

func (*Init) Enable

func (init *Init) Enable(serviceName string) error

Enable the service

func (*Init) GetInitSystemType

func (init *Init) GetInitSystemType() int

GetInitSystemType returns the Init type on the Operating System

func (*Init) RemoveDependentService

func (init *Init) RemoveDependentService(serviceName string, depName string) error

RemoveDependentService to the service

func (*Init) Restart

func (init *Init) Restart(serviceName string) error

Restart the service

func (*Init) RestartEx

func (init *Init) RestartEx(serviceName string, successStopRegex string, successStartRegex string) error

RestartEx the service

func (*Init) Start

func (init *Init) Start(serviceName string) error

Start is the package installed

func (*Init) StartEx

func (init *Init) StartEx(serviceName string, successRegex string) error

StartEx is the package installed

func (*Init) Status

func (init *Init) Status(serviceName string) (bool, error)

Status of the service

func (*Init) StatusEx

func (init *Init) StatusEx(serviceName string, successRegex string) (bool, error)

StatusEx of the service

func (*Init) Stop

func (init *Init) Stop(serviceName string) error

Stop the service

func (*Init) StopEx

func (init *Init) StopEx(serviceName string, successRegex string) error

StopEx the service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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