MultiEventSink

1. Overview

The MultiEventSink.cpp file implements event fan-out to multiple registered RootGuard sinks.

The file integrates the following components, APIs, or runtime concepts:

  • MultiEventSink.hpp
  • IEventSink

2. Adding Sinks

add() appends a non-owning reference to the internal vector in registration order.


3. Forwarding Events

onEvent() invokes every downstream sink with the same event. Each invocation is individually wrapped in try/catch (...).


4. Failure Isolation

An exception from console, JSON, automatic-response wrapping, or another custom sink does not stop delivery to remaining sinks and cannot escape to the RootGuard engine callback.


5. Runtime and Security Considerations

  • Independent outputs: one faulty sink does not disable all event visibility.
  • Lifetime is external: stored references require downstream sinks to remain alive.