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

router: scoped RDS (2/4): support scoped routing configuration #5839

Closed
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
cdae885
Support scoped routing configuration.
AndresGuedez Feb 5, 2019
db48450
Derive test class from TestBase.
AndresGuedez Feb 5, 2019
756afcd
fix_format fixes.
AndresGuedez Feb 5, 2019
8e624ea
Merge remote-tracking branch 'upstream/master' into scoped-rds-inline…
AndresGuedez Feb 5, 2019
98149e5
Minor cleanup.
AndresGuedez Feb 5, 2019
76b7196
Fix srds.proto docs.
AndresGuedez Feb 5, 2019
f924eb7
Pendatic spelling and docs cleanup.
AndresGuedez Feb 6, 2019
51d8dff
fix_format.
AndresGuedez Feb 6, 2019
ccca775
More detailed documentation/examples for SRDS.
AndresGuedez Feb 27, 2019
e5d87db
fix_format.
AndresGuedez Feb 27, 2019
9c3d45b
Update pedantic spelling dictionary.
AndresGuedez Feb 27, 2019
afcc2a5
Clarify Scope.Key documentation.
AndresGuedez Feb 27, 2019
c774f00
Use EXPECT_NO_THROW() to validate successful allocation/construction.
AndresGuedez Feb 27, 2019
8cc1b13
fix_format.
AndresGuedez Feb 27, 2019
71f2a74
Modify SRDS to support delta updates and ease transition to incremental.
AndresGuedez Mar 23, 2019
5aed783
Support delta SRDS proto in integration test.
AndresGuedez Mar 29, 2019
15b1c7c
Cleanup.
AndresGuedez Apr 5, 2019
b216034
Add comments.
AndresGuedez Apr 10, 2019
c8f531b
Merge remote-tracking branch 'upstream/master' into scoped-rds-inline…
AndresGuedez Apr 11, 2019
39309ac
Fix build failures after master merge.
AndresGuedez Apr 12, 2019
8fe33ad
Cleanup and comments.
AndresGuedez Apr 12, 2019
8c38526
Fix format.
AndresGuedez Apr 12, 2019
dd2261c
Comments.
AndresGuedez Apr 13, 2019
a7a621b
Merge remote-tracking branch 'upstream/master' into scoped-rds-inline…
AndresGuedez Apr 15, 2019
090bbd8
Cleanup and minor refactor of ConfigProvider framework.
AndresGuedez Apr 16, 2019
8b8a5e7
clang-tidy cleanup.
AndresGuedez Apr 17, 2019
43c95e8
More clang-tidy cleanup.
AndresGuedez Apr 17, 2019
6adaa22
Fix build break.
AndresGuedez Apr 17, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/envoy/admin/v2alpha/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ api_proto_library_internal(
"//envoy/api/v2:cds",
"//envoy/api/v2:lds",
"//envoy/api/v2:rds",
"//envoy/api/v2:srds",
"//envoy/config/bootstrap/v2:bootstrap",
],
)
Expand Down
35 changes: 35 additions & 0 deletions api/envoy/admin/v2alpha/config_dump.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ option java_package = "io.envoyproxy.envoy.admin.v2alpha";
import "envoy/api/v2/cds.proto";
import "envoy/api/v2/lds.proto";
import "envoy/api/v2/rds.proto";
import "envoy/api/v2/srds.proto";
import "envoy/config/bootstrap/v2/bootstrap.proto";

import "google/protobuf/any.proto";
Expand Down Expand Up @@ -178,3 +179,37 @@ message RoutesConfigDump {
// The dynamically loaded route configs.
repeated DynamicRouteConfig dynamic_route_configs = 3 [(gogoproto.nullable) = false];
}

// Envoy's scoped RDS implementation fills this message with all currently loaded route
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @AndresGuedez for this, my main thought looking at this is that the PR is too big to reasonably review and without diluting review bandwidth. Can we split the PR up further for review?

I think we should have this master PR kept open to show how things tie together, but then separate PRs for:

  1. Protos.
  2. Scoped RDS configuration parser and handling logic. This can just be unit tested and doesn't need to be wired up yet.
  3. Config subscription and wiring of scoped RDS into the rest of Envoy. The integration test can be added here.
  4. Optionally, other PRs to reduce the amount of renaming noise, where reasonable.

I think we can get better review velocity if we do it this way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. Working on splitting this up.

// configuration scopes (defined via ScopedRouteConfigurationsSet protos). This message lists both
// the scopes defined inline with the higher order object (i.e., the HttpConnectionManager) and the
// dynamically obtained scopes via the SRDS API.
message ScopedRoutesConfigDump {
message InlineScopedRoutesConfig {
// The scoped routes config.
envoy.api.v2.ScopedRouteConfigurationsSet scoped_routes_config = 1;

// The timestamp when the scoped route config set was last updated.
google.protobuf.Timestamp last_updated = 2;
}

message DynamicScopedRoutesConfig {
// This is the per-resource version information. This version is currently taken from the
// :ref:`version_info <envoy_api_field_DiscoveryResponse.version_info>` field at the time that
// the scoped routes configuration was loaded.
string version_info = 1;

// The scoped routes config.
envoy.api.v2.ScopedRouteConfigurationsSet scoped_routes_config = 2;

// The timestamp when the scoped route config set was last updated.
google.protobuf.Timestamp last_updated = 3;
}

// The statically loaded scoped routes configs.
repeated InlineScopedRoutesConfig inline_scoped_routes_configs = 1 [(gogoproto.nullable) = false];

// The dynamically loaded scoped routes configs.
repeated DynamicScopedRoutesConfig dynamic_scoped_routes_configs = 2
[(gogoproto.nullable) = false];
}
21 changes: 21 additions & 0 deletions api/envoy/api/v2/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,24 @@ api_go_grpc_library(
"//envoy/api/v2/route:route_go_proto",
],
)

api_proto_library_internal(
name = "srds",
srcs = ["srds.proto"],
has_services = 1,
visibility = [":friends"],
deps = [
":discovery",
"//envoy/api/v2/core:base",
"//envoy/api/v2/route",
],
)

api_go_grpc_library(
name = "srds",
proto = ":srds",
deps = [
":discovery_go_proto",
"//envoy/api/v2/core:base_go_proto",
],
)
153 changes: 153 additions & 0 deletions api/envoy/api/v2/srds.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
syntax = "proto3";

package envoy.api.v2;

option java_outer_classname = "SrdsProto";
option java_package = "io.envoyproxy.envoy.api.v2";
option java_multiple_files = true;
option java_generic_services = true;

import "envoy/api/v2/discovery.proto";

import "google/api/annotations.proto";

import "validate/validate.proto";
import "gogoproto/gogo.proto";

option (gogoproto.equal_all) = true;

// [#protodoc-title: HTTP scoped routing configuration]
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
//
// .. attention::
//
// The Scoped RDS API is not yet fully implemented and *should not* be enabled in
// :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.HttpConnectionManager`.

// The resource_names field in DiscoveryRequest specifies a set of route configuration scopes. Each
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add ref link to resource_names/DiscoveryRequest?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

// scope points to a route_configuration_name which will be used to request a
// :ref:`RouteConfiguration<envoy_api_msg_Route.RouteConfiguration>` via the RDS API.
service ScopedRoutesDiscoveryService {
rpc StreamScopedRoutes(stream DiscoveryRequest) returns (stream DiscoveryResponse) {
}

rpc IncrementalScopedRoutes(stream IncrementalDiscoveryRequest)
returns (stream IncrementalDiscoveryResponse) {
}

rpc FetchScopedRoutes(DiscoveryRequest) returns (DiscoveryResponse) {
option (google.api.http) = {
post: "/v2/discovery:scoped-routes"
body: "*"
};
}
}

// This configuration represents a set of "scopes", each containing independent routing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a set of routing "scopes"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to be honest in saying that it's very hard for me to follow the messages/documentation in this file. I read the spec a while ago but I've forgotten it. Would it be possible to add some high level documentation here that walks the end user through some examples of how the API is setup, the fragment builder works, etc. If you plan on doing this in arch overview docs that's fine too, whatever is easiest. The reason I ask for this now is I think it would make it a lot easier to review.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My initial plan was to add in-depth documentation including examples to the arch overview docs (which I wasn't planning to do until the feature is fully implemented in PR 3), but I agree better documentation in the proto definition would be helpful for this review. I am working on this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a ton. I think even just some YAML examples here in the proto docs would be super helpful. You could move them to the arch overview later or just link to them here, so hopefully zero wasted effort.

// configuration (see :ref:`routing architecture overview <arch_overview_http_routing>`). A scope is
// assigned to each request based on request attributes, such as the value of a header designated
// via this configuration.
// [#comment:next free field: 4]
message ScopedRouteConfigurationsSet {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upon revisiting the SRDS proto in the context of Incremental xDS, I have decided to make a few changes after discussing with @htuch.

To easily enable incremental updates to the routing scopes (represented by the Scope message) by leveraging the existing Incremental xDS API, I am going to move the ScopeKeyBuilder specification out of the ScopedRouteConfigurationsSet into the HttpConnectionManager, and instead of publishing a repeated Scope scopes = in this message, each SRDS proto (which will most likely be renamed to ScopedRouteConfiguration) will contain a single Scope.

This change creates much better alignment with the API/protocol already defined for incremental updates, and also simplifies the SRDS API.

I am actively working on this now and will introduce the changes discussed as part of the next few commits to this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndresGuedez cool I will defer looking at the API again until this is done. Thank you for iterating on this.

/wait

// The name of the set of route configuration scopes. This will be the
// :ref:`scoped_routes_config_set_name
// <envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRds.scoped_routes_config_set_name>`
// set in :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.ScopedRds`.
string name = 1 [(validate.rules).string.min_bytes = 1];

// Specifies the mechanism for constructing keys based on request attributes to match
// :ref:`scopes <envoy_api_field_ScopedRouteConfigurationsSet.scopes>` against.
//
// Upon receiving a request's headers, the Router will build a key using the algorithm specified
// by this message. This key will be used to look up a corresponding
// :ref:`Scope <envoy_api_msg_ScopedRouteConfigurationsSet.Scope>` in a table containing the set
// of :ref:`scopes <envoy_api_field_ScopedRouteConfigurationsSet.scopes>`.
message ScopeKeyBuilder {
// Specifies the mechanism for constructing fragments which are composed into keys.
message FragmentBuilder {
// Specifies how the value of a header should be extracted.
// The following example maps the structure of a header to the fields in this message.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe include an example of a HeaderValueExtractor that can be used to extract a value from the header

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an example in the ScopedRouteConfigurationsSet documentation.

//
// .. code::
//
// X-Header: a,b;c,d
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using a=b;c=d in the example makes it more obvious that we're parsing key value pairs in this example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

// | || |
// | || \\----> <element_separator>
// | ||
// | |\\----> <element.separator>
// | |
// | \\----> <element.key>
// |
// \\----> <name>
message HeaderValueExtractor {
// The name of the header to extract the value from.
string name = 1 [(validate.rules).string.min_bytes = 1];

// The element separator (e.g., ';' separates 'a;b;c;d').
string element_separator = 2;

// Specifies a key value pair to match on.
message KvElement {
// The separator between key and value (e.g., '=' separates 'k=v;...').
string separator = 1;

// The key to match on.
string key = 2;
}

oneof extract_type {
// Specifies the index of the element to extract.
int32 index = 3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsigned?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find mention of signed vs unsigned in Envoy's style guide so I defaulted to Google's style of using signed integers and relying on assertions to check val >= 0.


// Specifies the key value pair to extract the value from.
KvElement element = 4;
}
}

oneof type {
option (validate.required) = true;

// Specifies how a header field's value should be extracted.
HeaderValueExtractor header_value_extractor = 1;
}
}

// The constructed key consists of the union of these fragments.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does order matter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, updated comment.

repeated FragmentBuilder fragments = 1 [(validate.rules).repeated .min_items = 1];
}

// The key construction mechanism.
ScopeKeyBuilder scope_key_builder = 2 [(validate.rules).message.required = true];

// Specifies a routing scope, which associates a :ref:`envoy_api_msg_RouteConfiguration` to a
// :ref:`Key <envoy_api_msg_ScopedRouteConfigurationsSet.Scope.Key>` which is matched against
// each HTTP request.
message Scope {
// Specifies a key which is matched against by the output of a :ref:`ScopeKeyBuilder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"matched against the output"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

// <envoy_api_msg_ScopedRouteConfigurationsSet.ScopeKeyBuilder>`.
message Key {
message Fragment {
oneof type {
option (validate.required) = true;

// A string to match against.
string string_key = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this match on the key from the associated FragmentBuilder? Or on the extracted value? Maybe add some details to the comments (either here or on the top-level Key)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment a few lines above pertaining to the 'Key' message as a whole attempts to clarify this. Let me know if it is sufficient.

}
}

// The ordered set of fragments to match against.
repeated Fragment fragments = 1 [(validate.rules).repeated .min_items = 1];
}

// The resource name to use for a :ref:`envoy_api_msg_DiscoveryRequest` to an RDS server to
// fetch the :ref:`envoy_api_msg_RouteConfiguration` associated with this scope.
string route_configuration_name = 1 [(validate.rules).string.min_bytes = 1];

// The key to match against.
Key key = 2 [(validate.rules).message.required = true];
}

// The set of scopes containing :ref:`Key <envoy_api_msg_ScopedRouteConfigurationsSet.Scope.Key>`
// to :ref:`envoy_api_msg_RouteConfiguration` mappings.
repeated Scope scopes = 3 [(validate.rules).repeated .min_items = 1];
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ api_proto_library_internal(
srcs = ["http_connection_manager.proto"],
deps = [
"//envoy/api/v2:rds",
"//envoy/api/v2:srds",
"//envoy/api/v2/core:base",
"//envoy/api/v2/core:config_source",
"//envoy/api/v2/core:protocol",
Expand All @@ -20,6 +21,7 @@ api_go_proto_library(
proto = ":http_connection_manager",
deps = [
"//envoy/api/v2:rds_go_grpc",
"//envoy/api/v2:srds_go_grpc",
"//envoy/api/v2/core:base_go_proto",
"//envoy/api/v2/core:config_source_go_proto",
"//envoy/api/v2/core:protocol_go_proto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ option go_package = "v2";
import "envoy/api/v2/core/config_source.proto";
import "envoy/api/v2/core/protocol.proto";
import "envoy/api/v2/rds.proto";
import "envoy/api/v2/srds.proto";
import "envoy/config/filter/accesslog/v2/accesslog.proto";
import "envoy/type/percent.proto";

Expand All @@ -24,7 +25,7 @@ import "gogoproto/gogo.proto";
// [#protodoc-title: HTTP connection manager]
// HTTP connection manager :ref:`configuration overview <config_http_conn_man>`.

// [#comment:next free field: 30]
// [#comment:next free field: 32]
message HttpConnectionManager {
enum CodecType {
option (gogoproto.goproto_enum_prefix) = false;
Expand Down Expand Up @@ -63,6 +64,14 @@ message HttpConnectionManager {
envoy.api.v2.RouteConfiguration route_config = 4;
}

oneof scoped_routes_specifier {
// Configuration for the Scoped RDS API which dynamically loads routing configuration scopes.
ScopedRds scoped_rds = 30;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be simpler if these options were just in the route_specifier oneof above? Why have them be orthogonal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My initial intention keeping them separate was to avoid confusion that SRDS and RDS are tightly coupled and require the same config source, etc.

However, based on the feedback in this review and reassessing this from the user's standpoint, I agree this is simpler if ScopedRds becomes part of the route_specifier, and ScopedRds expands to include both the ConfigSource for RDS and SRDS. This would allow me to remove scoped_rds_template from Rds, which avoids the confusion related to that field (I've never been quite happy with that field since I started working on this).


// A static set of routing scopes.
envoy.api.v2.ScopedRouteConfigurationsSet scoped_routes_config = 31;
}

// A list of individual HTTP filters that make up the filter chain for
// requests made to the connection manager. Order matters as the filters are
// processed sequentially as request events happen.
Expand Down Expand Up @@ -389,11 +398,31 @@ message Rds {
envoy.api.v2.core.ConfigSource config_source = 1
[(validate.rules).message.required = true, (gogoproto.nullable) = false];

// The name of the route configuration. This name will be passed to the RDS
// API. This allows an Envoy configuration with multiple HTTP listeners (and
// associated HTTP connection manager filters) to use different route
// configurations.
string route_config_name = 2 [(validate.rules).string.min_bytes = 1];
oneof subscription_specifier {
option (validate.required) = true;

// The name of the route configuration. This name will be passed to the RDS
// API. This allows an Envoy configuration with multiple HTTP listeners (and
// associated HTTP connection manager filters) to use different route
// configurations.
string route_config_name = 2 [(validate.rules).string.min_bytes = 1];

// Must be set to true when scoped RDS is enabled.
// If this is enabled, RDS subscriptions will be triggered by scoped RDS config updates using
// this configuration as a template.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What part of this configuration is being used as a template? Unclear to me what that means exactly

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per #5839 (comment), I am changing this and will be getting rid of the scoped_rds_template. Instead, the ScopedRds message in HttpConnectionManager will include the ConfigSource required for the RDS server along with the ConfigSource for the SRDS server.

bool scoped_rds_template = 3;
}
}

message ScopedRds {
// Configuration source specifier for scoped RDS.
envoy.api.v2.core.ConfigSource config_source = 1
[(validate.rules).message.required = true, (gogoproto.nullable) = false];

// The name of the set of routing configuration scopes. This name will be passed to the scoped RDS
// API.
// This allows Envoy to segment routing configuration based on a configurable request attribute.
string scoped_routes_config_set_name = 2 [(validate.rules).string.min_bytes = 1];
}

message HttpFilter {
Expand Down
1 change: 1 addition & 0 deletions docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ PROTO_RST="
/envoy/api/v2/cluster/circuit_breaker/envoy/api/v2/cluster/circuit_breaker.proto.rst
/envoy/api/v2/rds/envoy/api/v2/rds.proto.rst
/envoy/api/v2/route/route/envoy/api/v2/route/route.proto.rst
/envoy/api/v2/srds/envoy/api/v2/srds.proto.rst
/envoy/api/v2/lds/envoy/api/v2/lds.proto.rst
/envoy/api/v2/listener/listener/envoy/api/v2/listener/listener.proto.rst
/envoy/api/v2/ratelimit/ratelimit/envoy/api/v2/ratelimit/ratelimit.proto.rst
Expand Down
1 change: 1 addition & 0 deletions docs/root/api-v2/http_routes/http_routes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ HTTP route management
:maxdepth: 2

../api/v2/rds.proto
../api/v2/srds.proto
../api/v2/route/route.proto
18 changes: 16 additions & 2 deletions include/envoy/config/config_provider_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ namespace Config {
*/
class ConfigProviderManager {
public:
class OptionalArg {
public:
virtual ~OptionalArg() = default;
};

class NullOptionalArg : public OptionalArg {
public:
NullOptionalArg() = default;
~NullOptionalArg() override = default;
};

virtual ~ConfigProviderManager() = default;

/**
Expand All @@ -34,24 +45,27 @@ class ConfigProviderManager {
* @param config_source_proto supplies the proto containing the xDS API configuration.
* @param factory_context is the context to use for the provider.
* @param stat_prefix supplies the prefix to use for statistics.
* @param optarg supplies an optional argument with data specific to the concrete class.
* @return ConfigProviderPtr a newly allocated dynamic config provider which shares underlying
* data structures with other dynamic providers configured with the same
* API source.
*/
virtual ConfigProviderPtr
createXdsConfigProvider(const Protobuf::Message& config_source_proto,
Server::Configuration::FactoryContext& factory_context,
const std::string& stat_prefix) PURE;
const std::string& stat_prefix, const OptionalArg& optarg) PURE;

/**
* Returns a ConfigProvider associated with a statically specified configuration.
* @param config_proto supplies the configuration proto.
* @param factory_context is the context to use for the provider.
* @param optarg supplies an optional argument with data specific to the concrete class.
* @return ConfigProviderPtr a newly allocated static config provider.
*/
virtual ConfigProviderPtr
createStaticConfigProvider(const Protobuf::Message& config_proto,
Server::Configuration::FactoryContext& factory_context) PURE;
Server::Configuration::FactoryContext& factory_context,
const OptionalArg& optarg) PURE;
};

} // namespace Config
Expand Down
10 changes: 10 additions & 0 deletions include/envoy/router/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ envoy_cc_library(
],
)

envoy_cc_library(
name = "scopes_interface",
hdrs = ["scopes.h"],
deps = [
":router_interface",
"//include/envoy/config:config_provider_interface",
"//include/envoy/http:header_map_interface",
],
)

envoy_cc_library(
name = "router_ratelimit_interface",
hdrs = ["router_ratelimit.h"],
Expand Down
Loading