supervisor returns the session supervisor, creating it on first use.
()
| 28 | |
| 29 | // supervisor returns the session supervisor, creating it on first use. |
| 30 | func (a *procToolAdapter) supervisor() *proc.Supervisor { |
| 31 | a.cli.procSupOnce.Do(func() { |
| 32 | validator := agent.NewCommandValidator(a.cli.logger) |
| 33 | a.cli.procSup = proc.NewSupervisor(validator.ValidateCommand, a.cli.logger) |
| 34 | }) |
| 35 | return a.cli.procSup |
| 36 | } |
| 37 | |
| 38 | // Start implements plugins.ProcAdapter. |
| 39 | func (a *procToolAdapter) Start(command, dir string) (string, error) { |