Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split out Watcher and backends #632

Merged
merged 1 commit into from
May 2, 2024
Merged

Split out Watcher and backends #632

merged 1 commit into from
May 2, 2024

Conversation

arp242
Copy link
Member

@arp242 arp242 commented May 1, 2024

Rather than have a bunch of Watcher types guarded by build tags, have one Watcher that's always available which proxies to a backend interface.

This will allow adding a polling watcher, fanotify, fsevents, and things like that. There are no backends to select from yet, and I'm not 100% sure yet what an API for that would look like, but this sets up the scaffolding for all of it.

Backends are per-watcher; originally I prototyped something that allows selecting it per-Add() call, but the bookkeeping on that became rather complex, and this use case is probably far too rare to spend a lot of effort on. People can still use different backends by using different Watchers; they'll just have to do the bookkeeping themselves.

@arp242 arp242 force-pushed the backend branch 2 times, most recently from de770b8 to 3fa20e8 Compare May 2, 2024 01:59
@arp242 arp242 marked this pull request as ready for review May 2, 2024 02:09
Rather than have a bunch of Watcher types guarded by build tags, have
one Watcher that's always available which proxies to a backend
interface.

This will allow adding a polling watcher, fanotify, fsevents, and things
like that. There are no backends to select from yet, and I'm not 100%
sure yet what an API for that would look like, but this sets up the
scaffolding for all of it.

Backends are per-watcher; originally I prototyped something that allows
selecting it per-Add() call, but the bookkeeping on that became rather
complex, and this use case is probably far too rare to spend a lot of
effort on. People can still use different backends by using different
Watchers; they'll just have to do the bookkeeping themselves.
@arp242 arp242 merged commit bec8903 into main May 2, 2024
18 checks passed
@arp242 arp242 deleted the backend branch May 2, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant