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

Method Stop

agent/agentcontainers/api_test.go:83–96  ·  view source on GitHub ↗
(ctx context.Context, name string)

Source from the content-addressed store, hash-verified

81}
82
83func (f *fakeContainerCLI) Stop(ctx context.Context, name string) error {
84 f.mu.Lock()
85 defer f.mu.Unlock()
86
87 f.containers.Devcontainers = slice.Filter(f.containers.Devcontainers, func(dc codersdk.WorkspaceAgentDevcontainer) bool {
88 return dc.Container.ID == name
89 })
90 for i, container := range f.containers.Containers {
91 container.Running = false
92 f.containers.Containers[i] = container
93 }
94
95 return f.stopErr
96}
97
98func (f *fakeContainerCLI) Remove(ctx context.Context, name string) error {
99 f.mu.Lock()

Callers

nothing calls this directly

Calls 3

FilterFunction · 0.92
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected