winservice

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WinServiceMain = func(MainFunc, *ServiceDescription, *config.Config) (bool, error) { return false, nil }

WinServiceMain is only invoked on Windows. It detects when nexepad is running as a service and reacts accordingly.

Functions

This section is empty.

Types

type MainFunc

type MainFunc func(startedChan chan<- struct{}) error

MainFunc specifies the signature of an application's main function to be able to run as a windows service

type Service

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

Service houses the main service handler which handles all service updates and launching the application's main.

func (*Service) Execute

func (s *Service) Execute(args []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (bool, uint32)

Execute is the main entry point the winsvc package calls when receiving information from the Windows service control manager. It launches the long-running nexepadMain (which is the real meat of nexepad), handles service change requests, and notifies the service control manager of changes.

func (*Service) Start

func (s *Service) Start() error

Start starts the srevice

type ServiceDescription

type ServiceDescription struct {
	Name        string
	DisplayName string
	Description string
}

ServiceDescription contains information about a service, needed to administer it

Jump to

Keyboard shortcuts

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