Documentation
¶
Index ¶
- Constants
- Variables
- func NewTiltfileLogWriter(mn model.ManifestName, s store.RStore, loadCount int) *tiltfileLogWriter
- func SpanIDForLoadCount(mn model.ManifestName, loadCount int) logstore.SpanID
- func ToFileWatchObjects(watchInputs WatchInputs) typedObjectSet
- func UpdateOwnedObjects(ctx context.Context, client ctrlclient.Client, tlr tiltfile.TiltfileLoadResult, ...) error
- type BuildEntry
- type BuildSource
- type ConfigsReloadStartedAction
- type ConfigsReloadedAction
- type Reconciler
- type WatchInputs
- type WatchableTarget
Constants ¶
View Source
const LabelOwnerKind = v1alpha1.LabelOwnerKind
View Source
const LabelOwnerKindTiltfile = v1alpha1.LabelOwnerKindTiltfile
Variables ¶
View Source
var ConfigsTargetID = model.TargetID{ Type: model.TargetTypeConfigs, Name: "singleton", }
View Source
var WireSet = wire.NewSet( NewReconciler, NewBuildSource, )
Functions ¶
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) typedObjectSet
FileWatchesFromManifests creates FileWatch specs from Tilt manifests in the engine state.
func UpdateOwnedObjects ¶
func UpdateOwnedObjects(ctx context.Context, client ctrlclient.Client, tlr tiltfile.TiltfileLoadResult, mode store.EngineMode) error
Update all the objects in the apiserver that are owned by the Tiltfile.
Here we have one big API object (the Tiltfile loader) create lots of API objects of different types. This is not a common pattern in Kubernetes-land (where often each type will only own one or two other types). But it's the best way to model how the Tiltfile works.
For that reason, this code is much more generic than owned-object creation should be.
In the future, anything that creates objects based on the Tiltfile (e.g., FileWatch specs, LocalServer specs) should go here.
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 EngineMode store.EngineMode LoadCount int }
func (*BuildEntry) WithLogger ¶ added in v0.22.4
type BuildSource ¶ added in v0.22.4
type BuildSource struct {
// contains filtered or unexported fields
}
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) Entry ¶ added in v0.22.4
func (s *BuildSource) Entry() *BuildEntry
func (*BuildSource) SetEntry ¶ added in v0.22.4
func (s *BuildSource) SetEntry(e *BuildEntry)
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 MetricsSettings model.MetricsSettings 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) *Reconciler
func (*Reconciler) CreateBuilder ¶
type WatchInputs ¶ added in v0.22.4
type WatchInputs struct { 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 }
Click to show internal directories.
Click to hide internal directories.