Line data Source code
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 0 : Server::Configuration::GuardDogActionFactoryContext& context) { 15 0 : AbortActionConfig message; 16 0 : Config::Utility::translateOpaqueConfig(config.config().typed_config(), 17 0 : ProtobufMessage::getStrictValidationVisitor(), message); 18 0 : return std::make_unique<AbortAction>(message, context); 19 0 : } 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