Update sandbox protobuf to match CRI

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko
2022-07-28 17:56:04 -07:00
parent 8823224174
commit aa3303b697
10 changed files with 426 additions and 208 deletions

View File

@@ -45,13 +45,22 @@ func (s *sandboxRemoteController) Start(ctx context.Context, sandboxID string) (
return resp, nil
}
func (s *sandboxRemoteController) Shutdown(ctx context.Context, sandboxID string) error {
_, err := s.client.Shutdown(ctx, &api.ControllerShutdownRequest{SandboxID: sandboxID})
func (s *sandboxRemoteController) Stop(ctx context.Context, sandboxID string) (*api.ControllerStopResponse, error) {
resp, err := s.client.Stop(ctx, &api.ControllerStopRequest{SandboxID: sandboxID})
if err != nil {
return errdefs.FromGRPC(err)
return nil, errdefs.FromGRPC(err)
}
return nil
return resp, nil
}
func (s *sandboxRemoteController) Delete(ctx context.Context, sandboxID string) (*api.ControllerDeleteResponse, error) {
resp, err := s.client.Delete(ctx, &api.ControllerDeleteRequest{SandboxID: sandboxID})
if err != nil {
return nil, errdefs.FromGRPC(err)
}
return resp, nil
}
func (s *sandboxRemoteController) Wait(ctx context.Context, sandboxID string) (*api.ControllerWaitResponse, error) {