Documentation ¶
Overview ¶
Package winsvc implements service management functions for the Windows Job Supervisor.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mgr ¶
type Mgr struct {
// contains filtered or unexported fields
}
Mgr is used to manage Windows services.
func Connect ¶
Connect returns a new Mgr that will monitor all services with descriptions matched by match. If match is nil all services are matched.
func (*Mgr) Delete ¶
Delete deletes the services monitored by Mgr concurrently and waits for them to be removed by the Service Control Manager. Running services are stopped before being deleted.
func (*Mgr) DisableAgentAutoStart ¶
DisableAgentAutoStart sets the start type of the bosh-agent to disabled.
func (*Mgr) Disconnect ¶
Disconnect closes connection to the service control manager m.
func (*Mgr) Status ¶
func (m *Mgr) Status() ([]ServiceStatus, error)
Status returns the name and status for all of the services monitored.
type ServiceError ¶
ServiceError records an error and the operation and service that caused it.
func (*ServiceError) Error ¶
func (e *ServiceError) Error() string
type ServiceStatus ¶
A ServiceStatus is the status of a service.
func (*ServiceStatus) StateString ¶
func (s *ServiceStatus) StateString() string
StateString returns the string representation of the service state.
type TimeoutError ¶
TimeoutError records an error from a timeout, the timeout itself and the time that elapsed before the timeout was triggered.
func (*TimeoutError) Error ¶
func (e *TimeoutError) Error() string
type TransitionError ¶
type TransitionError struct { Msg string // error message Name string // service name Status svc.Status // service status WaitHint time.Duration // calculated WaitHint Duration time.Duration // time elapsed waiting for the transition }
TransitionError records an error that occurred waiting for a service to transition state and the service that caused it and it's state when the error occurred.
func (*TransitionError) Error ¶
func (e *TransitionError) Error() string