Skip to content

Commit

Permalink
code-cleanup: move static string declaration scope
Browse files Browse the repository at this point in the history
Signed-off-by: Adi Suissa-Peleg <adip@google.com>
  • Loading branch information
adisuissa committed Sep 5, 2024
1 parent c85c065 commit 3b95c53
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/common/http/conn_manager_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,10 @@ absl::optional<uint64_t> ConnectionManagerImpl::HttpStreamIdProviderImpl::toInte
*parent_.request_headers_);
}

namespace {
static const std::string kRouteFactoryName = "envoy.route_config_update_requester.default";
} // namespace

ConnectionManagerImpl::ActiveStream::ActiveStream(ConnectionManagerImpl& connection_manager,
uint32_t buffer_limit,
Buffer::BufferMemoryAccountSharedPtr account)
Expand Down Expand Up @@ -834,9 +838,8 @@ ConnectionManagerImpl::ActiveStream::ActiveStream(ConnectionManagerImpl& connect
connection_manager.config_->shouldSchemeMatchUpstream());

// TODO(chaoqin-li1123): can this be moved to the on demand filter?
static const std::string route_factory = "envoy.route_config_update_requester.default";
auto factory =
Envoy::Config::Utility::getFactoryByName<RouteConfigUpdateRequesterFactory>(route_factory);
auto factory = Envoy::Config::Utility::getFactoryByName<RouteConfigUpdateRequesterFactory>(
kRouteFactoryName);
if (connection_manager_.config_->isRoutable() &&
connection_manager.config_->routeConfigProvider() != nullptr && factory) {
route_config_update_requester_ = factory->createRouteConfigUpdateRequester(
Expand Down

0 comments on commit 3b95c53

Please sign in to comment.