(ctx context.Context, sandboxID string)
| 247 | } |
| 248 | |
| 249 | func (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 | |
| 267 | func (c *controllerLocal) Wait(ctx context.Context, sandboxID string) (sandbox.ExitStatus, error) { |
| 268 | svc, err := c.getSandbox(ctx, sandboxID) |
nothing calls this directly
no test coverage detected