Documentation ¶
Index ¶
- Constants
- func ChangesInvalidateBuild(old, new Manifest) bool
- func DeepEqual(x, y interface{}) bool
- func FacetsToProto(facets []Facet) []*webview.Facet
- func ImageTargetsByID(iTargets []ImageTarget) map[TargetID]ImageTarget
- func LocalRefSelectorsForManifests(manifests []Manifest) []container.RefSelector
- func MakeTargetMap(targets []TargetSpec) map[TargetID]TargetSpec
- func NewRelativeFileOrChildMatcher(baseDir string, paths ...string) fileOrChildMatcher
- func NewSimpleFileMatcher(paths ...string) (fileMatcher, error)
- func TargetIDSet(tids []TargetID) map[TargetID]bool
- func UnrecognizedWebModeError(v string) error
- type BuildDetails
- type BuildReason
- type BuildRecord
- type BuildType
- type Cmd
- type CompositePathMatcher
- type CustomBuild
- type DockerBuild
- type DockerBuildArgs
- type DockerBuildTarget
- type DockerComposeTarget
- func (t DockerComposeTarget) Dependencies() []string
- func (t DockerComposeTarget) DependencyIDs() []TargetID
- func (t DockerComposeTarget) Dockerignores() []Dockerignore
- func (t DockerComposeTarget) Empty() bool
- func (t DockerComposeTarget) ID() TargetID
- func (t DockerComposeTarget) IgnoredLocalDirectories() []string
- func (t DockerComposeTarget) LocalPaths() []string
- func (t DockerComposeTarget) LocalRepos() []LocalGitRepo
- func (t DockerComposeTarget) ManifestName() ManifestName
- func (t DockerComposeTarget) PublishedPorts() []int
- func (t DockerComposeTarget) TiltFilename() string
- func (dc DockerComposeTarget) Validate() error
- func (t DockerComposeTarget) WithBuildPath(buildPath string) DockerComposeTarget
- func (t DockerComposeTarget) WithDependencyIDs(ids []TargetID) DockerComposeTarget
- func (t DockerComposeTarget) WithDockerignores(dockerignores []Dockerignore) DockerComposeTarget
- func (t DockerComposeTarget) WithIgnoredLocalDirectories(dirs []string) DockerComposeTarget
- func (t DockerComposeTarget) WithPublishedPorts(ports []int) DockerComposeTarget
- func (t DockerComposeTarget) WithRepos(repos []LocalGitRepo) DockerComposeTarget
- func (t DockerComposeTarget) WithTiltFilename(f string) DockerComposeTarget
- type DockerPruneSettings
- type Dockerignore
- type Facet
- type ImageTarget
- func (i ImageTarget) CachePaths() []string
- func (i ImageTarget) CustomBuildInfo() CustomBuild
- func (i ImageTarget) Dependencies() []string
- func (i ImageTarget) DependencyIDs() []TargetID
- func (i ImageTarget) DockerBuildInfo() DockerBuild
- func (i ImageTarget) Dockerignores() []Dockerignore
- func (i ImageTarget) HasDistinctClusterRef() bool
- func (i ImageTarget) ID() TargetID
- func (i ImageTarget) IgnoredLocalDirectories() []string
- func (i ImageTarget) IsCustomBuild() bool
- func (i ImageTarget) IsDockerBuild() bool
- func (i ImageTarget) LiveUpdateInfo() LiveUpdate
- func (i ImageTarget) LocalPaths() []string
- func (i ImageTarget) LocalRepos() []LocalGitRepo
- func (i ImageTarget) TiltFilename() string
- func (i ImageTarget) Validate() error
- func (i ImageTarget) WithBuildDetails(details BuildDetails) ImageTarget
- func (i ImageTarget) WithCachePaths(paths []string) ImageTarget
- func (i ImageTarget) WithDependencyIDs(ids []TargetID) ImageTarget
- func (i ImageTarget) WithDockerignores(dockerignores []Dockerignore) ImageTarget
- func (i ImageTarget) WithOverrideCommand(cmd Cmd) ImageTarget
- func (i ImageTarget) WithRepos(repos []LocalGitRepo) ImageTarget
- func (i ImageTarget) WithTiltFilename(f string) ImageTarget
- type K8sTarget
- func (k8s K8sTarget) DependencyIDs() []TargetID
- func (k8s K8sTarget) Empty() bool
- func (k8s K8sTarget) HasJob() bool
- func (k8s K8sTarget) ID() TargetID
- func (k8s K8sTarget) RefInjectCounts() map[string]int
- func (k8s K8sTarget) Validate() error
- func (k8s K8sTarget) WithDependencyIDs(ids []TargetID) K8sTarget
- func (k8s K8sTarget) WithRefInjectCounts(ric map[string]int) K8sTarget
- type LabelPair
- type LiveUpdate
- type LiveUpdateFallBackOnStep
- type LiveUpdateRestartContainerStep
- type LiveUpdateRunStep
- type LiveUpdateStep
- type LiveUpdateSyncStep
- type LocalGitRepo
- type LocalTarget
- func (lt LocalTarget) Dependencies() []string
- func (lt LocalTarget) DependencyIDs() []TargetID
- func (lt LocalTarget) Dockerignores() []Dockerignore
- func (lt LocalTarget) Empty() bool
- func (lt LocalTarget) ID() TargetID
- func (lt LocalTarget) IgnoredLocalDirectories() []string
- func (lt LocalTarget) LocalRepos() []LocalGitRepo
- func (lt LocalTarget) Validate() error
- func (lt LocalTarget) WithIgnores(ignores []Dockerignore) LocalTarget
- func (lt LocalTarget) WithRepos(repos []LocalGitRepo) LocalTarget
- type Log
- type LogEvent
- type LogSpanID
- type Manifest
- func (m Manifest) DependencyIDs() []TargetID
- func (m Manifest) DeployTarget() TargetSpec
- func (m Manifest) DockerComposeTarget() DockerComposeTarget
- func (m Manifest) Empty() bool
- func (m1 Manifest) Equal(m2 Manifest) bool
- func (m Manifest) ID() TargetID
- func (m Manifest) ImageTargetAt(i int) ImageTarget
- func (m Manifest) IsDC() bool
- func (m Manifest) IsImageDeployed(iTarget ImageTarget) bool
- func (m Manifest) IsK8s() bool
- func (m Manifest) IsLocal() bool
- func (m Manifest) K8sTarget() K8sTarget
- func (m Manifest) LocalPaths() []string
- func (m Manifest) LocalTarget() LocalTarget
- func (m Manifest) ManifestName() ManifestName
- func (m Manifest) NonWorkloadManifest() bool
- func (m Manifest) TargetIDSet() map[TargetID]bool
- func (m Manifest) TargetSpecs() []TargetSpec
- func (m Manifest) Validate() error
- func (m Manifest) WithDeployTarget(t TargetSpec) Manifest
- func (m Manifest) WithImageTarget(iTarget ImageTarget) Manifest
- func (m Manifest) WithImageTargets(iTargets []ImageTarget) Manifest
- func (m Manifest) WithTriggerMode(mode TriggerMode) Manifest
- type ManifestName
- type NoBrowser
- type Orchestrator
- type OverrideArgs
- type PathMatcher
- type PathSet
- type PortForward
- type Run
- type RuntimeStatus
- type Secret
- type SecretSet
- type SecretSettings
- type Sync
- type Target
- type TargetGraph
- func (g TargetGraph) DeployedImages() []ImageTarget
- func (g TargetGraph) DepsOf(t TargetSpec) ([]TargetSpec, error)
- func (g TargetGraph) Images() []ImageTarget
- func (g TargetGraph) IsDeployedImage(iTarget ImageTarget) bool
- func (g TargetGraph) IsSingleSourceDAG() bool
- func (g TargetGraph) VisitTree(root TargetSpec, visit func(dep TargetSpec) error) error
- type TargetID
- type TargetName
- type TargetSpec
- type TargetStatus
- type TargetType
- type TelemetrySettings
- type TelemetryStatus
- type TiltBuild
- type TriggerMode
- type UpdateSettings
- type UserConfigState
- type VersionSettings
- type WebDevPort
- type WebHost
- type WebMode
- type WebPort
- type WebSHA
- type WebURL
- type WebVersion
Constants ¶
const ( DefaultMaxParallelUpdates = 3 DefaultK8sUpsertTimeout = 30 * time.Second )
const BuildHistoryLimit = 2
const BuildReasonNone = BuildReason(0)
const DockerPruneDefaultInterval = time.Hour
How often to prune Docker images while Tilt is running
const DockerPruneDefaultKeepRecent = 2
Keep the last 2 builds of an image
const DockerPruneDefaultMaxAge = time.Hour * 6
Prune Docker objects older than this
const OrchestratorDC = Orchestrator("DockerCompose")
const OrchestratorK8s = Orchestrator("Kubernetes")
const OrchestratorUnknown = Orchestrator("")
const TiltfileManifestName = ManifestName("(Tiltfile)")
const UnresourcedYAMLManifestName = ManifestName("uncategorized")
TODO(maia): throw an error if you try to name a manifest this in your Tiltfile?
Variables ¶
This section is empty.
Functions ¶
func ChangesInvalidateBuild ¶
ChangesInvalidateBuild checks whether the changes from old => new manifest invalidate our build of the old one; i.e. if we're replacing `old` with `new`, should we perform a full rebuild?
func FacetsToProto ¶ added in v0.10.16
func ImageTargetsByID ¶
func ImageTargetsByID(iTargets []ImageTarget) map[TargetID]ImageTarget
func LocalRefSelectorsForManifests ¶ added in v0.14.0
func LocalRefSelectorsForManifests(manifests []Manifest) []container.RefSelector
func MakeTargetMap ¶
func MakeTargetMap(targets []TargetSpec) map[TargetID]TargetSpec
Map all the targets by their target ID.
func NewRelativeFileOrChildMatcher ¶
NewRelativeFileOrChildMatcher returns a matcher for the given paths (with any relative paths converted to absolute, relative to the given baseDir).
func NewSimpleFileMatcher ¶
NewSimpleFileMatcher returns a matcher for the given paths; any relative paths are converted to absolute (relative to cwd).
func TargetIDSet ¶
Types ¶
type BuildDetails ¶
type BuildDetails interface {
// contains filtered or unexported methods
}
type BuildReason ¶
type BuildReason int
const ( BuildReasonFlagChangedFiles BuildReason = 1 << iota BuildReasonFlagConfig // See comments on NeedsRebuildFromCrash BuildReasonFlagCrash BuildReasonFlagInit BuildReasonFlagTriggerWeb BuildReasonFlagTriggerCLI BuildReasonFlagTriggerUnknown // An external process called `tilt args` BuildReasonFlagTiltfileArgs // Suppose you have // manifestA with imageA depending on imageCommon // manifestB with imageB depending on imageCommon // // Building manifestA will mark imageB // with changed dependencies. BuildReasonFlagChangedDep )
func (BuildReason) Has ¶
func (r BuildReason) Has(flag BuildReason) bool
func (BuildReason) HasTrigger ¶ added in v0.14.0
func (r BuildReason) HasTrigger() bool
func (BuildReason) IsCrashOnly ¶
func (r BuildReason) IsCrashOnly() bool
func (BuildReason) String ¶ added in v0.10.16
func (r BuildReason) String() string
func (BuildReason) With ¶
func (r BuildReason) With(flag BuildReason) BuildReason
type BuildRecord ¶
type BuildRecord struct { Edits []string Error error StartTime time.Time FinishTime time.Time // IsZero() == true for in-progress builds Reason BuildReason BuildTypes []BuildType // The lookup key for the logs in the logstore. SpanID LogSpanID // We count the warnings by looking up all the logs with Level=WARNING // in the logstore. We store this number separately for ease of use. WarningCount int }
func (BuildRecord) Duration ¶
func (bs BuildRecord) Duration() time.Duration
func (BuildRecord) Empty ¶
func (bs BuildRecord) Empty() bool
func (BuildRecord) HasBuildType ¶ added in v0.10.14
func (r BuildRecord) HasBuildType(bt BuildType) bool
type BuildType ¶ added in v0.10.14
type BuildType string
const BuildTypeDockerCompose BuildType = "docker-compose"
const BuildTypeImage BuildType = "image"
const BuildTypeK8s BuildType = "k8s"
const BuildTypeLiveUpdate BuildType = "live-update"
const BuildTypeLocal BuildType = "local"
type Cmd ¶
type Cmd struct {
Argv []string
}
func ToBatCmd ¶ added in v0.14.0
🦇🦇🦇 Named in honor of Bazel https://docs.bazel.build/versions/master/be/general.html#genrule.cmd_bat
func ToUnixCmds ¶ added in v0.14.0
func (Cmd) EntrypointStr ¶
func (Cmd) IsShellStandardForm ¶
func (Cmd) IsWindowsStandardForm ¶ added in v0.14.0
func (Cmd) ShellStandardScript ¶
Get the script when the shell is in standard form. Panics if the command is not in shell standard form.
type CompositePathMatcher ¶
type CompositePathMatcher struct {
Matchers []PathMatcher
}
func (CompositePathMatcher) MatchesEntireDir ¶
func (c CompositePathMatcher) MatchesEntireDir(f string) (bool, error)
type CustomBuild ¶
type CustomBuild struct { WorkDir string Command Cmd // Deps is a list of file paths that are dependencies of this command. Deps []string // Optional: tag we expect the image to be built with (we use this to check that // the expected image+tag has been created). // If empty, we create an expected tag at the beginning of CustomBuild (and // export $EXPECTED_REF=name:expected_tag ) Tag string LiveUpdate LiveUpdate // Optionally, can use LiveUpdate to update this build in place. DisablePush bool SkipsLocalDocker bool }
func (CustomBuild) SkipsPush ¶ added in v0.10.22
func (cb CustomBuild) SkipsPush() bool
func (CustomBuild) WithTag ¶
func (cb CustomBuild) WithTag(t string) CustomBuild
type DockerBuild ¶
type DockerBuild struct { Dockerfile string BuildPath string // the absolute path to the files BuildArgs DockerBuildArgs LiveUpdate LiveUpdate // Optionally, can use LiveUpdate to update this build in place. TargetStage DockerBuildTarget // Pass SSH secrets to docker so it can clone private repos. // https://docs.docker.com/develop/develop-images/build_enhancements/#using-ssh-to-access-private-data-in-builds SSHSpecs []string // Pass secrets to docker // https://docs.docker.com/develop/develop-images/build_enhancements/#new-docker-build-secret-information SecretSpecs []string Network string // By default, Tilt creates a new temporary image reference for each build. // The user can also specify their own reference, to integrate with other tooling // (like build IDs for Jenkins build pipelines) // // Equivalent to the docker build --tag flag. // Named 'tag' for consistency with how it's used throughout the docker API, // even though this is really more like a reference.NamedTagged ExtraTags []string }
type DockerBuildArgs ¶
type DockerBuildTarget ¶ added in v0.10.8
type DockerBuildTarget string
func (DockerBuildTarget) String ¶ added in v0.10.8
func (s DockerBuildTarget) String() string
type DockerComposeTarget ¶
type DockerComposeTarget struct { Name TargetName ConfigPaths []string YAMLRaw []byte // for diff'ing when config files change DfRaw []byte // for diff'ing when config files change // contains filtered or unexported fields }
func ExtractDockerComposeTargets ¶
func ExtractDockerComposeTargets(specs []TargetSpec) []DockerComposeTarget
func (DockerComposeTarget) Dependencies ¶
func (t DockerComposeTarget) Dependencies() []string
TODO(nick): This method should be deleted. We should just de-dupe and sort LocalPaths once when we create it, rather than have a duplicate method that does the "right" thing.
func (DockerComposeTarget) DependencyIDs ¶
func (t DockerComposeTarget) DependencyIDs() []TargetID
func (DockerComposeTarget) Dockerignores ¶
func (t DockerComposeTarget) Dockerignores() []Dockerignore
func (DockerComposeTarget) Empty ¶
func (t DockerComposeTarget) Empty() bool
func (DockerComposeTarget) ID ¶
func (t DockerComposeTarget) ID() TargetID
func (DockerComposeTarget) IgnoredLocalDirectories ¶
func (t DockerComposeTarget) IgnoredLocalDirectories() []string
func (DockerComposeTarget) LocalPaths ¶
func (t DockerComposeTarget) LocalPaths() []string
func (DockerComposeTarget) LocalRepos ¶
func (t DockerComposeTarget) LocalRepos() []LocalGitRepo
func (DockerComposeTarget) ManifestName ¶
func (t DockerComposeTarget) ManifestName() ManifestName
TODO(nick): This is a temporary hack until we figure out how we want to pass these IDs to the docker-compose UX.
func (DockerComposeTarget) PublishedPorts ¶
func (t DockerComposeTarget) PublishedPorts() []int
func (DockerComposeTarget) TiltFilename ¶
func (t DockerComposeTarget) TiltFilename() string
func (DockerComposeTarget) Validate ¶
func (dc DockerComposeTarget) Validate() error
func (DockerComposeTarget) WithBuildPath ¶
func (t DockerComposeTarget) WithBuildPath(buildPath string) DockerComposeTarget
func (DockerComposeTarget) WithDependencyIDs ¶
func (t DockerComposeTarget) WithDependencyIDs(ids []TargetID) DockerComposeTarget
func (DockerComposeTarget) WithDockerignores ¶
func (t DockerComposeTarget) WithDockerignores(dockerignores []Dockerignore) DockerComposeTarget
func (DockerComposeTarget) WithIgnoredLocalDirectories ¶
func (t DockerComposeTarget) WithIgnoredLocalDirectories(dirs []string) DockerComposeTarget
func (DockerComposeTarget) WithPublishedPorts ¶
func (t DockerComposeTarget) WithPublishedPorts(ports []int) DockerComposeTarget
func (DockerComposeTarget) WithRepos ¶
func (t DockerComposeTarget) WithRepos(repos []LocalGitRepo) DockerComposeTarget
func (DockerComposeTarget) WithTiltFilename ¶
func (t DockerComposeTarget) WithTiltFilename(f string) DockerComposeTarget
type DockerPruneSettings ¶ added in v0.10.14
type DockerPruneSettings struct { Enabled bool MaxAge time.Duration // "prune Docker objects older than X" NumBuilds int // "prune every Y builds" (takes precedence over "prune every Z hours") Interval time.Duration // "prune every Z hours" KeepRecent int // Keep the most recent N builds of a tag. }
func DefaultDockerPruneSettings ¶ added in v0.10.14
func DefaultDockerPruneSettings() DockerPruneSettings
type Dockerignore ¶
type Facet ¶ added in v0.10.16
type ImageTarget ¶
type ImageTarget struct { Refs container.RefSet BuildDetails BuildDetails MatchInEnvVars bool // User-supplied command to run when the container runs // (i.e. overrides k8s yaml "command", container ENTRYPOINT, etc.) OverrideCmd Cmd // User-supplied args override when the container runs. // (i.e. overrides k8s yaml "args") OverrideArgs OverrideArgs // contains filtered or unexported fields }
func ExtractImageTargets ¶
func ExtractImageTargets(specs []TargetSpec) []ImageTarget
func MustNewImageTarget ¶ added in v0.14.0
func MustNewImageTarget(ref container.RefSelector) ImageTarget
func (ImageTarget) CachePaths ¶
func (i ImageTarget) CachePaths() []string
func (ImageTarget) CustomBuildInfo ¶
func (i ImageTarget) CustomBuildInfo() CustomBuild
func (ImageTarget) Dependencies ¶
func (i ImageTarget) Dependencies() []string
TODO(nick): This method should be deleted. We should just de-dupe and sort LocalPaths once when we create it, rather than have a duplicate method that does the "right" thing.
func (ImageTarget) DependencyIDs ¶
func (i ImageTarget) DependencyIDs() []TargetID
func (ImageTarget) DockerBuildInfo ¶
func (i ImageTarget) DockerBuildInfo() DockerBuild
func (ImageTarget) Dockerignores ¶
func (i ImageTarget) Dockerignores() []Dockerignore
func (ImageTarget) HasDistinctClusterRef ¶ added in v0.14.0
func (i ImageTarget) HasDistinctClusterRef() bool
HasDistinctClusterRef indicates whether the image target has a ClusterRef distinct from LocalRef, i.e. if the image is addressed different from inside and outside the cluster.
func (ImageTarget) ID ¶
func (i ImageTarget) ID() TargetID
func (ImageTarget) IgnoredLocalDirectories ¶
func (i ImageTarget) IgnoredLocalDirectories() []string
func (ImageTarget) IsCustomBuild ¶
func (i ImageTarget) IsCustomBuild() bool
func (ImageTarget) IsDockerBuild ¶
func (i ImageTarget) IsDockerBuild() bool
func (ImageTarget) LiveUpdateInfo ¶ added in v0.10.24
func (i ImageTarget) LiveUpdateInfo() LiveUpdate
func (ImageTarget) LocalPaths ¶
func (i ImageTarget) LocalPaths() []string
func (ImageTarget) LocalRepos ¶
func (i ImageTarget) LocalRepos() []LocalGitRepo
func (ImageTarget) TiltFilename ¶
func (i ImageTarget) TiltFilename() string
func (ImageTarget) Validate ¶
func (i ImageTarget) Validate() error
func (ImageTarget) WithBuildDetails ¶
func (i ImageTarget) WithBuildDetails(details BuildDetails) ImageTarget
func (ImageTarget) WithCachePaths ¶
func (i ImageTarget) WithCachePaths(paths []string) ImageTarget
func (ImageTarget) WithDependencyIDs ¶
func (i ImageTarget) WithDependencyIDs(ids []TargetID) ImageTarget
func (ImageTarget) WithDockerignores ¶
func (i ImageTarget) WithDockerignores(dockerignores []Dockerignore) ImageTarget
func (ImageTarget) WithOverrideCommand ¶
func (i ImageTarget) WithOverrideCommand(cmd Cmd) ImageTarget
func (ImageTarget) WithRepos ¶
func (i ImageTarget) WithRepos(repos []LocalGitRepo) ImageTarget
func (ImageTarget) WithTiltFilename ¶
func (i ImageTarget) WithTiltFilename(f string) ImageTarget
type K8sTarget ¶
type K8sTarget struct { Name TargetName YAML string PortForwards []PortForward // labels for pods that we should watch and associate with this resource ExtraPodSelectors []labels.Selector // Each K8s entity should have a display name for user interfaces // that balances brevity and uniqueness DisplayNames []string // Store the name, namespace, and type in a structured form // for easy access. This should duplicate what's specified in the YAML. ObjectRefs []v1.ObjectReference // NonWorkload indicates whether or not a given K8sTarget was // determined to have workloads at assembly time during Tiltfile execution NonWorkload bool // contains filtered or unexported fields }
func ExtractK8sTargets ¶
func ExtractK8sTargets(specs []TargetSpec) []K8sTarget
func (K8sTarget) DependencyIDs ¶
func (K8sTarget) RefInjectCounts ¶
func (K8sTarget) WithDependencyIDs ¶
type LabelPair ¶
func ToLabelPairs ¶
type LiveUpdate ¶
type LiveUpdate struct { Steps []LiveUpdateStep BaseDir string // directory where the LiveUpdate was initialized (we'll use this to eval. any relative paths) }
Specifies how to update a running container.
- If any paths specified in a FallBackOn step have changed, fall back to an image build (i.e. don't do a LiveUpdate)
- If there are Sync steps in `Steps`, files will be synced as specified.
- Any time we sync one or more files, all Run and RestartContainer steps will be evaluated.
func NewLiveUpdate ¶
func NewLiveUpdate(steps []LiveUpdateStep, baseDir string) (LiveUpdate, error)
func (LiveUpdate) Empty ¶
func (lu LiveUpdate) Empty() bool
func (LiveUpdate) FallBackOnFiles ¶
func (lu LiveUpdate) FallBackOnFiles() PathSet
FallBackOnFiles returns a PathSet of files which, if any have changed, indicate that we should fall back to an image build.
func (LiveUpdate) RunSteps ¶
func (lu LiveUpdate) RunSteps() []Run
func (LiveUpdate) ShouldRestart ¶
func (lu LiveUpdate) ShouldRestart() bool
func (LiveUpdate) SyncSteps ¶
func (lu LiveUpdate) SyncSteps() []Sync
type LiveUpdateFallBackOnStep ¶
type LiveUpdateFallBackOnStep struct {
Files []string
}
Specifies that changes to any of the given files should cause the builder to fall back (i.e. do a full image build)
type LiveUpdateRestartContainerStep ¶
type LiveUpdateRestartContainerStep struct{}
Specifies that the container should be restarted when any files in `Sync` steps have changed.
type LiveUpdateRunStep ¶
Specifies that `Command` should be executed when any files in `Sync` steps have changed If `Trigger` is non-empty, `Command` will only be executed when the local paths of changed files covered by at least one `Sync` match one of `PathSet.Paths` (evaluated relative to `PathSet.BaseDirectory`.
type LiveUpdateStep ¶
type LiveUpdateStep interface {
// contains filtered or unexported methods
}
type LiveUpdateSyncStep ¶
type LiveUpdateSyncStep struct {
Source, Dest string
}
Specifies that changes to local path `Source` should be synced to container path `Dest`
type LocalGitRepo ¶
type LocalGitRepo struct {
LocalPath string
}
func (LocalGitRepo) IsRepo ¶
func (LocalGitRepo) IsRepo()
type LocalTarget ¶ added in v0.10.8
type LocalTarget struct { Name TargetName UpdateCmd Cmd // e.g. `make proto` ServeCmd Cmd // e.g. `python main.py` Workdir string // directory from which the commands should be run // contains filtered or unexported fields }
func NewLocalTarget ¶ added in v0.10.8
func NewLocalTarget(name TargetName, updateCmd Cmd, serveCmd Cmd, deps []string, workdir string) LocalTarget
func (LocalTarget) Dependencies ¶ added in v0.10.8
func (lt LocalTarget) Dependencies() []string
Implements: engine.WatchableManifest
func (LocalTarget) DependencyIDs ¶ added in v0.10.8
func (lt LocalTarget) DependencyIDs() []TargetID
func (LocalTarget) Dockerignores ¶ added in v0.10.8
func (lt LocalTarget) Dockerignores() []Dockerignore
func (LocalTarget) Empty ¶ added in v0.10.9
func (lt LocalTarget) Empty() bool
func (LocalTarget) ID ¶ added in v0.10.8
func (lt LocalTarget) ID() TargetID
func (LocalTarget) IgnoredLocalDirectories ¶ added in v0.10.8
func (lt LocalTarget) IgnoredLocalDirectories() []string
func (LocalTarget) LocalRepos ¶ added in v0.10.8
func (lt LocalTarget) LocalRepos() []LocalGitRepo
func (LocalTarget) Validate ¶ added in v0.10.8
func (lt LocalTarget) Validate() error
func (LocalTarget) WithIgnores ¶ added in v0.10.16
func (lt LocalTarget) WithIgnores(ignores []Dockerignore) LocalTarget
func (LocalTarget) WithRepos ¶ added in v0.10.8
func (lt LocalTarget) WithRepos(repos []LocalGitRepo) LocalTarget
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
func AppendLog ¶
Returns a new instance of `Log` with content equal to `b` appended to the end of `l` Performs truncation off the start of the log (at a newline) to ensure the resulting log is not longer than `maxLogLengthInBytes`. (which maybe means a pedant would say this isn't strictly an `append`?)
func (Log) MarshalJSON ¶
func (Log) ScrubSecretsStartingAt ¶ added in v0.10.10
func (*Log) UnmarshalJSON ¶ added in v0.10.11
type Manifest ¶
type Manifest struct { // Properties for all manifests. Name ManifestName // Info needed to build an image. (This struct contains details of DockerBuild, FastBuild... etc.) ImageTargets []ImageTarget // How updates are triggered: // - automatically, when we detect a change // - manually, when the user tells us to TriggerMode TriggerMode // The resource in this manifest will not be built until all of its dependencies have been // ready at least once. ResourceDependencies []ManifestName // contains filtered or unexported fields }
NOTE: If you modify Manifest, make sure to modify `Manifest.Equal` appropriately
func (Manifest) DependencyIDs ¶
func (Manifest) DeployTarget ¶
func (m Manifest) DeployTarget() TargetSpec
func (Manifest) DockerComposeTarget ¶
func (m Manifest) DockerComposeTarget() DockerComposeTarget
func (Manifest) ImageTargetAt ¶
func (m Manifest) ImageTargetAt(i int) ImageTarget
func (Manifest) IsImageDeployed ¶
func (m Manifest) IsImageDeployed(iTarget ImageTarget) bool
func (Manifest) LocalPaths ¶
func (Manifest) LocalTarget ¶ added in v0.10.8
func (m Manifest) LocalTarget() LocalTarget
func (Manifest) ManifestName ¶
func (m Manifest) ManifestName() ManifestName
func (Manifest) NonWorkloadManifest ¶ added in v0.14.1
func (Manifest) TargetIDSet ¶ added in v0.15.0
func (Manifest) TargetSpecs ¶
func (m Manifest) TargetSpecs() []TargetSpec
func (Manifest) WithDeployTarget ¶
func (m Manifest) WithDeployTarget(t TargetSpec) Manifest
func (Manifest) WithImageTarget ¶
func (m Manifest) WithImageTarget(iTarget ImageTarget) Manifest
func (Manifest) WithImageTargets ¶
func (m Manifest) WithImageTargets(iTargets []ImageTarget) Manifest
func (Manifest) WithTriggerMode ¶
func (m Manifest) WithTriggerMode(mode TriggerMode) Manifest
type ManifestName ¶
type ManifestName string
TODO(nick): We should probably get rid of ManifestName completely and just use TargetName everywhere.
func (ManifestName) String ¶
func (m ManifestName) String() string
func (ManifestName) TargetName ¶
func (m ManifestName) TargetName() TargetName
type Orchestrator ¶
type Orchestrator string
The current orchestrator we're running with (K8s or DockerCompose)
type OverrideArgs ¶ added in v0.14.0
Represent OverrideArgs as a special struct, to cleanly distinguish "replace with 0 args" from "don't replace"
type PathMatcher ¶
type PathMatcher interface { Matches(f string) (bool, error) // If this matches the entire dir, we can often optimize filetree walks a bit MatchesEntireDir(file string) (bool, error) }
var EmptyMatcher PathMatcher = emptyMatcher{}
func NewCompositeMatcher ¶
func NewCompositeMatcher(matchers []PathMatcher) PathMatcher
type PathSet ¶
A PathSet stores one or more filepaths, along with the directory that any relative paths are relative to NOTE(maia): in its current usage (for LiveUpdate.Run.Triggers, LiveUpdate.FallBackOnFiles()) this isn't strictly necessary, could just as easily convert paths to Abs when specified in the Tiltfile--but leaving this code in place for now because it was already written and may help with complicated future cases (glob support, etc.)
func NewPathSet ¶
type PortForward ¶
type PortForward struct { // The port to connect to inside the deployed container. // If 0, we will connect to the first containerPort. ContainerPort int // The port to expose on the current machine. LocalPort int // Optional host to bind to on the current machine (localhost by default) Host string }
type Run ¶
type RuntimeStatus ¶ added in v0.14.0
type RuntimeStatus string
const ( RuntimeStatusUnknown RuntimeStatus = "unknown" RuntimeStatusOK RuntimeStatus = "ok" RuntimeStatusPending RuntimeStatus = "pending" RuntimeStatusError RuntimeStatus = "error" RuntimeStatusNotApplicable RuntimeStatus = "not_applicable" )
type Secret ¶ added in v0.10.10
type SecretSet ¶ added in v0.10.10
Secrets are different than other kinds of build/deploy outputs.
Once something is marked as a secret, we want to scrub it from all logs until the user quits Tilt. Removing the secret from the Kubernetes cluster doesn't suddenly "reveal" the secret.
type SecretSettings ¶ added in v0.14.0
type SecretSettings struct {
ScrubSecrets bool // whether to scrub secrets in logs
}
func DefaultSecretSettings ¶ added in v0.14.0
func DefaultSecretSettings() SecretSettings
type Target ¶
type Target interface { Spec() TargetSpec Status() TargetStatus }
type TargetGraph ¶
type TargetGraph struct {
// contains filtered or unexported fields
}
func NewTargetGraph ¶
func NewTargetGraph(targets []TargetSpec) (TargetGraph, error)
func (TargetGraph) DeployedImages ¶
func (g TargetGraph) DeployedImages() []ImageTarget
Returns all the images in the graph that are directly deployed to a container.
func (TargetGraph) DepsOf ¶
func (g TargetGraph) DepsOf(t TargetSpec) ([]TargetSpec, error)
Return the direct dependency targets.
func (TargetGraph) Images ¶
func (g TargetGraph) Images() []ImageTarget
func (TargetGraph) IsDeployedImage ¶
func (g TargetGraph) IsDeployedImage(iTarget ImageTarget) bool
Is this image directly deployed a container?
func (TargetGraph) IsSingleSourceDAG ¶
func (g TargetGraph) IsSingleSourceDAG() bool
In Tilt, Manifests should always be DAGs with a single root node (the deploy target). This is just a quick sanity check to make sure that's true, because many of our graph-traversal algorithms won't work if it's not true.
func (TargetGraph) VisitTree ¶
func (g TargetGraph) VisitTree(root TargetSpec, visit func(dep TargetSpec) error) error
Visit t and its transitive dependencies in post-order (aka depth-first)
type TargetID ¶
type TargetID struct { Type TargetType Name TargetName }
func DedupeTargetIDs ¶
De-duplicate target ids, maintaining the same order.
func ImageID ¶
func ImageID(ref container.RefSelector) TargetID
type TargetName ¶
type TargetName string
func (TargetName) String ¶
func (n TargetName) String() string
type TargetSpec ¶
type TargetSpec interface { ID() TargetID // Check to make sure the spec is well-formed. // All TargetSpecs should throw an error in the case where the ID is empty. Validate() error DependencyIDs() []TargetID }
func TopologicalSort ¶
func TopologicalSort(targets []TargetSpec) ([]TargetSpec, error)
Create a topologically sorted list of targets. Returns an error if the targets can't be topologically sorted. (e.g., there's a cycle).
type TargetStatus ¶
type TargetStatus interface { TargetID() TargetID ActiveBuild() BuildRecord LastBuild() BuildRecord }
type TargetType ¶
type TargetType string
const ( // Deployed k8s entities TargetTypeK8s TargetType = "k8s" // Image builds // TODO(nick): It might make sense to represent FastBuild and normal Docker builds // as separate types. TargetTypeImage TargetType = "image" // Docker-compose service build and deploy // TODO(nick): Currently, build and deploy are represented as a single target. // In the future, we might have a separate build target and deploy target. TargetTypeDockerCompose TargetType = "docker-compose" // Runs a local command when triggered (manually or via changed dep) TargetTypeLocal TargetType = "local" // Aggregation of multiple targets into one UI view. // TODO(nick): Currently used as the type for both Manifest and YAMLManifest, though // we expect YAMLManifest to go away. TargetTypeManifest TargetType = "manifest" // Changes that affect all targets, rebuilding the target graph. TargetTypeConfigs TargetType = "configs" )
type TelemetrySettings ¶ added in v0.10.25
type TelemetryStatus ¶ added in v0.10.25
type TiltBuild ¶
type TiltBuild struct { // Version w/o leading "v" Version string CommitSHA string Date string Dev bool }
Information on a build of the Tilt binary
func (TiltBuild) AnalyticsVersion ¶
func (TiltBuild) HumanBuildStamp ¶ added in v0.15.0
func (TiltBuild) WebVersion ¶
func (b TiltBuild) WebVersion() WebVersion
type TriggerMode ¶
type TriggerMode int
const ( // Tilt automatically performs initial and non-initial builds without manual intervention TriggerModeAuto TriggerMode = iota // Tilt automatically performs initial builds without manual intervention, but requires manual intervention for non-initial builds TriggerModeManualAfterInitial TriggerMode = iota // Tilt requires manual intervention for all builds, and never automatically performs a build TriggerModeManualIncludingInitial TriggerMode = iota )
When Tilt decides that a resource could use a build, TriggerMode specifies whether to require manual approval before that build takes place. There are two classes of build as far as TriggerMode is concerned:
- Initial - A manifest's first build per `tilt up`. Either directly because the user ran `tilt up`, or because the user just added the manifest to the Tiltfile.
- Non-initial - After the initial build, any time one of the manifest's dependencies changes, the manifest is ready for an update
func (TriggerMode) AutoInitial ¶ added in v0.10.18
func (t TriggerMode) AutoInitial() bool
func (TriggerMode) AutoOnChange ¶ added in v0.10.18
func (t TriggerMode) AutoOnChange() bool
type UpdateSettings ¶ added in v0.14.0
type UpdateSettings struct {
// contains filtered or unexported fields
}
func DefaultUpdateSettings ¶ added in v0.14.0
func DefaultUpdateSettings() UpdateSettings
func (UpdateSettings) K8sUpsertTimeout ¶ added in v0.14.0
func (us UpdateSettings) K8sUpsertTimeout() time.Duration
func (UpdateSettings) MaxParallelUpdates ¶ added in v0.14.0
func (us UpdateSettings) MaxParallelUpdates() int
func (UpdateSettings) WithK8sUpsertTimeout ¶ added in v0.14.0
func (us UpdateSettings) WithK8sUpsertTimeout(timeout time.Duration) UpdateSettings
func (UpdateSettings) WithMaxParallelUpdates ¶ added in v0.14.0
func (us UpdateSettings) WithMaxParallelUpdates(n int) UpdateSettings
type UserConfigState ¶ added in v0.10.24
func NewUserConfigState ¶ added in v0.10.24
func NewUserConfigState(args []string) UserConfigState
func (UserConfigState) WithArgs ¶ added in v0.10.25
func (ucs UserConfigState) WithArgs(args []string) UserConfigState
type VersionSettings ¶ added in v0.10.19
type VersionSettings struct {
CheckUpdates bool
}
type WebDevPort ¶
type WebDevPort int
type WebMode ¶
type WebMode string
const ( // By default, we serve the js locally in dev builds and from prod in released // builds. DefaultWebMode WebMode = "default" // Local webpack server LocalWebMode WebMode = "local" // Prod gcloud bucket ProdWebMode WebMode = "prod" // Precompiled with `make build-js`. This is an experimental mode // we're playing around with to avoid the cost of webpack startup. PrecompiledWebMode WebMode = "precompiled" )
type WebSHA ¶ added in v0.10.14
type WebSHA string
Web version of the form aaaaaaa where a is a hex letter Used for fetching web assets
type WebVersion ¶
type WebVersion string
Web version of the form vA.B.C, where A, B, and C are integers Used for fetching web assets
Source Files ¶
- build_reason.go
- build_status.go
- docker_compose_target.go
- docker_prune.go
- extractors.go
- facet.go
- globalyaml.go
- image_target.go
- k8s_target.go
- label_pair.go
- live_update.go
- local_target.go
- log.go
- logstore.go
- manifest.go
- matcher.go
- orchestrator.go
- runtime_status.go
- secret.go
- secret_settings.go
- squash.go
- target.go
- target_graph.go
- telemetry_settings.go
- telemetry_state.go
- tilt_build.go
- trigger_mode.go
- update_settings.go
- user_config_state.go
- version_settings.go
- web.go