api

package
v2.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostAPI

type HostAPI interface {
	GetBIOSSerialNumber() (string, error)
	GetService(name string) (*ServiceInfo, error)
	StartService(name string) error
	StopService(name string, force bool) error
}

func New

func New() HostAPI

type ServiceFactory

type ServiceFactory interface {
	GetService(scope *wmi.Scope, name string) (wmi.ServiceInterface, error)
}

type ServiceInfo

type ServiceInfo struct {
	// Service display name
	DisplayName string `json:"DisplayName"`

	// Service start type
	StartType string `json:"StartType"`

	// Service status
	Status string `json:"Status"`
}

type ServiceManager

type ServiceManager interface {
	WaitUntilServiceState(scope *wmi.Scope, service wmi.ServiceInterface, stateTransition stateTransitionFunc, stateCheck stateCheckFunc, interval time.Duration, timeout time.Duration) (string, error)
	GetDependentsForService(scope *wmi.Scope, name string) ([]string, error)
}

type ServiceManagerImpl

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

func (ServiceManagerImpl) GetDependentsForService

func (impl ServiceManagerImpl) GetDependentsForService(scope *wmi.Scope, name string) ([]string, error)

func (ServiceManagerImpl) WaitUntilServiceState

func (impl ServiceManagerImpl) WaitUntilServiceState(scope *wmi.Scope, service wmi.ServiceInterface, stateTransition stateTransitionFunc, stateCheck stateCheckFunc, interval time.Duration, timeout time.Duration) (string, error)

Jump to

Keyboard shortcuts

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