fswatcher

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Op   Op
	Name string
}

type FsnWatcher

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

func NewFsnWatcher

func NewFsnWatcher() (*FsnWatcher, error)

func (*FsnWatcher) Add

func (w *FsnWatcher) Add(name string) error

func (*FsnWatcher) Close

func (w *FsnWatcher) Close() error

func (*FsnWatcher) Events

func (w *FsnWatcher) Events() <-chan interface{}

func (*FsnWatcher) OpMask

func (w *FsnWatcher) OpMask() *Op

func (*FsnWatcher) Remove

func (w *FsnWatcher) Remove(name string) error

type GWatcher

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

graph based watcher

func NewGWatcher

func NewGWatcher(w Watcher) *GWatcher

func (*GWatcher) Add

func (gw *GWatcher) Add(name string) error

func (*GWatcher) Close

func (gw *GWatcher) Close() error

func (*GWatcher) Events

func (gw *GWatcher) Events() <-chan interface{}

func (*GWatcher) OpMask

func (gw *GWatcher) OpMask() *Op

func (*GWatcher) Remove

func (gw *GWatcher) Remove(name string) error

type Node

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

func NewNode

func NewNode(name string, parent *Node) *Node

func (*Node) SprintFlatTree

func (n *Node) SprintFlatTree() string

type Op

type Op uint16
const (
	Attrib Op = 1 << iota
	Create
	Modify // write, truncate
	Remove
	Rename

	AllOps Op = Attrib | Create | Modify | Remove | Rename
)

func (*Op) Add

func (op *Op) Add(op2 Op)

func (Op) HasAny

func (op Op) HasAny(op2 Op) bool

func (*Op) Remove

func (op *Op) Remove(op2 Op)

type Watcher

type Watcher interface {
	Add(name string) error
	Remove(name string) error
	Events() <-chan interface{}
	OpMask() *Op
	Close() error
}

Jump to

Keyboard shortcuts

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