selectBackend picks the backend implied by the current flags.
(agentFileName string)
| 47 | |
| 48 | // selectBackend picks the backend implied by the current flags. |
| 49 | func (f *runExecFlags) selectBackend(agentFileName string) (backend, error) { |
| 50 | if f.remoteAddress != "" { |
| 51 | return &remoteBackend{flags: f, agentFileName: agentFileName}, nil |
| 52 | } |
| 53 | agentSource, err := config.Resolve(agentFileName, f.runConfig.EnvProvider()) |
| 54 | if err != nil { |
| 55 | return nil, err |
| 56 | } |
| 57 | return &localBackend{flags: f, agentSource: agentSource}, nil |
| 58 | } |
| 59 | |
| 60 | // localBackend builds the in-process runtime and session. |
| 61 | // |
no test coverage detected