Skip to content
API Documentation
BastionGuard™
MultiEventSink.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
3
5
7{
8 sinks_.emplace_back(sink);
9}
10
11void MultiEventSink::onEvent(const rg_event& event) noexcept
12{
13 for (IEventSink& sink : sinks_) {
14 try {
15 sink.onEvent(event);
16 } catch (...) {
17 // Isolate sinks from each other.
18 }
19 }
20}
21
22} // namespace bastionguard::rootguard
void onEvent(const rg_event &event) noexcept override
std::vector< std::reference_wrapper< IEventSink > > sinks_