watcher

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watcher

type Watcher struct {
	// IgnoreRegex is a regex of files to ignore.
	IgnoreRegex string
	// contains filtered or unexported fields
}

Watcher watches a directory for changes and triggers a build when a change is detected.

func NewWatcher

func NewWatcher(c middlewarev1.MiddlewareServiceClient, ignoreRegex string) *Watcher

NewWatcher creates a new Watcher.

func (*Watcher) Add

func (w *Watcher) Add(slug, dir string) error

Add adds a new watch.

func (*Watcher) Remove

func (w *Watcher) Remove(slug string) error

Remove removes a watch.

func (*Watcher) Run

func (w *Watcher) Run(ctx context.Context) error

Run starts the watcher until the context is cancelled.

Jump to

Keyboard shortcuts

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