/proc/self/cwd/source/server/config_validation/cluster_manager.cc
Line | Count | Source (jump to first uncovered line) |
1 | | #include "source/server/config_validation/cluster_manager.h" |
2 | | |
3 | | #include "envoy/config/bootstrap/v3/bootstrap.pb.h" |
4 | | #include "envoy/config/core/v3/config_source.pb.h" |
5 | | |
6 | | #include "source/common/common/utility.h" |
7 | | |
8 | | namespace Envoy { |
9 | | namespace Upstream { |
10 | | |
11 | | ClusterManagerPtr ValidationClusterManagerFactory::clusterManagerFromProto( |
12 | 0 | const envoy::config::bootstrap::v3::Bootstrap& bootstrap) { |
13 | 0 | auto cluster_manager = std::unique_ptr<ValidationClusterManager>{new ValidationClusterManager( |
14 | 0 | bootstrap, *this, stats_, tls_, context_.runtime(), context_.localInfo(), |
15 | 0 | context_.accessLogManager(), context_.mainThreadDispatcher(), context_.admin(), |
16 | 0 | context_.messageValidationContext(), context_.api(), http_context_, context_.grpcContext(), |
17 | 0 | context_.routerContext(), server_)}; |
18 | 0 | cluster_manager->init(bootstrap); |
19 | 0 | return cluster_manager; |
20 | 0 | } |
21 | | |
22 | | CdsApiPtr ValidationClusterManagerFactory::createCds( |
23 | | const envoy::config::core::v3::ConfigSource& cds_config, |
24 | 0 | const xds::core::v3::ResourceLocator* cds_resources_locator, ClusterManager& cm) { |
25 | | // Create the CdsApiImpl... |
26 | 0 | ProdClusterManagerFactory::createCds(cds_config, cds_resources_locator, cm); |
27 | | // ... and then throw it away, so that we don't actually connect to it. |
28 | 0 | return nullptr; |
29 | 0 | } |
30 | | |
31 | | } // namespace Upstream |
32 | | } // namespace Envoy |