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

Source Files

utils.go

Version
v0.57.1
Published
Oct 18, 2023
Platform
js/wasm
Imports
6 packages
Last checked
1 minute ago

Tools for package owners.