watcher

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeHook

type ChangeHook func(ctx context.Context, file TrackedFile) error

type TrackedFile

type TrackedFile interface {
	Path() string
	Sha256Sum() string
}

type Watcher

type Watcher interface {
	Start() error
	Stop() error
	SetLogger(logger *log.Logger)
	AddPath(path string) error
	AddPaths(paths []string) error
	AddChangeHook(f ChangeHook)
}

func NewWatcher

func NewWatcher() (Watcher, error)

type WatcherFactory

type WatcherFactory func() (Watcher, error)

func MockWatcher

func MockWatcher() WatcherFactory

Jump to

Keyboard shortcuts

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