kubernetesk8s.io/kubernetes/pkg/windows/service Index | Files

package service

import "k8s.io/kubernetes/pkg/windows/service"

Index

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

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

func IsServiceInitialized() bool

func SetPreShutdownHandler

func SetPreShutdownHandler(preshutdownhandler PreshutdownHandler)

func UpdatePreShutdownInfo

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

Types

type PreshutdownHandler

type PreshutdownHandler interface {
	ProcessShutdownEvent() error
}

type SERVICE_PRESHUTDOWN_INFO

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

SERVICE_PRESHUTDOWN_INFO structure

func QueryPreShutdownInfo

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

Source Files

service.go

Version
v1.32.6
Published
Jun 17, 2025
Platform
windows/amd64
Imports
8 packages
Last checked
1 minute ago

Tools for package owners.