Version: v2.20.6+incompatible Latest Latest

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

Go to latest
Published: Jun 30, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0


Rendered for windows/amd64



This section is empty.


This section is empty.


This section is empty.


type Service

type Service struct {
	Name   string
	Config mgr.Config
	Status ServiceStatus
	// contains filtered or unexported fields

Service represent a windows service.

func ListServices

func ListServices() ([]Service, error)

ListServices return all windows service reference to

func NewService

func NewService(name string) (*Service, error)

NewService create and return a windows Service

func (*Service) GetServiceDetail

func (s *Service) GetServiceDetail() error

GetServiceDetail get a windows service by name

func (*Service) GetServiceDetailWithContext

func (s *Service) GetServiceDetailWithContext(ctx context.Context) error

GetServiceDetailWithContext get a windows service by name

func (*Service) QueryServiceConfig

func (s *Service) QueryServiceConfig() (mgr.Config, error)

QueryServiceConfig return the specified service config

func (*Service) QueryServiceConfigWithContext

func (s *Service) QueryServiceConfigWithContext(ctx context.Context) (mgr.Config, error)

QueryServiceConfigWithContext call QueryServiceConfig() and QueryServiceConfig2() implement windows

func (*Service) QueryStatus

func (s *Service) QueryStatus() (ServiceStatus, error)

QueryStatus return the specified name service currentState and ControlsAccepted

func (*Service) QueryStatusWithContext

func (s *Service) QueryStatusWithContext(ctx context.Context) (ServiceStatus, error)

QueryStatusWithContext return the specified name service currentState and ControlsAccepted

type ServiceStatus

type ServiceStatus struct {
	State         svc.State
	Accepts       svc.Accepted
	Pid           uint32
	Win32ExitCode uint32

ServiceStatus combines State and Accepted commands to fully describe running service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL