Documentation
¶
Index ¶
- func EnsureComponent(ctx context.Context, db *gorm.DB, helpers *componenthelpers.Helpers, ...) error
- func EnsureComponentDependencies(ctx context.Context, db *gorm.DB, helpers *componenthelpers.Helpers, ...) error
- func SyncComponent(ctx context.Context, params SyncComponentParams) error
- type SyncComponentParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureComponent ¶
func EnsureComponent(ctx context.Context, db *gorm.DB, helpers *componenthelpers.Helpers, comp *config.Component, appID string, state *sync.State) error
EnsureComponent creates a component if it doesn't exist, using the shared helpers for full initialization (queue creation, dependencies, install components).
func EnsureComponentDependencies ¶ added in v0.19.1012
func EnsureComponentDependencies(ctx context.Context, db *gorm.DB, helpers *componenthelpers.Helpers, comp *config.Component, appID string) error
EnsureComponentDependencies resolves and sets dependencies for a component. This must be called after all components have been created (via EnsureComponent) so that dependency names can be resolved to IDs.
func SyncComponent ¶
func SyncComponent(ctx context.Context, params SyncComponentParams) error
SyncComponent updates a component and creates its configuration via the shared builders in internal/pkg/config/build, which the per-type Create*ComponentConfig handlers also use.
Types ¶
type SyncComponentParams ¶ added in v0.19.1102
type SyncComponentParams struct {
DB *gorm.DB
Helpers *componenthelpers.Helpers
VCSHelper *vcshelpers.Helpers
TFClient terraform.Client
Component *config.Component
AppID string
AppConfigID string
State *sync.State
// DispatchBuilds reuses unchanged config connections and records changed
// components in State.Result.ComponentsScheduled for the caller to enqueue
// build signals for (the signal packages would import-cycle from here).
// Leave off when a later step schedules builds (branch run's builds step).
DispatchBuilds bool
}
SyncComponentParams carries the dependencies and target of a single component sync.
Click to show internal directories.
Click to hide internal directories.