Created
January 6, 2023 05:59
-
-
Save thewisenerd/eaa48b86409bdffb623dd4a778e3eb18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/envoyproxy/data-plane-api/blob/main/envoy/service/ratelimit/v3/rls.proto | |
syntax = "proto3"; | |
package envoy.service.ratelimit.v3; | |
service RateLimitService { | |
rpc ShouldRateLimit(RateLimitRequest) returns (RateLimitResponse) {} | |
} | |
message RateLimitRequest { | |
enum RateLimitUnit { | |
UNKNOWN = 0; | |
SECOND = 1; | |
MINUTE = 2; | |
HOUR = 3; | |
DAY = 4; | |
MONTH = 5; | |
YEAR = 6; | |
} | |
message RateLimitDescriptor { | |
message Entry { | |
string key = 1; | |
string value = 2; | |
} | |
message RateLimitOverride { | |
uint32 requests_per_unit = 1; | |
RateLimitUnit unit = 2; | |
} | |
repeated Entry entries = 1; | |
RateLimitOverride limit = 2; | |
} | |
string domain = 1; | |
repeated RateLimitDescriptor descriptors = 2; | |
uint32 hits_addend = 3; | |
} | |
message RateLimitResponse { | |
enum Code { | |
UNKNOWN = 0; | |
OK = 1; | |
OVER_LIMIT = 2; | |
} | |
Code overall_code = 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment