Documentation
¶
Index ¶
- Variables
- func HandleConfigsReloadStarted(ctx context.Context, state *store.EngineState, ...)
- func HandleConfigsReloaded(ctx context.Context, state *store.EngineState, event ConfigsReloadedAction)
- func NewTiltfileLogWriter(mn model.ManifestName, s store.RStore, loadCount int) *tiltfileLogWriter
- func SpanIDForLoadCount(mn model.ManifestName, loadCount int) logstore.SpanID
- func ToFileWatchObjects(watchInputs WatchInputs, disableSources map[string]*v1alpha1.DisableSource) apiset.TypedObjectSet
- type BuildEntry
- type BuildSource
- type ConfigsReloadStartedAction
- type ConfigsReloadedAction
- type Reconciler
- type WatchInputs
- type WatchableTarget
Constants ¶
This section is empty.
Variables ¶
var WireSet = wire.NewSet( NewReconciler, NewBuildSource, )
Functions ¶
func HandleConfigsReloadStarted ¶ added in v0.22.6
func HandleConfigsReloadStarted( ctx context.Context, state *store.EngineState, event ConfigsReloadStartedAction, )
func HandleConfigsReloaded ¶ added in v0.22.6
func HandleConfigsReloaded( ctx context.Context, state *store.EngineState, event ConfigsReloadedAction, )
In the original Tilt architecture, the Tiltfile contained the whole engine state. Reloading the tiltfile re-created that state from scratch.
We've moved towards a more modular architecture, but many of the tilt data models aren't modular. For example, if two Tiltfiles set UpdateSettings, it's not clear which one "wins" or how their preferences combine.
In the long-term, Tiltfile settings should only take affect in objects created by that Tiltfile. (e.g., WatchSettings only affects FileWatches created by that Tiltfile.)
In the medium-term, we resolve this in the EngineState in three different ways:
- If a data structure supports merging (like the Manifest map), do a merge.
- If merging fails (like if two Tiltfiles define the same Manifest), log an Error and try to do something resonable.
- If a data structure does not support merging (like UpdateSettings), only accept that data structure from the "main" tiltfile.
func NewTiltfileLogWriter ¶ added in v0.22.4
func NewTiltfileLogWriter(mn model.ManifestName, s store.RStore, loadCount int) *tiltfileLogWriter
func SpanIDForLoadCount ¶ added in v0.22.4
func SpanIDForLoadCount(mn model.ManifestName, loadCount int) logstore.SpanID
func ToFileWatchObjects ¶ added in v0.22.4
func ToFileWatchObjects(watchInputs WatchInputs, disableSources map[string]*v1alpha1.DisableSource) apiset.TypedObjectSet
FileWatchesFromManifests creates FileWatch specs from Tilt manifests in the engine state.
Types ¶
type BuildEntry ¶ added in v0.22.4
type BuildEntry struct { Name model.ManifestName FilesChanged []string BuildReason model.BuildReason UserConfigState model.UserConfigState TiltfilePath string CheckpointAtExecStart logstore.Checkpoint LoadCount int }
BuildEntry is vestigial, but currently used to help manage state about a tiltfile build.
func (*BuildEntry) WithLogger ¶ added in v0.22.4
type BuildSource ¶ added in v0.22.4
type BuildSource struct {
// contains filtered or unexported fields
}
BuildSource is vestigial, but currently used to help re-run the reconciler.
func NewBuildSource ¶ added in v0.22.4
func NewBuildSource() *BuildSource
func (*BuildSource) Add ¶ added in v0.22.4
func (s *BuildSource) Add(nn types.NamespacedName)
func (*BuildSource) Start ¶ added in v0.22.4
func (s *BuildSource) Start(ctx context.Context, handler handler.EventHandler, q workqueue.RateLimitingInterface, ps ...predicate.Predicate) error
type ConfigsReloadStartedAction ¶ added in v0.22.4
type ConfigsReloadStartedAction struct { Name model.ManifestName FilesChanged []string StartTime time.Time SpanID logstore.SpanID Reason model.BuildReason }
func (ConfigsReloadStartedAction) Action ¶ added in v0.22.4
func (ConfigsReloadStartedAction) Action()
type ConfigsReloadedAction ¶ added in v0.22.4
type ConfigsReloadedAction struct { Name model.ManifestName // TODO(nick): Embed TiltfileLoadResult instead of copying fields. Manifests []model.Manifest Tiltignore model.Dockerignore ConfigFiles []string FinishTime time.Time Err error Warnings []string Features map[string]bool TeamID string TelemetrySettings model.TelemetrySettings Secrets model.SecretSet DockerPruneSettings model.DockerPruneSettings AnalyticsTiltfileOpt analytics.Opt VersionSettings model.VersionSettings UpdateSettings model.UpdateSettings WatchSettings model.WatchSettings // A checkpoint into the logstore when Tiltfile execution started. // Useful for knowing how far back in time we have to scrub secrets. CheckpointAtExecStart logstore.Checkpoint }
func (ConfigsReloadedAction) Action ¶ added in v0.22.4
func (ConfigsReloadedAction) Action()
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
func NewReconciler ¶
func NewReconciler(st store.RStore, tfl tiltfile.TiltfileLoader, dockerClient docker.Client, ctrlClient ctrlclient.Client, scheme *runtime.Scheme, buildSource *BuildSource, engineMode store.EngineMode) *Reconciler
func (*Reconciler) CreateBuilder ¶
type WatchInputs ¶ added in v0.22.4
type WatchInputs struct { TiltfileManifestName model.ManifestName TiltfilePath string Manifests []model.Manifest ConfigFiles []string WatchSettings model.WatchSettings Tiltignore model.Dockerignore EngineMode store.EngineMode }
type WatchableTarget ¶ added in v0.22.4
type WatchableTarget interface { ignore.IgnorableTarget Dependencies() []string ID() model.TargetID }