service

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitService

func InitService(serviceName string) error

InitService is the entry point for running the daemon as a Windows service. It returns an indication of whether it is running as a service; and an error.

func InitServiceWithShutdown added in v1.32.0

func InitServiceWithShutdown(serviceName string) error

InitService is the entry point for running the daemon as a Windows service which will accept preshutdown event. It returns an indication of whether it is running as a service; and an error.

func IsServiceInitialized added in v1.32.0

func IsServiceInitialized() bool

func SetPreShutdownHandler added in v1.32.0

func SetPreShutdownHandler(preshutdownhandler PreshutdownHandler)

func UpdatePreShutdownInfo added in v1.32.0

func UpdatePreShutdownInfo(h windows.Handle, timeoutMilliSeconds uint32) error

Types

type PreshutdownHandler added in v1.32.0

type PreshutdownHandler interface {
	ProcessShutdownEvent() error
}

type SERVICE_PRESHUTDOWN_INFO added in v1.32.0

type SERVICE_PRESHUTDOWN_INFO struct {
	PreshutdownTimeout uint32 // The time-out value, in milliseconds.
}

SERVICE_PRESHUTDOWN_INFO structure

func QueryPreShutdownInfo added in v1.32.0

func QueryPreShutdownInfo(h windows.Handle) (*SERVICE_PRESHUTDOWN_INFO, error)

Jump to

Keyboard shortcuts

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