Executor automatically starts or stops workspaces.
| 36 | |
| 37 | // Executor automatically starts or stops workspaces. |
| 38 | type Executor struct { |
| 39 | ctx context.Context |
| 40 | db database.Store |
| 41 | ps pubsub.Pubsub |
| 42 | fileCache *files.Cache |
| 43 | templateScheduleStore *atomic.Pointer[schedule.TemplateScheduleStore] |
| 44 | accessControlStore *atomic.Pointer[dbauthz.AccessControlStore] |
| 45 | auditor *atomic.Pointer[audit.Auditor] |
| 46 | buildUsageChecker *atomic.Pointer[wsbuilder.UsageChecker] |
| 47 | log slog.Logger |
| 48 | tick <-chan time.Time |
| 49 | statsCh chan<- Stats |
| 50 | // NotificationsEnqueuer handles enqueueing notifications for delivery by SMTP, webhook, etc. |
| 51 | notificationsEnqueuer notifications.Enqueuer |
| 52 | reg prometheus.Registerer |
| 53 | experiments codersdk.Experiments |
| 54 | workspaceBuilderMetrics *wsbuilder.Metrics |
| 55 | |
| 56 | metrics executorMetrics |
| 57 | } |
| 58 | |
| 59 | type executorMetrics struct { |
| 60 | autobuildExecutionDuration prometheus.Histogram |
nothing calls this directly
no outgoing calls
no test coverage detected