-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Is your feature request related to a problem? Please describe.
The VFS library lacks a unified interface for monitoring filesystem events across d
Describe the solution you'd like
Add a vfsevents
contrib package that provides a unified Watcher interface for monitoring filesystem events across all VFS backends. The package should include:
- Core event types (Created, Modified, Deleted, Renamed) with metadata
- Functional options pattern for configuration (retry logic, event filtering, status callbacks)
- Multiple watcher implementations:
- FSNotify: Real-time local filesystem monitoring (< 1ms latency)
- VFS Poller: Universal polling for any VFS backend (configurable intervals)
- S3Events: Real-time S3 monitoring via SQS notifications
- GCSEvents: Real-time GCS monitoring via Pub/Sub notifications
Describe alternatives you've considered
- Individual watcher libraries: Separate packages for each backend, but this fragments the ecosystem
- Extending core VFS: Adding events to the main VFS library, but this increases complexity and scope
- Third-party event libraries: Using existing solutions, but they don't integrate with VFS abstractions
Additional context
This contrib package would provide developers with a consistent API for filesystem monitoring regardless of the underlying storage system, following established VFS patterns for backend abstraction. Each watcher implementation would be optimized for its specific use case while maintaining interface compatibility.
The package should include comprehensive documentation, godoc examples, and robust test coverage.