(ctx context.Context, sandboxID string, verbose bool)
| 173 | } |
| 174 | |
| 175 | func (s *remoteSandboxController) Status(ctx context.Context, sandboxID string, verbose bool) (sandbox.ControllerStatus, error) { |
| 176 | resp, err := s.client.Status(ctx, &api.ControllerStatusRequest{ |
| 177 | SandboxID: sandboxID, |
| 178 | Verbose: verbose, |
| 179 | Sandboxer: s.sandboxerName, |
| 180 | }) |
| 181 | if err != nil { |
| 182 | return sandbox.ControllerStatus{}, errgrpc.ToNative(err) |
| 183 | } |
| 184 | return sandbox.ControllerStatus{ |
| 185 | SandboxID: sandboxID, |
| 186 | Pid: resp.GetPid(), |
| 187 | State: resp.GetState(), |
| 188 | Info: resp.GetInfo(), |
| 189 | CreatedAt: resp.GetCreatedAt().AsTime(), |
| 190 | ExitedAt: resp.GetExitedAt().AsTime(), |
| 191 | Extra: resp.GetExtra(), |
| 192 | Address: resp.GetAddress(), |
| 193 | Version: resp.GetVersion(), |
| 194 | }, nil |
| 195 | } |
| 196 | |
| 197 | func (s *remoteSandboxController) Metrics(ctx context.Context, sandboxID string) (*types.Metric, error) { |
| 198 | resp, err := s.client.Metrics(ctx, &api.ControllerMetricsRequest{ |
nothing calls this directly
no test coverage detected