Documentation ¶
Rendered for windows/amd64
Index ¶
Constants ¶
View Source
const ( PathRegKey = "Path" HWND_BROADCAST = uintptr(0xffff) WM_SETTINGCHANGE = uintptr(0x001A) )
consts to broadcast an environment variable change
Variables ¶
View Source
var ErrNotWindowsService = errors.New("process not started as Windows service")
ErrNotWindowsService indicates the process was not started as a windows service
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements svc.Service
type ServiceConfig ¶
type ServiceConfig struct { InstallPath string ExecName string Args []string LogDirName string Name string DisplayName string Description string DelayedAutoStart bool AutoRecovery bool AddToPath bool }
ServiceConfig holds information to create a Windows service
func (*ServiceConfig) Install ¶
func (s *ServiceConfig) Install(start bool) error
Install installs the service executable, creates the Windows service, and starts it
func (*ServiceConfig) Service ¶
func (s *ServiceConfig) Service(logger zerolog.Logger, main func() error, stop func() error) *Service
Service returns a new Service for use with svc.Run
func (*ServiceConfig) Uninstall ¶
func (s *ServiceConfig) Uninstall() error
Uninstall uninstalls the service
Click to show internal directories.
Click to hide internal directories.