aboutsummaryrefslogtreecommitdiff
path: root/src/proto/grpc/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/proto/grpc/testing')
-rw-r--r--src/proto/grpc/testing/BUILD2
-rw-r--r--src/proto/grpc/testing/xds/v3/BUILD12
-rw-r--r--src/proto/grpc/testing/xds/v3/base.proto40
-rw-r--r--src/proto/grpc/testing/xds/v3/cluster.proto9
-rw-r--r--src/proto/grpc/testing/xds/v3/endpoint.proto12
-rw-r--r--src/proto/grpc/testing/xds/v3/http_protocol_options.proto26
-rw-r--r--src/proto/grpc/testing/xds/v3/protocol.proto5
7 files changed, 103 insertions, 3 deletions
diff --git a/src/proto/grpc/testing/BUILD b/src/proto/grpc/testing/BUILD
index 0f7bbbecf6..41ab62e76e 100644
--- a/src/proto/grpc/testing/BUILD
+++ b/src/proto/grpc/testing/BUILD
@@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
-load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
licenses(["notice"])
diff --git a/src/proto/grpc/testing/xds/v3/BUILD b/src/proto/grpc/testing/xds/v3/BUILD
index 9c02b2a9f6..ff3cfc4f7d 100644
--- a/src/proto/grpc/testing/xds/v3/BUILD
+++ b/src/proto/grpc/testing/xds/v3/BUILD
@@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
+load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
licenses(["notice"])
@@ -212,6 +212,16 @@ grpc_proto_library(
)
grpc_proto_library(
+ name = "http_protocol_options_proto",
+ srcs = [
+ "http_protocol_options.proto",
+ ],
+ deps = [
+ "protocol_proto",
+ ],
+)
+
+grpc_proto_library(
name = "range_proto",
srcs = [
"range.proto",
diff --git a/src/proto/grpc/testing/xds/v3/base.proto b/src/proto/grpc/testing/xds/v3/base.proto
index 33719f687c..fcf78419f5 100644
--- a/src/proto/grpc/testing/xds/v3/base.proto
+++ b/src/proto/grpc/testing/xds/v3/base.proto
@@ -129,3 +129,43 @@ message TransportSocket {
google.protobuf.Any typed_config = 3;
}
}
+
+// Metadata provides additional inputs to filters based on matched listeners,
+// filter chains, routes and endpoints. It is structured as a map, usually from
+// filter name (in reverse DNS format) to metadata specific to the filter. Metadata
+// key-values for a filter are merged as connection and request handling occurs,
+// with later values for the same key overriding earlier values.
+//
+// An example use of metadata is providing additional values to
+// http_connection_manager in the envoy.http_connection_manager.access_log
+// namespace.
+//
+// Another example use of metadata is to per service config info in cluster metadata, which may get
+// consumed by multiple filters.
+//
+// For load balancing, Metadata provides a means to subset cluster endpoints.
+// Endpoints have a Metadata object associated and routes contain a Metadata
+// object to match against. There are some well defined metadata used today for
+// this purpose:
+//
+// * ``{"envoy.lb": {"canary": <bool> }}`` This indicates the canary status of an
+// endpoint and is also used during header processing
+// (x-envoy-upstream-canary) and for stats purposes.
+// [#next-major-version: move to type/metadata/v2]
+message Metadata {
+ // Key is the reverse DNS filter name, e.g. com.acme.widget. The ``envoy.*``
+ // namespace is reserved for Envoy's built-in filters.
+ // If both ``filter_metadata`` and
+ // :ref:`typed_filter_metadata <envoy_v3_api_field_config.core.v3.Metadata.typed_filter_metadata>`
+ // fields are present in the metadata with same keys,
+ // only ``typed_filter_metadata`` field will be parsed.
+ map<string, google.protobuf.Struct> filter_metadata = 1;
+
+ // Key is the reverse DNS filter name, e.g. com.acme.widget. The ``envoy.*``
+ // namespace is reserved for Envoy's built-in filters.
+ // The value is encoded as google.protobuf.Any.
+ // If both :ref:`filter_metadata <envoy_v3_api_field_config.core.v3.Metadata.filter_metadata>`
+ // and ``typed_filter_metadata`` fields are present in the metadata with same keys,
+ // only ``typed_filter_metadata`` field will be parsed.
+ map<string, google.protobuf.Any> typed_filter_metadata = 2;
+}
diff --git a/src/proto/grpc/testing/xds/v3/cluster.proto b/src/proto/grpc/testing/xds/v3/cluster.proto
index 531fbd7e0b..a7c438399a 100644
--- a/src/proto/grpc/testing/xds/v3/cluster.proto
+++ b/src/proto/grpc/testing/xds/v3/cluster.proto
@@ -251,6 +251,15 @@ message Cluster {
// maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation
// from the LRS stream here.]
core.v3.ConfigSource lrs_server = 42;
+
+ // The Metadata field can be used to provide additional information about the
+ // cluster. It can be used for stats, logging, and varying filter behavior.
+ // Fields should use reverse DNS notation to denote which entity within Envoy
+ // will need the information. For instance, if the metadata is intended for
+ // the Router filter, the filter name should be specified as ``envoy.filters.http.router``.
+ core.v3.Metadata metadata = 25;
+
+ core.v3.TypedExtensionConfig upstream_config = 48;
}
// Extensible load balancing policy configuration.
diff --git a/src/proto/grpc/testing/xds/v3/endpoint.proto b/src/proto/grpc/testing/xds/v3/endpoint.proto
index 7886fb3c6a..1d01a9c797 100644
--- a/src/proto/grpc/testing/xds/v3/endpoint.proto
+++ b/src/proto/grpc/testing/xds/v3/endpoint.proto
@@ -29,6 +29,11 @@ import "google/protobuf/wrappers.proto";
// Upstream host identifier.
message Endpoint {
+ message AdditionalAddress {
+ // Additional address that is associated with the endpoint.
+ core.v3.Address address = 1;
+ }
+
// The upstream host address.
//
// .. attention::
@@ -39,6 +44,13 @@ message Endpoint {
// in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname,
// and will be resolved via DNS.
core.v3.Address address = 1;
+
+ // An ordered list of addresses that together with `address` comprise the
+ // list of addresses for an endpoint. The address given in the `address` is
+ // prepended to this list. It is assumed that the list must already be
+ // sorted by preference order of the addresses. This will only be supported
+ // for STATIC and EDS clusters.
+ repeated AdditionalAddress additional_addresses = 4;
}
// An Endpoint that Envoy can route traffic to.
diff --git a/src/proto/grpc/testing/xds/v3/http_protocol_options.proto b/src/proto/grpc/testing/xds/v3/http_protocol_options.proto
new file mode 100644
index 0000000000..8dca945d32
--- /dev/null
+++ b/src/proto/grpc/testing/xds/v3/http_protocol_options.proto
@@ -0,0 +1,26 @@
+// Copyright 2023 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Local copy of Envoy xDS proto file, used for testing only.
+
+syntax = "proto3";
+
+package envoy.extensions.upstreams.http.v3;
+
+import "src/proto/grpc/testing/xds/v3/protocol.proto";
+
+message HttpProtocolOptions {
+ // This contains options common across HTTP/1 and HTTP/2
+ config.core.v3.HttpProtocolOptions common_http_protocol_options = 1;
+}
diff --git a/src/proto/grpc/testing/xds/v3/protocol.proto b/src/proto/grpc/testing/xds/v3/protocol.proto
index 886cc11ddf..3a75bdd85b 100644
--- a/src/proto/grpc/testing/xds/v3/protocol.proto
+++ b/src/proto/grpc/testing/xds/v3/protocol.proto
@@ -22,6 +22,9 @@ import "google/protobuf/duration.proto";
// [#next-free-field: 5]
message HttpProtocolOptions {
- // The maximum duration of a connection.
+ // The connection idle timeout. Defaults to 1h.
+ google.protobuf.Duration idle_timeout = 1;
+
+ // The maximum duration of a stream.
google.protobuf.Duration max_stream_duration = 4;
}