watch

package
v0.0.0-...-42c7111 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyFileWatcher

type DummyFileWatcher struct{}

DummyFileWatcher noop implementation of a file watcher

func (DummyFileWatcher) Close

func (f DummyFileWatcher) Close() error

Close ends the watch

type FileWatcher

type FileWatcher interface {
	Close() error
}

FileWatcher is an interface we use to watch changes in files

func NewDummyFileWatcher

func NewDummyFileWatcher(file string, onEvent func()) FileWatcher

NewDummyFileWatcher creates a FileWatcher using the DummyFileWatcher

func NewFileWatcher

func NewFileWatcher(file string, onEvent func()) (FileWatcher, error)

NewFileWatcher creates a new FileWatcher

type OSFileWatcher

type OSFileWatcher struct {
	// contains filtered or unexported fields
}

OSFileWatcher defines a watch over a file

func (OSFileWatcher) Close

func (f OSFileWatcher) Close() error

Close ends the watch

Jump to

Keyboard shortcuts

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