svc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ENV_WORKING_DIRECTORY = "SVC_WORKING_DIRECTORY"

Variables

View Source
var ControlActions = [7]string{"install", "uninstall", "start", "stop", "restart", "status", "run"}
View Source
var ControlLabels = [7]string{"安装", "卸载", "启动", "停止", "重启", "状态", "运行"}

Functions

This section is empty.

Types

type Service

type Service struct {
	Name             string
	DisplayName      string
	Description      string
	UserName         string
	Arguments        []string
	Executable       string
	Dependencies     []string
	WorkingDirectory string
	EnvVars          map[string]string
	Option           map[string]any
	ChRoot           string
	Run              func()
}

func New

func New() *Service

func (*Service) Control

func (s *Service) Control(command string) (msg string, err error)

func (*Service) Status

func (s *Service) Status() (status service.Status, err error)

Jump to

Keyboard shortcuts

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