Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http: support route mutability #15266

Merged
merged 86 commits into from Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from 82 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
102f429
init
mengmichael1 Feb 9, 2021
d0d0dc7
testing clang pre push
mengmichael1 Feb 9, 2021
b6c915e
Merge remote-tracking branch 'upstream/main' into mmeng-patch
mengmichael1 Feb 9, 2021
afff58a
make sharedptr RouteImpl instead of casting
mengmichael1 Feb 10, 2021
ae46a70
spelling prepush lint
mengmichael1 Feb 10, 2021
47ff663
add setRoute impl for conn manager impl
mengmichael1 Feb 11, 2021
828f622
setRoute impl for async client
mengmichael1 Feb 11, 2021
183c9db
check_format lint
mengmichael1 Feb 11, 2021
a0482e1
add setRoute into filter_manager ActiveStreamFilterBase
mengmichael1 Feb 11, 2021
5a47c50
add FilterSetRoute unit test, fix setRoute in conn manager impl
mengmichael1 Feb 18, 2021
f9dd462
spelling
mengmichael1 Feb 18, 2021
72149ba
add DelegatingRoute class
mengmichael1 Feb 19, 2021
6ce6f25
Merge remote-tracking branch 'upstream/main' into mmeng-patch
mengmichael1 Feb 19, 2021
125be46
add DelegatingRouteEntry class
mengmichael1 Feb 23, 2021
347ccb6
use setRoute as helper to refreshCachedRoute
mengmichael1 Feb 23, 2021
75d2b9f
add DelegatingRoute child classes for testing
mengmichael1 Feb 24, 2021
6adc0be
fix import
mengmichael1 Feb 24, 2021
529ee21
lint
mengmichael1 Feb 24, 2021
528baf0
add FilterSetDelegatingRoute test
mengmichael1 Feb 25, 2021
22f36bb
standardize eq checks in unit test
mengmichael1 Feb 25, 2021
4362081
use make_shared instead of shared_ptr to new obj
mengmichael1 Feb 26, 2021
fbfe11a
rm setRoute impl in async client
mengmichael1 Feb 26, 2021
f990290
first attempt at integration test
mengmichael1 Mar 1, 2021
d801fdb
lint
mengmichael1 Mar 1, 2021
2f2b53e
add setRoute info into Life of a Request docs
mengmichael1 Mar 1, 2021
8c716e5
fixing up set route filter int test
mengmichael1 Mar 2, 2021
06f36a1
int test: don't wait for next upstream rq
mengmichael1 Mar 2, 2021
6b2144b
spell prepush lint
mengmichael1 Mar 2, 2021
19f4936
Merge remote-tracking branch 'upstream/main' into mmeng-patch
mengmichael1 Mar 2, 2021
ffe478e
clean up int test
mengmichael1 Mar 2, 2021
e9fd1ce
Merge remote-tracking branch 'upstream/main' into mmeng-patch
mengmichael1 Mar 3, 2021
50a8401
change setRoute RouteConstSharedPtr to reference param
mengmichael1 Mar 4, 2021
1cd072f
pr nits
mengmichael1 Mar 4, 2021
b29e7c2
pass RouteEntry ref instead of ptr in DelegatingRouteEntry constructor
mengmichael1 Mar 5, 2021
1aa0502
lint
mengmichael1 Mar 5, 2021
b6276f6
add nullptr checks for DelegatingRoute base_route_
mengmichael1 Mar 5, 2021
37012ad
update setRoute API to take in RouteConstSharedPtr as value parameter
mengmichael1 Mar 5, 2021
27c42ce
refactor DelegatingRouteEntry to delegate to Route instead of RouteEntry
mengmichael1 Mar 5, 2021
72d2faf
setRoute ref param to value param, in filter_manager
mengmichael1 Mar 6, 2021
9aa79ab
update tests to use new DelegatingRouteEntry class
mengmichael1 Mar 6, 2021
4c8e9a7
Merge remote-tracking branch 'upstream/main' into mmeng-patch
mengmichael1 Mar 8, 2021
d481e6a
add new virtual methods of RouteEntry
mengmichael1 Mar 8, 2021
a2ce4ac
format lint
mengmichael1 Mar 9, 2021
4970caf
add comments into unit test
mengmichael1 Mar 10, 2021
cf2d15b
spelling lint
mengmichael1 Mar 10, 2021
353355b
unit test iteration: separate router filter from decoder filter
mengmichael1 Mar 12, 2021
87116e5
fixup hcm unit test continued
mengmichael1 Mar 15, 2021
4b42f60
change clusterName mock expect call times to 2, unit test now passing…
mengmichael1 Mar 16, 2021
9977930
Merge remote-tracking branch 'upstream/main' into mmeng-patch
mengmichael1 Mar 16, 2021
a91561f
update DelegatingRouteEntry method overrides
mengmichael1 Mar 16, 2021
a09e41a
new shiny int test
mengmichael1 Mar 18, 2021
4fc4034
add ipv6 conditional to int test
mengmichael1 Mar 18, 2021
db21a35
merge upstream, resolve merge conflict with conn_manager_impl_test lib
mengmichael1 Mar 18, 2021
942088f
brackets save the day for ipv6
mengmichael1 Mar 19, 2021
def2f67
add in setRoute mocks
mengmichael1 Mar 19, 2021
e0b70f6
add mock into encoder callbacks as well
mengmichael1 Mar 19, 2021
d272932
exclude upstream http3
mengmichael1 Mar 19, 2021
9560377
modularize ExampleDerivedDelegatingRoute to share between unit and in…
mengmichael1 Mar 23, 2021
54afe69
use std move
mengmichael1 Mar 23, 2021
97e0123
nits, int test comment on ORIGINAL DST
mengmichael1 Mar 23, 2021
dbd0d4c
rm std move to fix null seg fault in tests
mengmichael1 Mar 24, 2021
951f4ff
int test: initialize before accessing fake_upstreams_
mengmichael1 Mar 24, 2021
dfbb27f
add comment about passing in nullptr to setRoute
mengmichael1 Mar 25, 2021
5e99368
stdmove in delegating route utility
mengmichael1 Mar 25, 2021
b5dd2b1
add FilterSetRouteToNullPtr test for clearRouteCache parity
mengmichael1 Mar 25, 2021
385a931
Merge remote-tracking branch 'upstream/main' into mmeng-patch
mengmichael1 Mar 25, 2021
9012f54
differentiate b/w setRoute(nullptr) and clearRouteCache() in comments…
mengmichael1 Mar 29, 2021
a1f28d1
Merge remote-tracking branch 'upstream/main' into mmeng-patch
mengmichael1 Mar 29, 2021
748d269
spelling lint
mengmichael1 Mar 29, 2021
b741fd2
update test names in comments
mengmichael1 Mar 30, 2021
1f2b5df
int test WIP: pushing up for debugging
mengmichael1 Mar 31, 2021
3dd2256
clean up protocol int test
mengmichael1 Mar 31, 2021
090fd05
move int test out of protocol into sep test
mengmichael1 Apr 1, 2021
d307276
resolve merge conflict w upstream: int test BUILD
mengmichael1 Apr 1, 2021
b5fc3ed
rm reference to lyft
mengmichael1 Apr 1, 2021
cbdea10
start on DelegatingRouteEntryAllCalls unit test: mocks setup
mengmichael1 Apr 6, 2021
54c15eb
add unit test coverage for all routeEntry delegated methods
mengmichael1 Apr 7, 2021
5fa8e6f
int test: use access log to check upstream cluster, use localAddress …
mengmichael1 Apr 7, 2021
574a90c
move int test from separate file into integration_test
mengmichael1 Apr 7, 2021
0b44130
Merge remote-tracking branch 'upstream/main' into mmeng-patch
mengmichael1 Apr 7, 2021
e8e6867
fix routeEntry virtualHost assert
mengmichael1 Apr 8, 2021
07ac1b9
add docs about route mutation into arch_overview http filters
mengmichael1 Apr 8, 2021
fe30a8e
Merge remote-tracking branch 'upstream/main' into mmeng-patch
mengmichael1 Apr 8, 2021
d730810
add release notes into 1.18.0
mengmichael1 Apr 8, 2021
032792b
ensure orig dst ip addr is localhost and not 0.0.0.0 for windows
mengmichael1 Apr 9, 2021
92f250d
getLoopbackAddressUrlString
mengmichael1 Apr 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/root/intro/arch_overview/http/http_filters.rst
Expand Up @@ -48,3 +48,26 @@ decoder/encoder filters):
The connection manager will invoke decoder filters in the order: ``A``, ``B``, ``C``.
On the other hand, the connection manager will invoke encoder filters in the **reverse**
order: ``C``, ``B``, ``A``.

.. _arch_overview_http_filters_route_mutation:

Filter route mutation
---------------------

During HTTP filter chain processing, when ``decodeHeaders()`` is invoked by a filter, the
connection manager performs route resolution and sets a *cached route* pointing to an upstream
cluster.

Filters have the capability to directly mutate this *cached route* after route resolution, via the
``setRoute`` callback and :repo:`DelegatingRoute <source/common/router/delegating_route_impl.h>`
mechanism. A filter may create a derived/child class of ``DelegatingRoute`` to override specific
methods (for example, the route’s timeout value or the route entry’s cluster name) while preserving
the rest of the properties/behavior of the base route that the ``DelegatingRoute`` wraps around.
Then, ``setRoute`` can be invoked to manually set the cached route to this ``DelegatingRoute``
instance. An example of such a derived class can be found in :repo:`ExampleDerivedDelegatingRoute
<test/test_common/delegating_route_utility.h>`.

If no other filters in the chain modify the cached route selection (for example, a common operation
that filters do is ``clearRouteCache()``, and ``setRoute`` will not survive that), this route
selection makes it way to the router filter which finalizes the upstream cluster that the request
will get forwarded to.
5 changes: 3 additions & 2 deletions docs/root/intro/life_of_a_request.rst
Expand Up @@ -434,8 +434,9 @@ When ``decodeHeaders()`` is invoked on the :ref:`router <arch_overview_http_rout
route selection is finalized and a cluster is picked. The HCM selects a route from its
``RouteConfiguration`` at the start of HTTP filter chain execution. This is referred to as the
*cached route*. Filters may modify headers and cause a new route to be selected, by asking HCM to
clear the route cache and requesting HCM to reevaluate the route selection. When the router filter
is invoked, the route is finalized. The selected route’s configuration will point at an upstream
clear the route cache and requesting HCM to reevaluate the route selection. Filters may also
directly set this cached route selection via a `setRoute` callback. When the router filter is
invoked, the route is finalized. The selected route’s configuration will point at an upstream
cluster name. The router filter then asks the `ClusterManager` for an HTTP :ref:`connection pool
<arch_overview_conn_pool>` for the cluster. This involves load balancing and the connection pool,
discussed in the next section.
Expand Down
18 changes: 18 additions & 0 deletions include/envoy/http/filter.h
Expand Up @@ -225,6 +225,24 @@ class StreamFilterCallbacks {
*/
virtual Router::RouteConstSharedPtr route(const Router::RouteCallback& cb) PURE;

/**
* Sets the cached route for the current request to the passed-in RouteConstSharedPtr parameter.
*
* Similar to route(const Router::RouteCallback& cb), this route that is set will be
* overridden by clearRouteCache() in subsequent filters. Usage is intended for filters at the end
* of the filter chain.
*
* NOTE: Passing nullptr in as the route parameter is equivalent to route resolution being
* attempted and failing to find a route. An example of when this happens is when
* RouteConstSharedPtr route(const RouteCallback& cb, const Http::RequestHeaderMap& headers, const
* StreamInfo::StreamInfo& stream_info, uint64_t random_value) returns nullptr during a
* refreshCachedRoute. It is important to note that setRoute(nullptr) is different from a
* clearRouteCache(), because clearRouteCache() wants route resolution to be attempted again.
* clearRouteCache() achieves this by setting cached_route_ and cached_cluster_info_ to
* absl::optional ptrs instead of null ptrs.
*/
virtual void setRoute(Router::RouteConstSharedPtr route) PURE;
mengmichael1 marked this conversation as resolved.
Show resolved Hide resolved

/**
* Returns the clusterInfo for the cached route.
* This method is to avoid multiple look ups in the filter chain, it also provides a consistent
Expand Down
1 change: 1 addition & 0 deletions source/common/http/async_client_impl.h
Expand Up @@ -361,6 +361,7 @@ class AsyncStreamImpl : public AsyncClient::Stream,
Router::RouteConstSharedPtr route(const Router::RouteCallback&) override {
NOT_IMPLEMENTED_GCOVR_EXCL_LINE;
}
void setRoute(Router::RouteConstSharedPtr) override { NOT_IMPLEMENTED_GCOVR_EXCL_LINE; }
Upstream::ClusterInfoConstSharedPtr clusterInfo() override { return parent_.cluster_; }
void clearRouteCache() override {}
uint64_t streamId() const override { return stream_id_; }
Expand Down
39 changes: 26 additions & 13 deletions source/common/http/conn_manager_impl.cc
Expand Up @@ -1263,20 +1263,8 @@ void ConnectionManagerImpl::ActiveStream::refreshCachedRoute(const Router::Route
stream_id_);
}
}
filter_manager_.streamInfo().route_entry_ = route ? route->routeEntry() : nullptr;
cached_route_ = std::move(route);
if (nullptr == filter_manager_.streamInfo().route_entry_) {
cached_cluster_info_ = nullptr;
} else {
Upstream::ThreadLocalCluster* local_cluster =
connection_manager_.cluster_manager_.getThreadLocalCluster(
filter_manager_.streamInfo().route_entry_->clusterName());
cached_cluster_info_ = (nullptr == local_cluster) ? nullptr : local_cluster->info();
}

filter_manager_.streamInfo().setUpstreamClusterInfo(cached_cluster_info_.value());
refreshCachedTracingCustomTags();
refreshDurationTimeout();
setRoute(route);
}

void ConnectionManagerImpl::ActiveStream::refreshCachedTracingCustomTags() {
Expand Down Expand Up @@ -1590,6 +1578,31 @@ ConnectionManagerImpl::ActiveStream::route(const Router::RouteCallback& cb) {
return cached_route_.value();
}

/**
* Sets the cached route to the RouteConstSharedPtr argument passed in. Handles setting the
* cached_route_/cached_cluster_info_ ActiveStream attributes, the FilterManager streamInfo, tracing
* tags, and timeouts.
*
* Declared as a StreamFilterCallbacks member function for filters to call directly, but also
* functions as a helper to refreshCachedRoute(const Router::RouteCallback& cb).
*/
void ConnectionManagerImpl::ActiveStream::setRoute(Router::RouteConstSharedPtr route) {
filter_manager_.streamInfo().route_entry_ = route ? route->routeEntry() : nullptr;
cached_route_ = std::move(route);
if (nullptr == filter_manager_.streamInfo().route_entry_) {
cached_cluster_info_ = nullptr;
} else {
Upstream::ThreadLocalCluster* local_cluster =
connection_manager_.cluster_manager_.getThreadLocalCluster(
filter_manager_.streamInfo().route_entry_->clusterName());
cached_cluster_info_ = (nullptr == local_cluster) ? nullptr : local_cluster->info();
}

filter_manager_.streamInfo().setUpstreamClusterInfo(cached_cluster_info_.value());
refreshCachedTracingCustomTags();
refreshDurationTimeout();
}

void ConnectionManagerImpl::ActiveStream::clearRouteCache() {
cached_route_ = absl::optional<Router::RouteConstSharedPtr>();
cached_cluster_info_ = absl::optional<Upstream::ClusterInfoConstSharedPtr>();
Expand Down
1 change: 1 addition & 0 deletions source/common/http/conn_manager_impl.h
Expand Up @@ -270,6 +270,7 @@ class ConnectionManagerImpl : Logger::Loggable<Logger::Id::http>,
const Router::RouteEntry::UpgradeMap* upgradeMap() override;
Upstream::ClusterInfoConstSharedPtr clusterInfo() override;
Router::RouteConstSharedPtr route(const Router::RouteCallback& cb) override;
void setRoute(Router::RouteConstSharedPtr route) override;
void clearRouteCache() override;
absl::optional<Router::ConfigConstSharedPtr> routeConfig() override;
Tracing::Span& activeSpan() override;
Expand Down
4 changes: 4 additions & 0 deletions source/common/http/filter_manager.cc
Expand Up @@ -242,6 +242,10 @@ Router::RouteConstSharedPtr ActiveStreamFilterBase::route(const Router::RouteCal
return parent_.filter_manager_callbacks_.route(cb);
}

void ActiveStreamFilterBase::setRoute(Router::RouteConstSharedPtr route) {
parent_.filter_manager_callbacks_.setRoute(std::move(route));
}

void ActiveStreamFilterBase::clearRouteCache() {
parent_.filter_manager_callbacks_.clearRouteCache();
}
Expand Down
6 changes: 6 additions & 0 deletions source/common/http/filter_manager.h
Expand Up @@ -133,6 +133,7 @@ struct ActiveStreamFilterBase : public virtual StreamFilterCallbacks,
void resetStream() override;
Router::RouteConstSharedPtr route() override;
Router::RouteConstSharedPtr route(const Router::RouteCallback& cb) override;
void setRoute(Router::RouteConstSharedPtr route) override;
Upstream::ClusterInfoConstSharedPtr clusterInfo() override;
void clearRouteCache() override;
uint64_t streamId() const override;
Expand Down Expand Up @@ -510,6 +511,11 @@ class FilterManagerCallbacks {
*/
virtual Router::RouteConstSharedPtr route(const Router::RouteCallback& cb) PURE;

/**
* Sets the current route.
*/
virtual void setRoute(Router::RouteConstSharedPtr route) PURE;

/**
* Clears the cached route.
*/
Expand Down
9 changes: 9 additions & 0 deletions source/common/router/BUILD
Expand Up @@ -417,3 +417,12 @@ envoy_cc_library(
"//include/envoy/router:string_accessor_interface",
],
)

envoy_cc_library(
name = "delegating_route_lib",
srcs = ["delegating_route_impl.cc"],
hdrs = ["delegating_route_impl.h"],
deps = [
"//include/envoy/router:router_interface",
],
)
188 changes: 188 additions & 0 deletions source/common/router/delegating_route_impl.cc
@@ -0,0 +1,188 @@
#include "common/router/delegating_route_impl.h"

namespace Envoy {
namespace Router {

// Router::DelegatingRoute
const DirectResponseEntry* DelegatingRoute::directResponseEntry() const {
return base_route_->directResponseEntry();
}

const RouteEntry* DelegatingRoute::routeEntry() const { return base_route_->routeEntry(); }

const Decorator* DelegatingRoute::decorator() const { return base_route_->decorator(); }

const RouteTracing* DelegatingRoute::tracingConfig() const { return base_route_->tracingConfig(); }

const RouteSpecificFilterConfig* DelegatingRoute::perFilterConfig(const std::string& name) const {
return base_route_->perFilterConfig(name);
}

// Router:DelegatingRouteEntry
void DelegatingRouteEntry::finalizeResponseHeaders(
Http::ResponseHeaderMap& headers, const StreamInfo::StreamInfo& stream_info) const {
return base_route_->routeEntry()->finalizeResponseHeaders(headers, stream_info);
}

Http::HeaderTransforms
DelegatingRouteEntry::responseHeaderTransforms(const StreamInfo::StreamInfo& stream_info) const {
return base_route_->routeEntry()->responseHeaderTransforms(stream_info);
}

const std::string& DelegatingRouteEntry::clusterName() const {
return base_route_->routeEntry()->clusterName();
}

Http::Code DelegatingRouteEntry::clusterNotFoundResponseCode() const {
return base_route_->routeEntry()->clusterNotFoundResponseCode();
}

const CorsPolicy* DelegatingRouteEntry::corsPolicy() const {
return base_route_->routeEntry()->corsPolicy();
}

absl::optional<std::string>
DelegatingRouteEntry::currentUrlPathAfterRewrite(const Http::RequestHeaderMap& headers) const {
return base_route_->routeEntry()->currentUrlPathAfterRewrite(headers);
}

void DelegatingRouteEntry::finalizeRequestHeaders(Http::RequestHeaderMap& headers,
const StreamInfo::StreamInfo& stream_info,
bool insert_envoy_original_path) const {
return base_route_->routeEntry()->finalizeRequestHeaders(headers, stream_info,
mengmichael1 marked this conversation as resolved.
Show resolved Hide resolved
insert_envoy_original_path);
}

const Http::HashPolicy* DelegatingRouteEntry::hashPolicy() const {
return base_route_->routeEntry()->hashPolicy();
}

const HedgePolicy& DelegatingRouteEntry::hedgePolicy() const {
return base_route_->routeEntry()->hedgePolicy();
}

Upstream::ResourcePriority DelegatingRouteEntry::priority() const {
return base_route_->routeEntry()->priority();
}

const RateLimitPolicy& DelegatingRouteEntry::rateLimitPolicy() const {
return base_route_->routeEntry()->rateLimitPolicy();
}

const RetryPolicy& DelegatingRouteEntry::retryPolicy() const {
return base_route_->routeEntry()->retryPolicy();
}

const InternalRedirectPolicy& DelegatingRouteEntry::internalRedirectPolicy() const {
return base_route_->routeEntry()->internalRedirectPolicy();
}

uint32_t DelegatingRouteEntry::retryShadowBufferLimit() const {
return base_route_->routeEntry()->retryShadowBufferLimit();
}

const std::vector<Router::ShadowPolicyPtr>& DelegatingRouteEntry::shadowPolicies() const {
return base_route_->routeEntry()->shadowPolicies();
}

std::chrono::milliseconds DelegatingRouteEntry::timeout() const {
return base_route_->routeEntry()->timeout();
}

absl::optional<std::chrono::milliseconds> DelegatingRouteEntry::idleTimeout() const {
return base_route_->routeEntry()->idleTimeout();
}

bool DelegatingRouteEntry::usingNewTimeouts() const {
return base_route_->routeEntry()->usingNewTimeouts();
}

absl::optional<std::chrono::milliseconds> DelegatingRouteEntry::maxStreamDuration() const {
return base_route_->routeEntry()->maxStreamDuration();
}

absl::optional<std::chrono::milliseconds> DelegatingRouteEntry::grpcTimeoutHeaderMax() const {
return base_route_->routeEntry()->grpcTimeoutHeaderMax();
}

absl::optional<std::chrono::milliseconds> DelegatingRouteEntry::grpcTimeoutHeaderOffset() const {
return base_route_->routeEntry()->grpcTimeoutHeaderOffset();
}

absl::optional<std::chrono::milliseconds> DelegatingRouteEntry::maxGrpcTimeout() const {
return base_route_->routeEntry()->maxGrpcTimeout();
}

absl::optional<std::chrono::milliseconds> DelegatingRouteEntry::grpcTimeoutOffset() const {
return base_route_->routeEntry()->grpcTimeoutOffset();
}

const VirtualCluster* DelegatingRouteEntry::virtualCluster(const Http::HeaderMap& headers) const {
return base_route_->routeEntry()->virtualCluster(headers);
}

const VirtualHost& DelegatingRouteEntry::virtualHost() const {
return base_route_->routeEntry()->virtualHost();
}

bool DelegatingRouteEntry::autoHostRewrite() const {
return base_route_->routeEntry()->autoHostRewrite();
}

const MetadataMatchCriteria* DelegatingRouteEntry::metadataMatchCriteria() const {
return base_route_->routeEntry()->metadataMatchCriteria();
}

const std::multimap<std::string, std::string>& DelegatingRouteEntry::opaqueConfig() const {
return base_route_->routeEntry()->opaqueConfig();
}

bool DelegatingRouteEntry::includeVirtualHostRateLimits() const {
return base_route_->routeEntry()->includeVirtualHostRateLimits();
}

const Envoy::Config::TypedMetadata& DelegatingRouteEntry::typedMetadata() const {
return base_route_->routeEntry()->typedMetadata();
}

const envoy::config::core::v3::Metadata& DelegatingRouteEntry::metadata() const {
return base_route_->routeEntry()->metadata();
}

const TlsContextMatchCriteria* DelegatingRouteEntry::tlsContextMatchCriteria() const {
return base_route_->routeEntry()->tlsContextMatchCriteria();
}

const PathMatchCriterion& DelegatingRouteEntry::pathMatchCriterion() const {
return base_route_->routeEntry()->pathMatchCriterion();
}

const RouteSpecificFilterConfig*
DelegatingRouteEntry::perFilterConfig(const std::string& name) const {
return base_route_->routeEntry()->perFilterConfig(name);
}

bool DelegatingRouteEntry::includeAttemptCountInRequest() const {
return base_route_->routeEntry()->includeAttemptCountInRequest();
}

bool DelegatingRouteEntry::includeAttemptCountInResponse() const {
return base_route_->routeEntry()->includeAttemptCountInResponse();
}

using UpgradeMap = std::map<std::string, bool>;
const UpgradeMap& DelegatingRouteEntry::upgradeMap() const {
return base_route_->routeEntry()->upgradeMap();
}

using ConnectConfig = envoy::config::route::v3::RouteAction::UpgradeConfig::ConnectConfig;
const absl::optional<ConnectConfig>& DelegatingRouteEntry::connectConfig() const {
return base_route_->routeEntry()->connectConfig();
}

const std::string& DelegatingRouteEntry::routeName() const {
return base_route_->routeEntry()->routeName();
}

} // namespace Router
} // namespace Envoy