Documentation
¶
Index ¶
- Variables
- func NewService(i Interface, name string) (*systemd, error)
- func ServiceInstall(svcName, execPath, dispalyName, serviceStartName, pwd string, args ...string) error
- func ServiceProcessId(srcName string) (uint32, error)
- func ServiceStart(srcName string) error
- func ServiceStop(srcName string) error
- func ServiceUninstall(srcName string) error
- type Interface
- type Status
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNameFieldRequired is returned when Config.Name is empty. ErrNameFieldRequired = errors.New("缺失配置文件") // ErrNoServiceSystemDetected is returned when no system was detected. ErrNoServiceSystemDetected = errors.New("未检测到服务系统") // ErrNotInstalled is returned when the service is not installed. ErrNotInstalled = errors.New("服务未安装") ErrNotSuport = errors.New("服务不支持") )
Functions ¶
func NewService ¶
func ServiceInstall ¶
func ServiceProcessId ¶
func ServiceStart ¶
func ServiceStop ¶
func ServiceUninstall ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.