(args []string, request <-chan svc.ChangeRequest, status chan<- svc.Status)
| 44 | type runner struct{} |
| 45 | |
| 46 | func (runner) Execute(args []string, request <-chan svc.ChangeRequest, status chan<- svc.Status) (bool, uint32) { |
| 47 | notify.SetGlobalStatus(status) |
| 48 | status <- svc.Status{State: svc.StartPending} |
| 49 | |
| 50 | for { |
| 51 | req := <-request |
| 52 | switch req.Cmd { |
| 53 | case svc.Interrogate: |
| 54 | status <- req.CurrentStatus |
| 55 | case svc.Stop, svc.Shutdown: |
| 56 | status <- svc.Status{State: svc.StopPending} |
| 57 | exitProcessFromSignal("SIGINT") |
| 58 | return false, 0 |
| 59 | } |
| 60 | } |
| 61 | } |
no test coverage detected