Set us up for Search Engine experiments - Introduce an event dispatcher #1957
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
A search engine would like to receive online updates as there are changes to data. This change enables that functionality.
PR
Introduce package event with a dispatcher subsystem. Add this to the
manager and to the plugin subsystem.
Whenever the plugin subsystem execute a PostHook, we dispatch an
Change event on the event dispatcher bus. This currently has no
effect, but allows us to register subsystems on the event bus for
further processing. In particular, search.
By design, we opt to hook the plugin system and pass to the event bus
for now. One, it makes it easier to remove again, and two, the context
handling inside the plugin subsystem doesn't want to live on the
other side of an event bus.
While here, write a test for the dispatcher code.