From ff01a771c69a18aeb71b39f3def42bdb14d2dd7f Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Thu, 7 Jan 2021 17:38:31 +0000 Subject: [PATCH] ratelimit: add dynamic metadata to ratelimit response (#14508) Signed-off-by: John Esmet Mirrored from https://github.com/envoyproxy/envoy @ 89ae3fed44b2d8f1acabad584f50f8ef2d674173 --- envoy/service/ratelimit/v3/rls.proto | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/envoy/service/ratelimit/v3/rls.proto b/envoy/service/ratelimit/v3/rls.proto index 7379368f..0f040612 100644 --- a/envoy/service/ratelimit/v3/rls.proto +++ b/envoy/service/ratelimit/v3/rls.proto @@ -6,6 +6,7 @@ import "envoy/config/core/v3/base.proto"; import "envoy/extensions/common/ratelimit/v3/ratelimit.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -51,7 +52,7 @@ message RateLimitRequest { } // A response from a ShouldRateLimit call. -// [#next-free-field: 6] +// [#next-free-field: 7] message RateLimitResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.ratelimit.v2.RateLimitResponse"; @@ -135,4 +136,13 @@ message RateLimitResponse { // A response body to send to the downstream client when the response code is not OK. bytes raw_body = 5; + + // Optional response metadata that will be emitted as dynamic metadata to be consumed by the next + // filter. This metadata lives in a namespace specified by the canonical name of extension filter + // that requires it: + // + // - :ref:`envoy.filters.http.ratelimit ` for HTTP filter. + // - :ref:`envoy.filters.network.ratelimit ` for network filter. + // - :ref:`envoy.filters.thrift.rate_limit ` for Thrift filter. + google.protobuf.Struct dynamic_metadata = 6; }