package pathwatcher
import "github.com/open-policy-agent/opa/internal/pathwatcher"
Package pathwatcher provides helper functions for creating file and directory watchers
Index ¶
- func CreatePathWatcher(rootPaths []string) (*fsnotify.Watcher, error)
- func ProcessWatcherUpdate(ctx context.Context, paths []string, removed string, store storage.Store, filter loader.Filter, asBundle bool, f func(context.Context, storage.Transaction, *initload.LoadPathsResult) error) error
- func ProcessWatcherUpdateForRegoVersion(ctx context.Context, regoVersion ast.RegoVersion, paths []string, removed string, store storage.Store, filter loader.Filter, asBundle bool, f func(context.Context, storage.Transaction, *initload.LoadPathsResult) error) error
Functions ¶
func CreatePathWatcher ¶
CreatePathWatcher creates watchers to monitor for path changes
func ProcessWatcherUpdate ¶
func ProcessWatcherUpdate(ctx context.Context, paths []string, removed string, store storage.Store, filter loader.Filter, asBundle bool, f func(context.Context, storage.Transaction, *initload.LoadPathsResult) error) error
ProcessWatcherUpdate handles an occurrence of a watcher event
func ProcessWatcherUpdateForRegoVersion ¶
func ProcessWatcherUpdateForRegoVersion(ctx context.Context, regoVersion ast.RegoVersion, paths []string, removed string, store storage.Store, filter loader.Filter, asBundle bool, f func(context.Context, storage.Transaction, *initload.LoadPathsResult) error) error
Source Files ¶
- Version
- v1.5.1 (latest)
- Published
- Jun 4, 2025
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 1 day ago –
Tools for package owners.