win

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	SVC_EXEC      = ServiceRunnerCommand(0)
	SVC_START     = ServiceRunnerCommand(1)
	SVC_STOP      = ServiceRunnerCommand(2)
	SVC_INSTALL   = ServiceRunnerCommand(3)
	SVC_UNINSTALL = ServiceRunnerCommand(4)
	SVC_PAUSE     = ServiceRunnerCommand(5)
	SVC_CONTINUE  = ServiceRunnerCommand(6)
	SVC_DEBUG     = ServiceRunnerCommand(7)
)

Variables

View Source
var ErrNotRunningAsService = errors.New("not running as windows service")
View Source
var ErrUnknownCommand = errors.New("unknown command")

Functions

This section is empty.

Types

type IService

type IService interface {
	GetServiceName() string
	GetServiceDescription() string
	OnStart(elog debug.Log, args []string)
	OnStop()
	OnPause()
	OnContinue()
	OnInterrogate()
	OnShutdown()
}

type IServiceRunner

type IServiceRunner interface {
	Run(command ServiceRunnerCommand) error
}

func NewServiceRunner

func NewServiceRunner(svc IService) IServiceRunner

type ServiceRunner

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

func (*ServiceRunner) Execute

func (sr *ServiceRunner) Execute(args []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (ssec bool, errno uint32)

func (*ServiceRunner) Run

func (sr *ServiceRunner) Run(command ServiceRunnerCommand) error

Run implements IServiceRunner.

type ServiceRunnerCommand

type ServiceRunnerCommand uint

Jump to

Keyboard shortcuts

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