MCPcopy Create free account
hub / github.com/coder/coder / recordedExecer

Struct recordedExecer

agent/x/agentdesktop/portabledesktop_internal_test.go:29–35  ·  view source on GitHub ↗

recordedExecer implements agentexec.Execer by recording every invocation and delegating to a real shell command built from a caller-supplied mapping of subcommand → shell script body.

Source from the content-addressed store, hash-verified

27// invocation and delegating to a real shell command built from a
28// caller-supplied mapping of subcommand → shell script body.
29type recordedExecer struct {
30 mu sync.Mutex
31 commands [][]string
32 // scripts maps a subcommand keyword (e.g. "up", "screenshot")
33 // to a shell snippet whose stdout will be the command output.
34 scripts map[string]string
35}
36
37func (r *recordedExecer) record(cmd string, args ...string) {
38 r.mu.Lock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected