NewRunner creates a new Runner with the provided codersdk.Client and configuration.
(coderClient *codersdk.Client, cfg Config)
| 55 | |
| 56 | // NewRunner creates a new Runner with the provided codersdk.Client and configuration. |
| 57 | func NewRunner(coderClient *codersdk.Client, cfg Config) *Runner { |
| 58 | return &Runner{ |
| 59 | client: newClient(coderClient), |
| 60 | updater: newAppStatusUpdater(coderClient), |
| 61 | cfg: cfg, |
| 62 | clock: quartz.NewReal(), |
| 63 | randFloat64: rand.Float64, |
| 64 | reportTimes: make(map[int]time.Time), |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | func (r *Runner) Run(ctx context.Context, name string, logs io.Writer) error { |
| 69 | shouldMarkConnectedDone := true |
no test coverage detected