Documentation ¶
Index ¶
- Constants
- Variables
- type Init
- func (init *Init) AddDependentService(serviceName string, depName string) error
- func (init *Init) Disable(serviceName string) error
- func (init *Init) Enable(serviceName string) error
- func (init *Init) GetInitSystemType() int
- func (init *Init) RemoveDependentService(serviceName string, depName string) error
- func (init *Init) Restart(serviceName string) error
- func (init *Init) RestartEx(serviceName string, successStopRegex string, successStartRegex string) error
- func (init *Init) Start(serviceName string) error
- func (init *Init) StartEx(serviceName string, successRegex string) error
- func (init *Init) Status(serviceName string) (bool, error)
- func (init *Init) StatusEx(serviceName string, successRegex string) (bool, error)
- func (init *Init) Stop(serviceName string) error
- func (init *Init) StopEx(serviceName string, successRegex string) error
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 (*Init) AddDependentService ¶
AddDependentService to the service
func (*Init) GetInitSystemType ¶
GetInitSystemType returns the Init type on the Operating System
func (*Init) RemoveDependentService ¶
RemoveDependentService to the service
func (*Init) RestartEx ¶
func (init *Init) RestartEx(serviceName string, successStopRegex string, successStartRegex string) error
RestartEx the service
Click to show internal directories.
Click to hide internal directories.