Update controller's start response to incldue pid and labels

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko
2022-07-28 16:57:36 -07:00
parent 3d028308ef
commit 8823224174
8 changed files with 270 additions and 187 deletions

View File

@@ -36,13 +36,13 @@ func NewSandboxRemoteController(client api.ControllerClient) sb.Controller {
return &sandboxRemoteController{client: client}
}
func (s *sandboxRemoteController) Start(ctx context.Context, sandboxID string) (uint32, error) {
func (s *sandboxRemoteController) Start(ctx context.Context, sandboxID string) (*api.ControllerStartResponse, error) {
resp, err := s.client.Start(ctx, &api.ControllerStartRequest{SandboxID: sandboxID})
if err != nil {
return 0, errdefs.FromGRPC(err)
return nil, errdefs.FromGRPC(err)
}
return resp.Pid, nil
return resp, nil
}
func (s *sandboxRemoteController) Shutdown(ctx context.Context, sandboxID string) error {