watch

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Events added in v0.16.0

type Events struct {
	Added    []string
	Modified []string
	Deleted  []string
}

func (Events) HasChanged added in v0.16.0

func (e Events) HasChanged() bool

func (*Events) String added in v0.16.0

func (e *Events) String() string

type Factory added in v0.9.0

type Factory func() Watcher

Factory creates Watcher instances.

type FileMap added in v0.16.0

type FileMap map[string]time.Time

FileMap is a map of filename to modification times.

func Stat added in v0.16.0

func Stat(deps func() ([]string, error)) (FileMap, error)

Stat returns the modification times for a list of files.

type Trigger added in v0.16.0

type Trigger interface {
	Start() (<-chan bool, func())
	WatchForChanges(io.Writer)
	Debounce() bool
}

Trigger describes a mechanism that triggers the watch.

func NewTrigger added in v0.16.0

func NewTrigger(opts *config.SkaffoldOptions) (Trigger, error)

NewTrigger creates a new trigger.

type Watcher

type Watcher interface {
	Register(deps func() ([]string, error), onChange func(Events)) error
	Run(ctx context.Context, trigger Trigger, onChange func() error) error
}

Watcher monitors files changes for multiples components.

func NewWatcher added in v0.3.0

func NewWatcher() Watcher

NewWatcher creates a new Watcher.

Jump to

Keyboard shortcuts

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