(ctx context.Context, options client.StartOptions)
| 116 | } |
| 117 | |
| 118 | func (s *machineClient) Start(ctx context.Context, options client.StartOptions) error { |
| 119 | done := printStillRunningLogMessagePeriodically(s.log) |
| 120 | defer close(done) |
| 121 | |
| 122 | writer := s.log.Writer(logrus.InfoLevel, false) |
| 123 | defer writer.Close() |
| 124 | |
| 125 | s.log.Infof("Starting machine '%s'...", s.machine.ID) |
| 126 | err := RunCommandWithBinaries( |
| 127 | ctx, |
| 128 | "start", |
| 129 | s.config.Exec.Start, |
| 130 | s.machine.Context, |
| 131 | nil, |
| 132 | s.machine, |
| 133 | s.devPodConfig.ProviderOptions(s.config.Name), |
| 134 | s.config, |
| 135 | nil, |
| 136 | nil, |
| 137 | writer, |
| 138 | writer, |
| 139 | s.log, |
| 140 | ) |
| 141 | if err != nil { |
| 142 | return err |
| 143 | } |
| 144 | s.log.Donef("Successfully started '%s'", s.machine.ID) |
| 145 | |
| 146 | return nil |
| 147 | } |
| 148 | |
| 149 | func (s *machineClient) Stop(ctx context.Context, options client.StopOptions) error { |
| 150 | done := printStillRunningLogMessagePeriodically(s.log) |
nothing calls this directly
no test coverage detected