ratelimit: add dynamic metadata to ratelimit response (#14508)

Signed-off-by: John Esmet <john.esmet@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ 89ae3fed44b2d8f1acabad584f50f8ef2d674173
pull/624/head
data-plane-api(Azure Pipelines) 4 years ago
parent 3ce6441c05
commit ff01a771c6
  1. 12
      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 "envoy/extensions/common/ratelimit/v3/ratelimit.proto";
import "google/protobuf/duration.proto"; import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "udpa/annotations/status.proto"; import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto"; import "udpa/annotations/versioning.proto";
@ -51,7 +52,7 @@ message RateLimitRequest {
} }
// A response from a ShouldRateLimit call. // A response from a ShouldRateLimit call.
// [#next-free-field: 6] // [#next-free-field: 7]
message RateLimitResponse { message RateLimitResponse {
option (udpa.annotations.versioning).previous_message_type = option (udpa.annotations.versioning).previous_message_type =
"envoy.service.ratelimit.v2.RateLimitResponse"; "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. // A response body to send to the downstream client when the response code is not OK.
bytes raw_body = 5; 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 <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
// - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
// - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
google.protobuf.Struct dynamic_metadata = 6;
} }

Loading…
Cancel
Save