(ctx context.Context, sandboxID string)
| 265 | } |
| 266 | |
| 267 | func (c *controllerLocal) Wait(ctx context.Context, sandboxID string) (sandbox.ExitStatus, error) { |
| 268 | svc, err := c.getSandbox(ctx, sandboxID) |
| 269 | if err != nil { |
| 270 | return sandbox.ExitStatus{}, err |
| 271 | } |
| 272 | |
| 273 | resp, err := svc.WaitSandbox(ctx, &runtimeAPI.WaitSandboxRequest{ |
| 274 | SandboxID: sandboxID, |
| 275 | }) |
| 276 | |
| 277 | if err != nil { |
| 278 | return sandbox.ExitStatus{}, fmt.Errorf("failed to wait sandbox %s: %w", sandboxID, errgrpc.ToNative(err)) |
| 279 | } |
| 280 | |
| 281 | return sandbox.ExitStatus{ |
| 282 | ExitStatus: resp.GetExitStatus(), |
| 283 | ExitedAt: resp.GetExitedAt().AsTime(), |
| 284 | }, nil |
| 285 | } |
| 286 | |
| 287 | func (c *controllerLocal) Status(ctx context.Context, sandboxID string, verbose bool) (sandbox.ControllerStatus, error) { |
| 288 | svc, err := c.getSandbox(ctx, sandboxID) |
nothing calls this directly
no test coverage detected