Documentation ¶
Index ¶
- type Service
- func (s *Service) GetServiceDetail() error
- func (s *Service) GetServiceDetailWithContext(ctx context.Context) error
- func (s *Service) QueryServiceConfig() (mgr.Config, error)
- func (s *Service) QueryServiceConfigWithContext(ctx context.Context) (mgr.Config, error)
- func (s *Service) QueryStatus() (ServiceStatus, error)
- func (s *Service) QueryStatusWithContext(ctx context.Context) (ServiceStatus, error)
- type ServiceStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { Name string Config mgr.Config Status ServiceStatus // contains filtered or unexported fields }
Service represent a windows service.
func ListServices ¶
ListServices return all windows service reference to golang.org/x/sys/windows/svc/mgr#ListServices()
func NewService ¶
NewService create and return a windows Service
func (*Service) GetServiceDetail ¶
GetServiceDetail get a windows service by name
func (*Service) GetServiceDetailWithContext ¶
GetServiceDetailWithContext get a windows service by name
func (*Service) QueryServiceConfig ¶
QueryServiceConfig return the specified service config
func (*Service) QueryServiceConfigWithContext ¶
QueryServiceConfigWithContext call QueryServiceConfig() and QueryServiceConfig2() implement windows https://msdn.microsoft.com/en-us/library/windows/desktop/ms684932(v=vs.85).aspx
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