runner

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch(watcher *fsnotify.Watcher, opts WatchOptions) error

Watch for events from the watcher and handle them with the runner

Types

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner executes commands when an included file is modified

func NewRunner

func NewRunner(
	excludes *files.ExcludeList,
	eventOp fsnotify.Op,
	command []string,
) (*Runner, func())

NewRunner creates a new Runner

func (*Runner) HandleEvent

func (runner *Runner) HandleEvent(event fsnotify.Event)

HandleEvent checks runs the command if the event was a Write event

type WatchOptions

type WatchOptions struct {
	IdleTimeout time.Duration
	Runner      *Runner
}

WatchOptions passed to watch

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL