winservice

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WinService

type WinService struct {
	UseEventLog bool   // Does the Windows service want events recorded to the application event log?
	Start       func() // Pointer to function that framework will call to start the service
	Stop        func() // Pointer to function that framework will call to stop the service
}

WinService is a structure that the Windows client service must initialize prior to calling our winservice member functions.

func (WinService) ControlService

func (winService WinService) ControlService(name string, c svc.Cmd, to svc.State) error

ControlService is called to control the Windows service

func (*WinService) Execute

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

Execute is the thread executing the service and receiving control events

func (WinService) InstallService

func (winService WinService) InstallService(name, displayName string, description string) error

InstallService is used to install the service

func (WinService) InstallServiceWithOptions

func (winService WinService) InstallServiceWithOptions(name string, config mgr.Config, recoveryActions []mgr.RecoveryAction, resetPeriod uint32) error

InstallServiceWithOptions is used to install the service with the provided configuration and recovery options.

func (WinService) RemoveService

func (winService WinService) RemoveService(name string) error

RemoveService is used to uninstall the service

func (WinService) RunService

func (winService WinService) RunService(name string, isDebug bool)

RunService is called to run the Windows service

func (WinService) StartService

func (winService WinService) StartService(name string) error

StartService is called to start the Windows service

Jump to

Keyboard shortcuts

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