watcher

package
v0.0.0-...-e502229 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusModified int = iota
	StatusRemoved
	StatusNotFound
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adder

type Adder interface {
	Add(origin string, path string) error
}

type FileWatcher

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

func NewFileWatcher

func NewFileWatcher() (FileWatcher, chan Status)

func (FileWatcher) Add

func (w FileWatcher) Add(path string, origin string) error

func (FileWatcher) Remove

func (w FileWatcher) Remove(paths ...string)

func (FileWatcher) Updates

func (w FileWatcher) Updates() chan Status

func (FileWatcher) Watch

func (w FileWatcher) Watch(rate time.Duration)

type Remover

type Remover interface {
	Remove(paths ...string)
}

type Status

type Status struct {
	Code   int
	Path   string
	Origin string
}

type Updater

type Updater interface {
	Updates() chan Status
}

type WatchInfo

type WatchInfo struct {
	Origin string
	Path   string
}

type WatchManager

type WatchManager interface {
	Adder
	Remover
	Watcher
	Updater
}

type Watcher

type Watcher interface {
	Watch(rate time.Duration)
}

Jump to

Keyboard shortcuts

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