(ctx context.Context, options client.StopOptions)
| 147 | } |
| 148 | |
| 149 | func (s *machineClient) Stop(ctx context.Context, options client.StopOptions) error { |
| 150 | done := printStillRunningLogMessagePeriodically(s.log) |
| 151 | defer close(done) |
| 152 | |
| 153 | writer := s.log.Writer(logrus.InfoLevel, false) |
| 154 | defer writer.Close() |
| 155 | |
| 156 | s.log.Infof("Stopping machine '%s'...", s.machine.ID) |
| 157 | err := RunCommandWithBinaries( |
| 158 | ctx, |
| 159 | "stop", |
| 160 | s.config.Exec.Stop, |
| 161 | s.machine.Context, |
| 162 | nil, |
| 163 | s.machine, |
| 164 | s.devPodConfig.ProviderOptions(s.config.Name), |
| 165 | s.config, |
| 166 | nil, |
| 167 | nil, |
| 168 | writer, |
| 169 | writer, |
| 170 | s.log, |
| 171 | ) |
| 172 | if err != nil { |
| 173 | return err |
| 174 | } |
| 175 | s.log.Donef("Successfully stopped '%s'", s.machine.ID) |
| 176 | |
| 177 | return nil |
| 178 | } |
| 179 | |
| 180 | func (s *machineClient) Command(ctx context.Context, commandOptions client.CommandOptions) error { |
| 181 | return RunCommandWithBinaries( |
nothing calls this directly
no test coverage detected