-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed AbortAction namespace and directory to be consistent with oth…
…er core extensions, set a default wait time of 5 second, minor changes. Signed-off-by: Kevin Baichoo <kbaichoo@google.com>
- Loading branch information
Showing
19 changed files
with
64 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
5 changes: 3 additions & 2 deletions
5
...g/abort_action/v3alpha/abort_action.proto → ...envoy/watchdog/v3alpha/abort_action.proto
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 3 additions & 8 deletions
11
...mmon/watchdog/abort_action/abort_action.h → source/common/watchdog/abort_action.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,29 @@ | ||
#pragma once | ||
|
||
#include <chrono> | ||
|
||
#include "envoy/server/guarddog_config.h" | ||
#include "envoy/thread/thread.h" | ||
#include "envoy/watchdog/abort_action/v3alpha/abort_action.pb.h" | ||
#include "envoy/watchdog/v3alpha/abort_action.pb.h" | ||
|
||
namespace Envoy { | ||
namespace Watchdog { | ||
namespace AbortAction { | ||
|
||
/** | ||
* A GuardDogAction that will terminate the process by killing the | ||
* stuck thread. | ||
*/ | ||
class AbortAction : public Server::Configuration::GuardDogAction { | ||
public: | ||
AbortAction(envoy::watchdog::abort_action::v3alpha::AbortActionConfig& config, | ||
AbortAction(envoy::watchdog::v3alpha::AbortActionConfig& config, | ||
Server::Configuration::GuardDogActionFactoryContext& context); | ||
|
||
void run(envoy::config::bootstrap::v3::Watchdog::WatchdogAction::WatchdogEvent event, | ||
const std::vector<std::pair<Thread::ThreadId, MonotonicTime>>& thread_last_checkin_pairs, | ||
MonotonicTime now) override; | ||
|
||
private: | ||
const envoy::watchdog::abort_action::v3alpha::AbortActionConfig config_; | ||
const absl::Duration wait_duration_; | ||
}; | ||
|
||
using AbortActionPtr = std::unique_ptr<AbortAction>; | ||
|
||
} // namespace AbortAction | ||
} // namespace Watchdog | ||
} // namespace Envoy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.