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