(ctx context.Context, opt client.StopOptions)
| 279 | } |
| 280 | |
| 281 | func (s *proxyClient) Stop(ctx context.Context, opt client.StopOptions) error { |
| 282 | s.m.Lock() |
| 283 | defer s.m.Unlock() |
| 284 | |
| 285 | reader, writer := io.Pipe() |
| 286 | defer writer.Close() |
| 287 | go func() { |
| 288 | readLogStream(reader, s.log) |
| 289 | }() |
| 290 | |
| 291 | err := RunCommandWithBinaries( |
| 292 | ctx, |
| 293 | "stop", |
| 294 | s.config.Exec.Proxy.Stop, |
| 295 | s.workspace.Context, |
| 296 | s.workspace, |
| 297 | nil, |
| 298 | s.devPodConfig.ProviderOptions(s.config.Name), |
| 299 | s.config, |
| 300 | nil, |
| 301 | nil, |
| 302 | writer, |
| 303 | writer, |
| 304 | s.log, |
| 305 | ) |
| 306 | if err != nil { |
| 307 | return fmt.Errorf("error stopping container: %w", err) |
| 308 | } |
| 309 | |
| 310 | return nil |
| 311 | } |
| 312 | |
| 313 | func (s *proxyClient) Status(ctx context.Context, options client.StatusOptions) (client.Status, error) { |
| 314 | s.m.Lock() |
nothing calls this directly
no test coverage detected