MCPcopy Index your code
hub / github.com/coder/coder / ExecAs

Method ExecAs

agent/agentcontainers/containers.go:19–19  ·  view source on GitHub ↗

ExecAs executes a command in a container as a specific user.

(ctx context.Context, containerName, user string, args ...string)

Source from the content-addressed store, hash-verified

17 Copy(ctx context.Context, containerName, src, dst string) error
18 // ExecAs executes a command in a container as a specific user.
19 ExecAs(ctx context.Context, containerName, user string, args ...string) ([]byte, error)
20 // Stop terminates the container
21 Stop(ctx context.Context, containerName string) error
22 // Remove removes the container

Callers 4

TestIntegrationDockerCLIFunction · 0.65
expectSubAgentInjectionFunction · 0.65
TestAPIFunction · 0.65

Implementers 6

fakeContainerCLIcli/open_test.go
dockerCLIagent/agentcontainers/containers_docke
fakeContainerCLIagent/agentcontainers/api_test.go
noopContainerCLIagent/agentcontainers/containers.go
MockContainerCLIagent/agentcontainers/acmock/acmock.go
MockContainerCLIMockRecorderagent/agentcontainers/acmock/acmock.go

Calls

no outgoing calls

Tested by 3

TestIntegrationDockerCLIFunction · 0.52
expectSubAgentInjectionFunction · 0.52
TestAPIFunction · 0.52