watch

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 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 ArtifactChangedFn added in v0.9.0

type ArtifactChangedFn func(changes []*v1alpha2.Artifact) error

ArtifactChangedFn is a function called when artifacts where changed.

type ArtifactWatcher added in v0.9.0

type ArtifactWatcher interface {
	Run(ctx context.Context, callback ArtifactChangedFn) error
}

ArtifactWatcher watches for artifacts changes.

func NewArtifactWatcher added in v0.9.0

func NewArtifactWatcher(artifacts []*v1alpha2.Artifact, pollInterval time.Duration) (ArtifactWatcher, error)

NewArtifactWatcher creates an ArtifactWatcher for a list of artifacts.

type CompositeWatcher added in v0.9.0

type CompositeWatcher interface {
	Run(ctx context.Context, onFileChange FileChangedFn, onArtifactChange ArtifactChangedFn) error
}

CompositeWatcher can watch both files and artifacts.

func NewCompositeWatcher added in v0.9.0

func NewCompositeWatcher(files []string, artifacts []*v1alpha2.Artifact, pollInterval time.Duration) CompositeWatcher

NewCompositeWatcher creates a CompositeWatcher that watches both files and artifacts.

type Factory added in v0.9.0

type Factory func(files []string, artifacts []*v1alpha2.Artifact, pollInterval time.Duration) CompositeWatcher

Factory is used to create Watchers.

type FileChangedFn added in v0.9.0

type FileChangedFn func(changes []string) error

FileChangedFn is a function called when files where changed.

type FileWatcher added in v0.9.0

type FileWatcher interface {
	Run(ctx context.Context, callback FileChangedFn) error
}

FileWatcher watches for file changes.

func NewFileWatcher added in v0.9.0

func NewFileWatcher(dirs []string, pollInterval time.Duration) (FileWatcher, error)

NewFileWatcher creates a FileWatcher for a list of directories.

Jump to

Keyboard shortcuts

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