watcher

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MPL-2.0 Imports: 7 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(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