watcherx

package
v0.0.142 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: Apache-2.0 Imports: 15 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSchemeUnknown = &errSchemeUnknown{}

ErrSchemeUnknown is just for checking with errors.Is()

Functions

func Watch

func Watch(ctx context.Context, u *url.URL, c EventChannel) error

func WatchDirectory added in v0.0.142

func WatchDirectory(ctx context.Context, dir string, c EventChannel) error

func WatchFile

func WatchFile(ctx context.Context, file string, c EventChannel) error

Types

type ChangeEvent

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

func (*ChangeEvent) Reader

func (e *ChangeEvent) Reader() io.Reader

func (ChangeEvent) Source

func (e ChangeEvent) Source() string

type ErrorEvent

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

func (*ErrorEvent) Reader

func (e *ErrorEvent) Reader() io.Reader

func (ErrorEvent) Source

func (e ErrorEvent) Source() string

type Event

type Event interface {
	Reader() io.Reader
	Source() string
}

type EventChannel

type EventChannel chan Event

type RemoveEvent

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

func (*RemoveEvent) Reader

func (e *RemoveEvent) Reader() io.Reader

func (RemoveEvent) Source

func (e RemoveEvent) Source() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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