Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetByName ¶
GetByName returns a mgr.Sevive given a service name returned mgr.Service object has to be closed to release resources.
Types ¶
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper implements the svc.Handler interface, and wraps an executable allowing it to run as a service
func NewWrapper ¶
NewWrapper returns a Wrapper
func (*Wrapper) Execute ¶
func (w *Wrapper) Execute(args []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (ssec bool, errno uint32)
Execute will be called by the package code at the start of the service, and the service will exit once Execute completes. Inside Execute you must read service change requests from r and act accordingly. You must keep service control manager up to date about state of your service by writing into s as required. args contains service name followed by argument strings passed to the service. You can provide service exit code in exitCode return parameter, with 0 being "no error". You can also indicate if exit code, if any, is service specific or not by using svcSpecificEC parameter.
func (Wrapper) GetCommand ¶
GetCommand returns a slice of command+args