Documentation
¶
Index ¶
- Variables
- type FSNotifyTracker
- func (t *FSNotifyTracker) Add(path string) error
- func (t *FSNotifyTracker) Close() error
- func (t *FSNotifyTracker) Errors() chan error
- func (t *FSNotifyTracker) Events() chan fsnotify.Event
- func (t *FSNotifyTracker) IsTracked(path string) bool
- func (t *FSNotifyTracker) Remove(path string)
- func (t *FSNotifyTracker) Tracked() []string
- type Tracker
Constants ¶
This section is empty.
Variables ¶
var OneRunCmd = cli.Command{ Name: "one", Aliases: []string{"1"}, Usage: "runs the pipeline once and exits", Action: oneRun, Flags: []cli.Flag{}, }
OneRunCmd is the command to run a pipeline once.
var WatchCmd = cli.Command{
Name: "watch",
Usage: "starts watching folder(s)",
Action: watchIt,
Flags: []cli.Flag{},
}
WatchCmd is the command that starts a watching files in the project folder and triggers the pipeline once a relevant change did happen.
Functions ¶
This section is empty.
Types ¶
type FSNotifyTracker ¶ added in v0.0.2
type FSNotifyTracker struct {
// contains filtered or unexported fields
}
FSNotifyTracker is a tracker that uses FSNotify.
func (*FSNotifyTracker) Add ¶ added in v0.0.2
func (t *FSNotifyTracker) Add(path string) error
Add adds a path to the list of tracked paths
func (*FSNotifyTracker) Close ¶ added in v0.0.2
func (t *FSNotifyTracker) Close() error
Close stops all watching and event publication of this tracker.
func (*FSNotifyTracker) Errors ¶ added in v0.0.2
func (t *FSNotifyTracker) Errors() chan error
Errors returns a channel that will return all errors issued by this tracker.
func (*FSNotifyTracker) Events ¶ added in v0.0.2
func (t *FSNotifyTracker) Events() chan fsnotify.Event
Events returns a channel that will deliver all events issued by this tracker.
func (*FSNotifyTracker) IsTracked ¶ added in v0.0.2
func (t *FSNotifyTracker) IsTracked(path string) bool
IsTracked determines whether the passed path is tracked (true) or not (false).
func (*FSNotifyTracker) Remove ¶ added in v0.0.2
func (t *FSNotifyTracker) Remove(path string)
Remove removes the handed path from the tracker.
func (*FSNotifyTracker) Tracked ¶ added in v0.0.2
func (t *FSNotifyTracker) Tracked() []string
Tracked returns all paths that this tracker will report changes on.
type Tracker ¶
type Tracker interface { Tracked() []string Add(p string) error IsTracked(p string) bool Remove(path string) Events() chan fsnotify.Event Errors() chan error Close() error }
Tracker keeps track of file system changes, and let's you control what it monitors.
func NewTracker ¶
NewTracker returns a new tracker based on the config passed.