MCPcopy Index your code
hub / github.com/coder/coder / setupPrebuilds

Method setupPrebuilds

enterprise/coderd/coderd.go:1381–1404  ·  view source on GitHub ↗

nolint:revive // featureEnabled is a legit control flag.

(featureEnabled bool)

Source from the content-addressed store, hash-verified

1379
1380// nolint:revive // featureEnabled is a legit control flag.
1381func (api *API) setupPrebuilds(featureEnabled bool) (agplprebuilds.ReconciliationOrchestrator, agplprebuilds.Claimer) {
1382 if !featureEnabled {
1383 api.Logger.Warn(context.Background(), "prebuilds not enabled; ensure you have a premium license",
1384 slog.F("feature_enabled", featureEnabled))
1385
1386 return agplprebuilds.DefaultReconciler, agplprebuilds.DefaultClaimer
1387 }
1388
1389 reconciler := prebuilds.NewStoreReconciler(
1390 api.Database,
1391 api.Pubsub,
1392 api.AGPL.FileCache,
1393 api.DeploymentValues.Prebuilds,
1394 api.Logger.Named("prebuilds"),
1395 quartz.NewReal(),
1396 api.PrometheusRegistry,
1397 api.NotificationsEnqueuer,
1398 api.AGPL.BuildUsageChecker,
1399 api.TracerProvider,
1400 int(api.DeploymentValues.PostgresConnMaxOpen.Value()),
1401 api.AGPL.WorkspaceBuilderMetrics,
1402 )
1403 return reconciler, prebuilds.NewEnterpriseClaimer()
1404}

Callers 1

updateEntitlementsMethod · 0.95

Calls 4

NewStoreReconcilerFunction · 0.92
NewEnterpriseClaimerFunction · 0.92
NamedMethod · 0.80
ValueMethod · 0.45

Tested by

no test coverage detected