/proc/self/cwd/source/common/watchdog/abort_action_config.cc
Line | Count | Source |
1 | | #include "source/common/watchdog/abort_action_config.h" |
2 | | |
3 | | #include "envoy/registry/registry.h" |
4 | | |
5 | | #include "source/common/config/utility.h" |
6 | | #include "source/common/protobuf/message_validator_impl.h" |
7 | | #include "source/common/watchdog/abort_action.h" |
8 | | |
9 | | namespace Envoy { |
10 | | namespace Watchdog { |
11 | | |
12 | | Server::Configuration::GuardDogActionPtr AbortActionFactory::createGuardDogActionFromProto( |
13 | | const envoy::config::bootstrap::v3::Watchdog::WatchdogAction& config, |
14 | 20 | Server::Configuration::GuardDogActionFactoryContext& context) { |
15 | 20 | AbortActionConfig message; |
16 | 20 | Config::Utility::translateOpaqueConfig(config.config().typed_config(), |
17 | 20 | ProtobufMessage::getStrictValidationVisitor(), message); |
18 | 20 | return std::make_unique<AbortAction>(message, context); |
19 | 20 | } |
20 | | |
21 | | /** |
22 | | * Static registration for the Abort Action factory. @see RegisterFactory. |
23 | | */ |
24 | | REGISTER_FACTORY(AbortActionFactory, Server::Configuration::GuardDogActionFactory); |
25 | | |
26 | | } // namespace Watchdog |
27 | | } // namespace Envoy |