watcher

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "v1.4.4"

Version is the current file watcher version.

Variables

This section is empty.

Functions

func ActionToString

func ActionToString(action notification.ActionType) string

ActionToString maps Action value to string

func Setup

func Setup(ctx context.Context, dirsToWatch []string, actionFilters []notification.ActionType, fileFilters []string, options *Options) (chan notification.Event, chan notification.Error)

Setup adds a watcher for a file changes in specified directories and returns a channel for notifications

Types

type DirectoryWatcher

type DirectoryWatcher struct {
	ActionFilters []notification.ActionType
	FileFilters   []string
	Options       *Options
	EventCh       chan notification.Event
	ErrorCh       chan notification.Error

	NotificationWaiter notification.Waiter
}

DirectoryWatcher ...

func Create

func Create(callbackCh chan notification.Event, errorCh chan notification.Error, filters []notification.ActionType, fileFilters []string, options *Options) *DirectoryWatcher

Create ...

func (*DirectoryWatcher) StartWatching

func (i *DirectoryWatcher) StartWatching(root string)

StartWatching starts a CGO function for getting the notifications

type DirectoryWatcherImplementer

type DirectoryWatcherImplementer interface {
	StartWatching(path string)
}

DirectoryWatcherImplementer ...

type Options

type Options struct {
	IgnoreDirectoies bool
}

Options ...

Jump to

Keyboard shortcuts

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