MCPcopy Index your code
hub / github.com/containerd/containerd / Shutdown

Method Shutdown

plugins/sandbox/controller.go:249–265  ·  view source on GitHub ↗
(ctx context.Context, sandboxID string)

Source from the content-addressed store, hash-verified

247}
248
249func (c *controllerLocal) Shutdown(ctx context.Context, sandboxID string) error {
250 svc, err := c.getSandbox(ctx, sandboxID)
251 if err != nil {
252 return err
253 }
254
255 _, err = svc.ShutdownSandbox(ctx, &runtimeAPI.ShutdownSandboxRequest{SandboxID: sandboxID})
256 if err != nil {
257 return fmt.Errorf("failed to shutdown sandbox: %w", errgrpc.ToNative(err))
258 }
259
260 if err := c.shims.Delete(ctx, sandboxID); err != nil {
261 return fmt.Errorf("failed to delete sandbox shim: %w", err)
262 }
263
264 return nil
265}
266
267func (c *controllerLocal) Wait(ctx context.Context, sandboxID string) (sandbox.ExitStatus, error) {
268 svc, err := c.getSandbox(ctx, sandboxID)

Callers

nothing calls this directly

Calls 3

getSandboxMethod · 0.95
ShutdownSandboxMethod · 0.65
DeleteMethod · 0.65

Tested by

no test coverage detected