Line data Source code
1 : #pragma once 2 : 3 : #include "envoy/registry/registry.h" 4 : #include "envoy/server/guarddog_config.h" 5 : #include "envoy/watchdog/v3/abort_action.pb.h" 6 : 7 : #include "source/common/protobuf/protobuf.h" 8 : 9 : namespace Envoy { 10 : namespace Watchdog { 11 : 12 : class AbortActionFactory : public Server::Configuration::GuardDogActionFactory { 13 : public: 14 13 : AbortActionFactory() = default; 15 : 16 : Server::Configuration::GuardDogActionPtr createGuardDogActionFromProto( 17 : const envoy::config::bootstrap::v3::Watchdog::WatchdogAction& config, 18 : Server::Configuration::GuardDogActionFactoryContext& context) override; 19 : 20 12 : ProtobufTypes::MessagePtr createEmptyConfigProto() override { 21 12 : return std::make_unique<AbortActionConfig>(); 22 12 : } 23 : 24 147 : std::string name() const override { return "envoy.watchdog.abort_action"; } 25 : 26 : using AbortActionConfig = envoy::watchdog::v3::AbortActionConfig; 27 : }; 28 : 29 : DECLARE_FACTORY(AbortActionFactory); 30 : 31 : } // namespace Watchdog 32 : } // namespace Envoy