watch

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// WatchReady is EventType sent when the watcher is ready to watch all files
	WatchReady = "WatchReady"
	// WatchStop is the EventType sent when the watcher is stopped by a cancel
	WatchStop = "WatchStop"
)

Variables

View Source
var (
	// WatchStopEvent is sent when the watcher is stopped by a message on the
	// cancel channel
	WatchStopEvent = &Event{EventType: WatchStop}
	//WatchStartEvent is sent when the watcher is ready to watch all files
	WatchStartEvent = &Event{EventType: WatchReady}
)

Functions

This section is empty.

Types

type Event

type Event struct {
	EventType        string
	ChangedArtifacts []*config.Artifact
}

Event is sent on any inotify event and returns all artifacts which reference the changed dependency

type FSWatcher

type FSWatcher struct{}

FSWatcher uses inotify to watch for changes and implements the Watcher interface

func (*FSWatcher) Watch

func (f *FSWatcher) Watch(artifacts []*config.Artifact, ready chan *Event, cancel chan struct{}) (*Event, error)

Watch watches a set of artifacts for changes with inotify, and on the first change returns a reference to the changed artifact

type Watcher

type Watcher interface {
	// Watch watches a set of artifacts for changes, and on the first change
	// returns a reference to the changed artifact
	Watch(artifacts []*config.Artifact, ready chan *Event, cancel chan struct{}) (*Event, error)
}

Watcher provides a watch trigger for the skaffold pipeline to begin

Jump to

Keyboard shortcuts

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