forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: adding deprecation utilities (envoyproxy#5840)
Adding hooks for phase 2 of deprecation: fail-by-default features, and runtime overrides. _Risk Level_: Low (minimal refactors to core code) _Testing_: new unit tests TODO more tests _Docs Changes_: TODO docs on deprecation process _Release Notes_: n/a - will add a release note when we add existing config to deprecated Part of envoyproxy#5559 and envoyproxy#5693 Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Fred Douglas <fredlas@google.com>
- Loading branch information
1 parent
550a773
commit c753529
Showing
23 changed files
with
399 additions
and
55 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
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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
#include "common/singleton/const_singleton.h" | ||
|
||
#include "absl/container/flat_hash_set.h" | ||
|
||
namespace Envoy { | ||
namespace Runtime { | ||
|
||
const char* disallowed_features[] = { | ||
// Acts as both a test entry for deprecated.proto and a marker for the Envoy | ||
// deprecation scripts. | ||
"envoy.deprecated_features.deprecated.proto:is_deprecated_fatal", | ||
}; | ||
|
||
class DisallowedFeatures { | ||
public: | ||
DisallowedFeatures() { | ||
for (auto& feature : disallowed_features) { | ||
disallowed_features_.insert(feature); | ||
} | ||
} | ||
|
||
bool disallowedByDefault(const std::string& feature) const { | ||
return disallowed_features_.find(feature) != disallowed_features_.end(); | ||
} | ||
|
||
private: | ||
absl::flat_hash_set<std::string> disallowed_features_; | ||
}; | ||
|
||
using DisallowedFeaturesDefaults = ConstSingleton<DisallowedFeatures>; | ||
|
||
} // namespace Runtime | ||
} // 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
Oops, something went wrong.