Stop terminates the current agent process and stops the loop.
()
| 498 | |
| 499 | // Stop terminates the current agent process and stops the loop. |
| 500 | func (l *Loop) Stop() { |
| 501 | l.mu.Lock() |
| 502 | defer l.mu.Unlock() |
| 503 | |
| 504 | l.stopped = true |
| 505 | |
| 506 | if l.agentCmd != nil && l.agentCmd.Process != nil { |
| 507 | l.agentCmd.Process.Kill() |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | // Pause sets the pause flag. The loop will stop after the current iteration completes. |
| 512 | func (l *Loop) Pause() { |
no outgoing calls