Documentation ¶
Index ¶
- Constants
- func DeepEqual(x, y interface{}) bool
- func NewSimpleFileMatcher(paths ...string) (fileMatcher, error)
- type BuildDetails
- type BuildReason
- type BuildRecord
- type Cmd
- type CompositePathMatcher
- type CompositePatternMatcher
- type DockerBuildArgs
- type DockerComposeTarget
- func (t DockerComposeTarget) Dependencies() []string
- func (t DockerComposeTarget) Dockerignores() []Dockerignore
- 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) TiltFilename() string
- func (dc DockerComposeTarget) Validate() error
- func (t DockerComposeTarget) WithDockerignores(dockerignores []Dockerignore) DockerComposeTarget
- func (t DockerComposeTarget) WithIgnoredLocalDirectories(dirs []string) DockerComposeTarget
- func (t DockerComposeTarget) WithRepos(repos []LocalGitRepo) DockerComposeTarget
- func (t DockerComposeTarget) WithTiltFilename(f string) DockerComposeTarget
- type Dockerignore
- type FastBuild
- type ImageTarget
- func (i ImageTarget) CachePaths() []string
- func (i ImageTarget) Dependencies() []string
- func (i ImageTarget) Dockerignores() []Dockerignore
- func (i ImageTarget) FastBuildInfo() FastBuild
- func (i ImageTarget) ID() TargetID
- func (i ImageTarget) IgnoredLocalDirectories() []string
- func (i ImageTarget) IsFastBuild() bool
- func (i ImageTarget) IsStaticBuild() bool
- func (i ImageTarget) LocalPaths() []string
- func (i ImageTarget) LocalRepos() []LocalGitRepo
- func (i ImageTarget) StaticBuildInfo() StaticBuild
- 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) WithDockerignores(dockerignores []Dockerignore) ImageTarget
- func (i ImageTarget) WithRepos(repos []LocalGitRepo) ImageTarget
- func (i ImageTarget) WithTiltFilename(f string) ImageTarget
- type K8sTarget
- type LabelPair
- type LocalGitRepo
- type Manifest
- 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) IsK8s() bool
- func (m Manifest) K8sTarget() K8sTarget
- func (m Manifest) LocalPaths() []string
- func (m Manifest) ManifestName() ManifestName
- 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
- type ManifestName
- type Mount
- type PathMatcher
- type PatternMatcher
- type PortForward
- type StaticBuild
- type Step
- type Target
- type TargetID
- type TargetName
- type TargetSpec
- type TargetStatus
- type TargetType
- type TriggerMode
Constants ¶
const BuildHistoryLimit = 2
const BuildReasonNone = BuildReason(0)
const GlobalYAMLManifestName = ManifestName("k8s_yaml")
TODO(maia): throw an error if you try to name a manifest this in your Tiltfile?
Variables ¶
This section is empty.
Functions ¶
func NewSimpleFileMatcher ¶
Types ¶
type BuildDetails ¶ added in v0.4.1
type BuildDetails interface {
// contains filtered or unexported methods
}
type BuildReason ¶ added in v0.2.0
type BuildReason int
const ( BuildReasonFlagMountFiles BuildReason = 1 << iota BuildReasonFlagConfig // See comments on NeedsRebuildFromCrash BuildReasonFlagCrash BuildReasonFlagInit )
func (BuildReason) Has ¶ added in v0.2.0
func (r BuildReason) Has(flag BuildReason) bool
func (BuildReason) IsCrashOnly ¶ added in v0.2.0
func (r BuildReason) IsCrashOnly() bool
func (BuildReason) With ¶ added in v0.2.0
func (r BuildReason) With(flag BuildReason) BuildReason
type BuildRecord ¶ added in v0.5.1
type BuildRecord struct { Edits []string Error error StartTime time.Time FinishTime time.Time // IsZero() == true for in-progress builds Reason BuildReason Log []byte `testdiff:"ignore"` }
func (BuildRecord) Duration ¶ added in v0.5.1
func (bs BuildRecord) Duration() time.Duration
func (BuildRecord) Empty ¶ added in v0.5.1
func (bs BuildRecord) Empty() bool
type Cmd ¶
type Cmd struct {
Argv []string
}
func ToShellCmd ¶
func ToShellCmds ¶
func (Cmd) EntrypointStr ¶
func (Cmd) IsShellStandardForm ¶
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
}
type CompositePatternMatcher ¶
type CompositePatternMatcher struct { CompositePathMatcher Matchers []PatternMatcher }
func (CompositePatternMatcher) AsMatchPatterns ¶
func (c CompositePatternMatcher) AsMatchPatterns() []string
type DockerBuildArgs ¶ added in v0.2.0
type DockerComposeTarget ¶ added in v0.4.3
type DockerComposeTarget struct { Name TargetName ConfigPath string Mounts []Mount YAMLRaw []byte // for diff'ing when config files change DfRaw []byte // for diff'ing when config files change // contains filtered or unexported fields }
func (DockerComposeTarget) Dependencies ¶ added in v0.5.0
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) Dockerignores ¶ added in v0.5.0
func (t DockerComposeTarget) Dockerignores() []Dockerignore
func (DockerComposeTarget) ID ¶ added in v0.4.3
func (t DockerComposeTarget) ID() TargetID
func (DockerComposeTarget) IgnoredLocalDirectories ¶ added in v0.5.0
func (t DockerComposeTarget) IgnoredLocalDirectories() []string
func (DockerComposeTarget) LocalPaths ¶ added in v0.5.0
func (t DockerComposeTarget) LocalPaths() []string
func (DockerComposeTarget) LocalRepos ¶ added in v0.5.0
func (t DockerComposeTarget) LocalRepos() []LocalGitRepo
func (DockerComposeTarget) ManifestName ¶ added in v0.5.1
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) TiltFilename ¶ added in v0.5.0
func (t DockerComposeTarget) TiltFilename() string
func (DockerComposeTarget) Validate ¶ added in v0.5.0
func (dc DockerComposeTarget) Validate() error
func (DockerComposeTarget) WithDockerignores ¶ added in v0.5.0
func (t DockerComposeTarget) WithDockerignores(dockerignores []Dockerignore) DockerComposeTarget
func (DockerComposeTarget) WithIgnoredLocalDirectories ¶ added in v0.5.0
func (t DockerComposeTarget) WithIgnoredLocalDirectories(dirs []string) DockerComposeTarget
func (DockerComposeTarget) WithRepos ¶ added in v0.5.0
func (t DockerComposeTarget) WithRepos(repos []LocalGitRepo) DockerComposeTarget
func (DockerComposeTarget) WithTiltFilename ¶ added in v0.5.0
func (t DockerComposeTarget) WithTiltFilename(f string) DockerComposeTarget
type Dockerignore ¶ added in v0.4.1
type ImageTarget ¶ added in v0.4.3
type ImageTarget struct { Ref reference.Named BuildDetails BuildDetails // contains filtered or unexported fields }
func (ImageTarget) CachePaths ¶ added in v0.4.3
func (i ImageTarget) CachePaths() []string
func (ImageTarget) Dependencies ¶ added in v0.5.0
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) Dockerignores ¶ added in v0.5.0
func (i ImageTarget) Dockerignores() []Dockerignore
func (ImageTarget) FastBuildInfo ¶ added in v0.5.0
func (i ImageTarget) FastBuildInfo() FastBuild
func (ImageTarget) ID ¶ added in v0.4.3
func (i ImageTarget) ID() TargetID
func (ImageTarget) IgnoredLocalDirectories ¶ added in v0.5.0
func (i ImageTarget) IgnoredLocalDirectories() []string
func (ImageTarget) IsFastBuild ¶ added in v0.5.0
func (i ImageTarget) IsFastBuild() bool
func (ImageTarget) IsStaticBuild ¶ added in v0.5.0
func (i ImageTarget) IsStaticBuild() bool
func (ImageTarget) LocalPaths ¶ added in v0.5.0
func (i ImageTarget) LocalPaths() []string
func (ImageTarget) LocalRepos ¶ added in v0.5.0
func (i ImageTarget) LocalRepos() []LocalGitRepo
func (ImageTarget) StaticBuildInfo ¶ added in v0.5.0
func (i ImageTarget) StaticBuildInfo() StaticBuild
func (ImageTarget) TiltFilename ¶ added in v0.5.0
func (i ImageTarget) TiltFilename() string
func (ImageTarget) Validate ¶ added in v0.5.0
func (i ImageTarget) Validate() error
func (ImageTarget) WithBuildDetails ¶ added in v0.4.3
func (i ImageTarget) WithBuildDetails(details BuildDetails) ImageTarget
func (ImageTarget) WithCachePaths ¶ added in v0.4.3
func (i ImageTarget) WithCachePaths(paths []string) ImageTarget
func (ImageTarget) WithDockerignores ¶ added in v0.5.0
func (i ImageTarget) WithDockerignores(dockerignores []Dockerignore) ImageTarget
func (ImageTarget) WithRepos ¶ added in v0.5.0
func (i ImageTarget) WithRepos(repos []LocalGitRepo) ImageTarget
func (ImageTarget) WithTiltFilename ¶ added in v0.5.0
func (i ImageTarget) WithTiltFilename(f string) ImageTarget
type K8sTarget ¶ added in v0.4.3
type K8sTarget struct { Name TargetName YAML string PortForwards []PortForward // labels for pods that we should watch and associate with this resource ExtraPodSelectors []labels.Selector ResourceNames []string }
func (K8sTarget) AppendYAML ¶ added in v0.4.3
type LocalGitRepo ¶ added in v0.4.3
func (LocalGitRepo) IsRepo ¶ added in v0.4.3
func (LocalGitRepo) IsRepo()
type Manifest ¶
type Manifest struct { // Properties for all manifests. Name ManifestName // Info needed to Docker build an image. (This struct contains details of StaticBuild, FastBuild... etc.) // (If we ever support multiple build engines, this can become an interface wildcard similar to `deployTarget`). ImageTargets []ImageTarget // contains filtered or unexported fields }
NOTE: If you modify Manifest, make sure to modify `Manifest.Equal` appropriately
func (Manifest) DockerComposeTarget ¶ added in v0.4.3
func (m Manifest) DockerComposeTarget() DockerComposeTarget
func (Manifest) ImageTargetAt ¶ added in v0.5.1
func (m Manifest) ImageTargetAt(i int) ImageTarget
func (Manifest) LocalPaths ¶
func (Manifest) ManifestName ¶ added in v0.1.0
func (m Manifest) ManifestName() ManifestName
func (Manifest) WithDeployTarget ¶ added in v0.4.3
func (m Manifest) WithDeployTarget(t TargetSpec) Manifest
func (Manifest) WithImageTarget ¶ added in v0.5.1
func (m Manifest) WithImageTarget(iTarget ImageTarget) Manifest
func (Manifest) WithImageTargets ¶ added in v0.5.1
func (m Manifest) WithImageTargets(iTargets []ImageTarget) 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 ¶ added in v0.4.3
func (m ManifestName) TargetName() TargetName
type PathMatcher ¶
var EmptyMatcher PathMatcher = emptyMatcher{}
func NewCompositeMatcher ¶
func NewCompositeMatcher(matchers []PathMatcher) PathMatcher
func NewGlobMatcher ¶ added in v0.1.0
func NewGlobMatcher(globs ...string) PathMatcher
type PatternMatcher ¶
type PatternMatcher interface { PathMatcher // Express this PathMatcher as a sequence of filepath.Match // patterns. These patterns are widely useful in Docker-land because // they're suitable in .dockerignore or Dockerfile ADD statements // https://docs.docker.com/engine/reference/builder/#add AsMatchPatterns() []string }
type PortForward ¶
type StaticBuild ¶ added in v0.4.1
type StaticBuild struct { Dockerfile string BuildPath string // the absolute path to the files BuildArgs DockerBuildArgs }
type Step ¶
type Step struct { // Required. The command to run in this step. Cmd Cmd // Optional. If not specified, this step runs on every change. // If specified, we only run the Cmd if the trigger matches the changed file. Triggers []string // Directory the Triggers are relative to BaseDirectory string }
func ToShellSteps ¶
type Target ¶ added in v0.4.3
type Target interface { Spec() TargetSpec Status() TargetStatus }
type TargetID ¶ added in v0.4.3
type TargetID struct { Type TargetType Name TargetName }
type TargetName ¶ added in v0.4.3
type TargetName string
func (TargetName) String ¶ added in v0.4.3
func (n TargetName) String() string
type TargetSpec ¶ added in v0.5.0
type TargetStatus ¶ added in v0.4.3
type TargetStatus interface { TargetID() TargetID ActiveBuild() BuildRecord LastBuild() BuildRecord }
type TargetType ¶ added in v0.4.3
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" // Aggregation of multiple targets into one UI view. // TODO(nick): Currenly 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 TriggerMode ¶ added in v0.4.1
type TriggerMode int
const ( TriggerAuto TriggerMode = iota TriggerManual )