watcher

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 8 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 {
	AbsPath string
	RelPath string
	Type    EventType
}

type EventType

type EventType string
const (
	EventCreated  EventType = "created"
	EventModified EventType = "modified"
	EventRemoved  EventType = "removed"
)

type EventsChannel

type EventsChannel <-chan Event

type Watcher

type Watcher struct {
	RootPath string
	Excludes []string
	// contains filtered or unexported fields
}

func New

func New(rootPath string, excludes []string) *Watcher

func (*Watcher) Watch

func (w *Watcher) Watch(ctx context.Context, wg *sync.WaitGroup) (EventsChannel, error)

Jump to

Keyboard shortcuts

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