Documentation
¶
Index ¶
Constants ¶
View Source
const WindowsBufferSizeEnvVar = "TILT_WATCH_WINDOWS_BUFFER_SIZE"
Variables ¶
This section is empty.
Functions ¶
func DesiredWindowsBufferSize ¶ added in v0.17.0
func DesiredWindowsBufferSize() int
func IsWindowsShortReadError ¶ added in v0.17.0
func IsWindowsShortReadError(err error) bool
func MaybeIncreaseBufferSize ¶ added in v0.17.0
func MaybeIncreaseBufferSize(w *fsnotify.Watcher)
Types ¶
type EmptyMatcher ¶ added in v0.9.3
type EmptyMatcher struct {
}
func (EmptyMatcher) MatchesEntireDir ¶ added in v0.9.5
func (EmptyMatcher) MatchesEntireDir(f string) (bool, error)
type FileEvent ¶
type FileEvent struct {
// contains filtered or unexported fields
}
func NewFileEvent ¶ added in v0.9.4
func NewFileEvent(p string) FileEvent
type Notify ¶
type Notify interface {
// Start watching the paths set at init time
Start() error
// Stop watching and close all channels
Close() error
// A channel to read off incoming file changes
Events() chan FileEvent
// A channel to read off show-stopping errors
Errors() chan error
}
func NewWatcher ¶
func NewWatcher(paths []string, ignore PathMatcher, l logger.Logger) (Notify, error)
type PathMatcher ¶ added in v0.9.3
type PathMatcher interface {
Matches(file string) (bool, error)
// If this matches the entire dir, we can often optimize filetree walks a bit.
MatchesEntireDir(file string) (bool, error)
}
When we specify directories to watch, we often want to ignore some subset of the files under those directories.
For example: - Watch /src/repo, but ignore /src/repo/.git - Watch /src/repo, but ignore everything in /src/repo/bazel-bin except /src/repo/bazel-bin/app-binary
The PathMatcher inteface helps us manage these ignores.
type TempDir ¶
type TempDir struct {
// contains filtered or unexported fields
}
TempDir holds a temp directory and allows easy access to new temp directories.
func NewDir ¶
func NewDir(prefix string) (*TempDir, error)
NewDir creates a new TempDir in the default location (typically $TMPDIR)
func NewDirAtRoot ¶
func NewDirAtRoot(root, prefix string) (*TempDir, error)
NewDir creates a new TempDir at the given root.
func NewDirAtSlashTmp ¶
func NewDirAtSlashTmp(prefix string) (*TempDir, error)
NewDirAtSlashTmp creates a new TempDir at /tmp
func (*TempDir) NewDeterministicDir ¶
func (d *TempDir) NewDeterministicDir(name string) (*TempDir, error)
Click to show internal directories.
Click to hide internal directories.