Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppWatcher ¶
type AppWatcher struct { Dir string Debounce time.Duration ExeLogger ExeLogger FileFilter WatchFileFilter OnChangeFn OnChange CommandFn MakeCommandFn }
func NewAppWatcher ¶
func NewAppWatcher() *AppWatcher
func (*AppWatcher) RunCommand ¶
func (a *AppWatcher) RunCommand(cmd string, args ...string) error
Simple utility function for running a command.
type DefaultLogger ¶
type DefaultLogger struct { }
func (DefaultLogger) Error ¶
func (e DefaultLogger) Error(err error)
func (DefaultLogger) Success ¶
func (e DefaultLogger) Success(msg string, args ...interface{})
type ExeRefresher ¶
type ExeRefresher struct { Stdin io.Reader Stdout io.Writer Stderr io.Writer //ID string Logger ExeLogger Restart chan bool CommandFn MakeCommandFn }
func NewExeRefresher ¶
func NewExeRefresher() *ExeRefresher
func (*ExeRefresher) Run ¶
func (r *ExeRefresher) Run(ctx context.Context)
type MakeCommandFn ¶
type OnChangeFn ¶
type OnFileChange ¶
type WatchConfig ¶
type WatchConfig struct { Dir string Debounce time.Duration // Returns true if file should be watched. Filter WatchFileFilter OnChange OnChangeFn // contains filtered or unexported fields }
func NewWatchConfig ¶
func NewWatchConfig() *WatchConfig
type WatchFileFilter ¶
Click to show internal directories.
Click to hide internal directories.