MCPcopy
hub / github.com/caddyserver/caddy / Execute

Method Execute

service_windows.go:46–61  ·  view source on GitHub ↗
(args []string, request <-chan svc.ChangeRequest, status chan<- svc.Status)

Source from the content-addressed store, hash-verified

44type runner struct{}
45
46func (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}

Callers 4

buildHTTPServerFunction · 0.80
serveBrowseMethod · 0.80
MainFunction · 0.80

Calls 2

SetGlobalStatusFunction · 0.92
exitProcessFromSignalFunction · 0.85

Tested by

no test coverage detected