-
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.
Merge branch 'master' into fix/ext_authz_dns_san
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
- Loading branch information
Showing
66 changed files
with
533 additions
and
131 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
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,24 @@ | ||
#include "common/stats/symbol_table_creator.h" | ||
|
||
namespace Envoy { | ||
namespace Stats { | ||
|
||
bool SymbolTableCreator::initialized_ = false; | ||
bool SymbolTableCreator::use_fake_symbol_tables_ = true; | ||
|
||
SymbolTablePtr SymbolTableCreator::initAndMakeSymbolTable(bool use_fake) { | ||
ASSERT(!initialized_ || (use_fake_symbol_tables_ == use_fake)); | ||
use_fake_symbol_tables_ = use_fake; | ||
return makeSymbolTable(); | ||
} | ||
|
||
SymbolTablePtr SymbolTableCreator::makeSymbolTable() { | ||
initialized_ = true; | ||
if (use_fake_symbol_tables_) { | ||
return std::make_unique<FakeSymbolTableImpl>(); | ||
} | ||
return std::make_unique<SymbolTableImpl>(); | ||
} | ||
|
||
} // namespace Stats | ||
} // 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#pragma once | ||
|
||
#include "common/stats/fake_symbol_table_impl.h" | ||
#include "common/stats/symbol_table_impl.h" | ||
|
||
namespace Envoy { | ||
namespace Stats { | ||
|
||
namespace TestUtil { | ||
class SymbolTableCreatorTestPeer; | ||
} | ||
|
||
class SymbolTableCreator { | ||
public: | ||
/** | ||
* Initializes the symbol-table creation system. Once this is called, it is a | ||
* runtime assertion to call this again in production code, changing the | ||
* use_fakes setting. However, tests can change the setting via | ||
* TestUtil::SymbolTableCreatorTestPeer::setUseFakeSymbolTables(use_fakes). | ||
* | ||
* @param use_fakes Whether to use fake symbol tables; typically from a command-line option. | ||
* @return a SymbolTable. | ||
*/ | ||
static SymbolTablePtr initAndMakeSymbolTable(bool use_fakes); | ||
|
||
/** | ||
* Factory method to create SymbolTables. This is needed to help make it | ||
* possible to flag-flip use of real symbol tables, and ultimately should be | ||
* removed. | ||
* | ||
* @return a SymbolTable. | ||
*/ | ||
static SymbolTablePtr makeSymbolTable(); | ||
|
||
/** | ||
* @return whether the system is initialized to use fake symbol tables. | ||
*/ | ||
static bool useFakeSymbolTables() { return use_fake_symbol_tables_; } | ||
|
||
private: | ||
friend class TestUtil::SymbolTableCreatorTestPeer; | ||
|
||
/** | ||
* Sets whether fake or real symbol tables should be used. Tests that alter | ||
* this should restore previous value at the end of the test. This must be | ||
* called via TestUtil::SymbolTableCreatorTestPeer. | ||
* | ||
* *param use_fakes whether to use fake symbol tables. | ||
*/ | ||
static void setUseFakeSymbolTables(bool use_fakes) { use_fake_symbol_tables_ = use_fakes; } | ||
|
||
static bool initialized_; | ||
static bool use_fake_symbol_tables_; | ||
}; | ||
|
||
} // namespace Stats | ||
} // 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
Oops, something went wrong.