trigger

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RealWorkDir added in v1.7.1

func RealWorkDir() (string, error)

On macOS, $PWD can have a different case that the actual current working directory. That happens for example if one does: `cd /home/me/MY-PROJECT` before running Skaffold, instead of `cd /home/me/my-project`. In such a situation, the file watcher will fail to detect changes. To solve that, we force `os.Getwd()` not to use $PWD. See: https://github.com/rjeczalik/notify/issues/96

func StartTrigger

func StartTrigger(ctx context.Context, t Trigger) (<-chan bool, error)

StartTrigger attempts to start a trigger. It will attempt to start as a polling trigger if it tried unsuccessfully to start a notify trigger.

Types

type Trigger

type Trigger interface {
	Start(context.Context) (<-chan bool, error)
	LogWatchToUser(io.Writer)
	Debounce() bool
}

Trigger describes a mechanism that triggers the watch.

func NewTrigger

func NewTrigger(runCtx *runcontext.RunContext) (Trigger, error)

NewTrigger creates a new trigger.

Jump to

Keyboard shortcuts

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