There's currently two instances of paths globsets being held by the BPF and HostScanner components. This separation can lead to small timing differences in which one component has built a new globset while the other is still working on the old one.
Each component also handles creating these globsets when a change occurs to the configured paths, potentially diverging in how they are handled by future changes.
In order to improve coherence between the components, we should move the globset into host_scanner::Reloader, surround it in a watch channel and send updates directly to the required components. This could even be done by expanding the current paths watch channel to hold both the paths and the globset in a tuple.
There's currently two instances of paths globsets being held by the BPF and HostScanner components. This separation can lead to small timing differences in which one component has built a new globset while the other is still working on the old one.
Each component also handles creating these globsets when a change occurs to the configured paths, potentially diverging in how they are handled by future changes.
In order to improve coherence between the components, we should move the globset into
host_scanner::Reloader, surround it in awatchchannel and send updates directly to the required components. This could even be done by expanding the currentpathswatch channel to hold both the paths and the globset in a tuple.