package pathwatcher

import "github.com/open-policy-agent/opa/internal/pathwatcher"

Package pathwatcher provides helper functions for creating file and directory watchers

Index

Functions

func CreatePathWatcher

func CreatePathWatcher(rootPaths []string) (*fsnotify.Watcher, error)

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

utils.go

Version
v1.5.1 (latest)
Published
Jun 4, 2025
Platform
linux/amd64
Imports
9 packages
Last checked
1 day ago

Tools for package owners.