Status: Need more Info
Affects Version/s: None
Fix Version/s: None
The idea stemmed from a discussion on the help list.
- Native event handling will make event-driven policy easier. This is for the cases where you don't know in advance all the things you need to do, and you may not even be able to do them yet.
- Clearing events would be the same as canceling a class. Event handlers would be special because they are called when an event is created, and consume (cancel) the event.
- Consuming an event doesn't prevent it from being consumed again, if it's created again. In CFEngine terms, events are divergent and convergence clears them.
Potential Use cases:
- TAP and jUnit tests
- restart daemons like systemd once even though multiple files require it across multiple bundles
- send messages to the user once instead of N times
- respond to a change in state across libraries (especially when you don't own some of them!) through a common event API
- collect data from multiple sources in policy to build a single data structure, e.g. make a list of all the users added in multiple bundles in order to record that list for auditing
- supply internal C handlers in the agent for some specific events, providing a loosely coupled "dropbox" API
...plus more interesting phase 2 possibilities if we can develop a message bus. Like hub orchestration across hosts, integration with imperative tools like Ansible, and swarm behavior where hosts coordinate with each other without central authority.