listener: Local rate limit listener filter (#25440)
* listener: Local rate limit listener filter Signed-off-by: kuochunghsu <kuochunghsu@pinterest.com> Mirrored from https://github.com/envoyproxy/envoy @ e71a141c3f191e5a0c5ddfb8c41151a5fbef3dd2pull/626/head
parent
c0ae99472e
commit
a826b27449
4 changed files with 53 additions and 0 deletions
@ -0,0 +1,13 @@ |
||||
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. |
||||
|
||||
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_package( |
||||
deps = [ |
||||
"//envoy/config/core/v3:pkg", |
||||
"//envoy/type/v3:pkg", |
||||
"@com_github_cncf_udpa//udpa/annotations:pkg", |
||||
], |
||||
) |
@ -0,0 +1,38 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.extensions.filters.listener.local_ratelimit.v3; |
||||
|
||||
import "envoy/config/core/v3/base.proto"; |
||||
import "envoy/type/v3/token_bucket.proto"; |
||||
|
||||
import "udpa/annotations/status.proto"; |
||||
import "validate/validate.proto"; |
||||
|
||||
option java_package = "io.envoyproxy.envoy.extensions.filters.listener.local_ratelimit.v3"; |
||||
option java_outer_classname = "LocalRatelimitProto"; |
||||
option java_multiple_files = true; |
||||
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/local_ratelimit/v3;local_ratelimitv3"; |
||||
option (udpa.annotations.file_status).package_version_status = ACTIVE; |
||||
|
||||
// [#protodoc-title: Local Rate Limit Filter] |
||||
// Local rate limit :ref:`configuration overview <config_listener_filters_local_rate_limit>`. |
||||
// [#extension: envoy.filters.listener.local_ratelimit] |
||||
|
||||
message LocalRateLimit { |
||||
// The prefix to use when emitting :ref:`statistics |
||||
// <config_listener_filters_local_rate_limit_stats>`. |
||||
string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; |
||||
|
||||
// The token bucket configuration to use for rate limiting all incoming sockets. If the token is available, |
||||
// the socket will be allowed. If no tokens are available, the socket will be immediately closed. |
||||
// |
||||
// .. note:: |
||||
// In the current implementation the token bucket's :ref:`fill_interval |
||||
// <envoy_v3_api_field_type.v3.TokenBucket.fill_interval>` must be >= 50ms to avoid too aggressive |
||||
// refills. |
||||
type.v3.TokenBucket token_bucket = 2 [(validate.rules).message = {required: true}]; |
||||
|
||||
// Runtime flag that controls whether the filter is enabled or not. If not specified, defaults |
||||
// to enabled. |
||||
config.core.v3.RuntimeFeatureFlag runtime_enabled = 3; |
||||
} |
Loading…
Reference in new issue