Support sandboxed shims shutdown
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
@@ -37,6 +37,6 @@ type Controller interface {
|
||||
// Status will query sandbox process status. It is heavier than Ping call and must be used whenever you need to
|
||||
// gather metadata about current sandbox state (status, uptime, resource use, etc).
|
||||
Status(ctx context.Context, sandboxID string, verbose bool) (*sandbox.ControllerStatusResponse, error)
|
||||
// Delete deletes and cleans all tasks and sandbox instance.
|
||||
Delete(ctx context.Context, sandboxID string) (*sandbox.ControllerDeleteResponse, error)
|
||||
// Shutdown deletes and cleans all tasks and sandbox instance.
|
||||
Shutdown(ctx context.Context, sandboxID string) (*sandbox.ControllerShutdownResponse, error)
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@ func (s *remoteSandboxController) Stop(ctx context.Context, sandboxID string) (*
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *remoteSandboxController) Delete(ctx context.Context, sandboxID string) (*api.ControllerDeleteResponse, error) {
|
||||
resp, err := s.client.Delete(ctx, &api.ControllerDeleteRequest{SandboxID: sandboxID})
|
||||
func (s *remoteSandboxController) Shutdown(ctx context.Context, sandboxID string) (*api.ControllerShutdownResponse, error) {
|
||||
resp, err := s.client.Shutdown(ctx, &api.ControllerShutdownRequest{SandboxID: sandboxID})
|
||||
if err != nil {
|
||||
return nil, errdefs.FromGRPC(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user