Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupWatcher ¶
SetupWatcher sets up fsnotify to watch all the directories specified in the config.
Types ¶
type Config ¶
type Config struct { // BaseDir is the base directory where configs are based. // If this is not specified, the config file's location is used by default. BaseDir string `yaml:"baseDir"` // Matchers is the list of configurations to match. // If none are specified, it defaults to looking in baseDir for any changes. Matchers []Matcher `yaml:"matchers"` // ProxyConfigs is the list of ports that the file watcher listens on and forwards. ProxyConfigs []proxy.Config `yaml:"proxy"` // Action is the command to run to compile + restart the server. Action []string `yaml:"action"` // StdOut is the file that the task's STDOUT is written to. StdOut string `yaml:"outFile"` // StdErr is the file that the task's STDERR is written to. StdErr string `yaml:"errFile"` // Timeout configurations ChangeTimeout time.Duration `yaml:"changeTimeout"` KillTimeout time.Duration `yaml:"killTimeout"` // contains filtered or unexported fields }
Config is the struct defining the config file passed in to the file watcher.
type Matcher ¶
type Matcher struct { Patterns []string `yaml:"patterns"` Dirs []string `yaml:"dirs"` // ExcludeDir is the name of directories that are excluded from the watcher. // By default, everything in defaultExcludeDirMap is excluded. ExcludeDirs []string `yaml:"excludeDirs"` // contains filtered or unexported fields }
Matcher represents a specific set of patterns for some directories.
Click to show internal directories.
Click to hide internal directories.