filewatcher

package
v0.78.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LazyWatcher

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

func NewLazyWatcher

func NewLazyWatcher(root string, ignorePaths []string, logger *zap.Logger) *LazyWatcher

func (*LazyWatcher) Close

func (w *LazyWatcher) Close()

func (*LazyWatcher) Subscribe

func (w *LazyWatcher) Subscribe(ctx context.Context, cb WatchCallback) error

type WatchCallback

type WatchCallback func(event []WatchEvent)

type WatchEvent

type WatchEvent struct {
	Type     runtimev1.FileEvent
	FullPath string
	RelPath  string
	Dir      bool
	// contains filtered or unexported fields
}

type Watcher

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

Watcher implements a recursive, batching file watcher on top of fsnotify.

func NewWatcher

func NewWatcher(root string, ignorePaths []string, logger *zap.Logger) (*Watcher, error)

NewWatcher creates a new watcher for the given root directory. The root directory must be an absolute path.

func (*Watcher) Close

func (w *Watcher) Close()

func (*Watcher) Subscribe

func (w *Watcher) Subscribe(ctx context.Context, fn WatchCallback) error

Jump to

Keyboard shortcuts

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