1
2
3
4
5
6
7 package envoy_service_ratelimit_v3
8
9 import (
10 context "context"
11 _ "github.com/cncf/udpa/go/udpa/annotations"
12 v31 "github.com/datawire/ambassador/v2/pkg/api/envoy/config/core/v3"
13 v3 "github.com/datawire/ambassador/v2/pkg/api/envoy/extensions/common/ratelimit/v3"
14 _ "github.com/envoyproxy/protoc-gen-validate/validate"
15 proto "github.com/golang/protobuf/proto"
16 duration "github.com/golang/protobuf/ptypes/duration"
17 _struct "github.com/golang/protobuf/ptypes/struct"
18 grpc "google.golang.org/grpc"
19 codes "google.golang.org/grpc/codes"
20 status "google.golang.org/grpc/status"
21 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
22 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
23 reflect "reflect"
24 sync "sync"
25 )
26
27 const (
28
29 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
30
31 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
32 )
33
34
35
36 const _ = proto.ProtoPackageIsVersion4
37
38 type RateLimitResponse_Code int32
39
40 const (
41
42 RateLimitResponse_UNKNOWN RateLimitResponse_Code = 0
43
44 RateLimitResponse_OK RateLimitResponse_Code = 1
45
46 RateLimitResponse_OVER_LIMIT RateLimitResponse_Code = 2
47 )
48
49
50 var (
51 RateLimitResponse_Code_name = map[int32]string{
52 0: "UNKNOWN",
53 1: "OK",
54 2: "OVER_LIMIT",
55 }
56 RateLimitResponse_Code_value = map[string]int32{
57 "UNKNOWN": 0,
58 "OK": 1,
59 "OVER_LIMIT": 2,
60 }
61 )
62
63 func (x RateLimitResponse_Code) Enum() *RateLimitResponse_Code {
64 p := new(RateLimitResponse_Code)
65 *p = x
66 return p
67 }
68
69 func (x RateLimitResponse_Code) String() string {
70 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
71 }
72
73 func (RateLimitResponse_Code) Descriptor() protoreflect.EnumDescriptor {
74 return file_envoy_service_ratelimit_v3_rls_proto_enumTypes[0].Descriptor()
75 }
76
77 func (RateLimitResponse_Code) Type() protoreflect.EnumType {
78 return &file_envoy_service_ratelimit_v3_rls_proto_enumTypes[0]
79 }
80
81 func (x RateLimitResponse_Code) Number() protoreflect.EnumNumber {
82 return protoreflect.EnumNumber(x)
83 }
84
85
86 func (RateLimitResponse_Code) EnumDescriptor() ([]byte, []int) {
87 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 0}
88 }
89
90
91
92 type RateLimitResponse_RateLimit_Unit int32
93
94 const (
95
96 RateLimitResponse_RateLimit_UNKNOWN RateLimitResponse_RateLimit_Unit = 0
97
98 RateLimitResponse_RateLimit_SECOND RateLimitResponse_RateLimit_Unit = 1
99
100 RateLimitResponse_RateLimit_MINUTE RateLimitResponse_RateLimit_Unit = 2
101
102 RateLimitResponse_RateLimit_HOUR RateLimitResponse_RateLimit_Unit = 3
103
104 RateLimitResponse_RateLimit_DAY RateLimitResponse_RateLimit_Unit = 4
105 )
106
107
108 var (
109 RateLimitResponse_RateLimit_Unit_name = map[int32]string{
110 0: "UNKNOWN",
111 1: "SECOND",
112 2: "MINUTE",
113 3: "HOUR",
114 4: "DAY",
115 }
116 RateLimitResponse_RateLimit_Unit_value = map[string]int32{
117 "UNKNOWN": 0,
118 "SECOND": 1,
119 "MINUTE": 2,
120 "HOUR": 3,
121 "DAY": 4,
122 }
123 )
124
125 func (x RateLimitResponse_RateLimit_Unit) Enum() *RateLimitResponse_RateLimit_Unit {
126 p := new(RateLimitResponse_RateLimit_Unit)
127 *p = x
128 return p
129 }
130
131 func (x RateLimitResponse_RateLimit_Unit) String() string {
132 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
133 }
134
135 func (RateLimitResponse_RateLimit_Unit) Descriptor() protoreflect.EnumDescriptor {
136 return file_envoy_service_ratelimit_v3_rls_proto_enumTypes[1].Descriptor()
137 }
138
139 func (RateLimitResponse_RateLimit_Unit) Type() protoreflect.EnumType {
140 return &file_envoy_service_ratelimit_v3_rls_proto_enumTypes[1]
141 }
142
143 func (x RateLimitResponse_RateLimit_Unit) Number() protoreflect.EnumNumber {
144 return protoreflect.EnumNumber(x)
145 }
146
147
148 func (RateLimitResponse_RateLimit_Unit) EnumDescriptor() ([]byte, []int) {
149 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 0, 0}
150 }
151
152
153
154
155
156
157
158
159 type RateLimitRequest struct {
160 state protoimpl.MessageState
161 sizeCache protoimpl.SizeCache
162 unknownFields protoimpl.UnknownFields
163
164
165
166 Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
167
168
169
170 Descriptors []*v3.RateLimitDescriptor `protobuf:"bytes,2,rep,name=descriptors,proto3" json:"descriptors,omitempty"`
171
172
173 HitsAddend uint32 `protobuf:"varint,3,opt,name=hits_addend,json=hitsAddend,proto3" json:"hits_addend,omitempty"`
174 }
175
176 func (x *RateLimitRequest) Reset() {
177 *x = RateLimitRequest{}
178 if protoimpl.UnsafeEnabled {
179 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[0]
180 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
181 ms.StoreMessageInfo(mi)
182 }
183 }
184
185 func (x *RateLimitRequest) String() string {
186 return protoimpl.X.MessageStringOf(x)
187 }
188
189 func (*RateLimitRequest) ProtoMessage() {}
190
191 func (x *RateLimitRequest) ProtoReflect() protoreflect.Message {
192 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[0]
193 if protoimpl.UnsafeEnabled && x != nil {
194 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
195 if ms.LoadMessageInfo() == nil {
196 ms.StoreMessageInfo(mi)
197 }
198 return ms
199 }
200 return mi.MessageOf(x)
201 }
202
203
204 func (*RateLimitRequest) Descriptor() ([]byte, []int) {
205 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{0}
206 }
207
208 func (x *RateLimitRequest) GetDomain() string {
209 if x != nil {
210 return x.Domain
211 }
212 return ""
213 }
214
215 func (x *RateLimitRequest) GetDescriptors() []*v3.RateLimitDescriptor {
216 if x != nil {
217 return x.Descriptors
218 }
219 return nil
220 }
221
222 func (x *RateLimitRequest) GetHitsAddend() uint32 {
223 if x != nil {
224 return x.HitsAddend
225 }
226 return 0
227 }
228
229
230
231 type RateLimitResponse struct {
232 state protoimpl.MessageState
233 sizeCache protoimpl.SizeCache
234 unknownFields protoimpl.UnknownFields
235
236
237
238 OverallCode RateLimitResponse_Code `protobuf:"varint,1,opt,name=overall_code,json=overallCode,proto3,enum=envoy.service.ratelimit.v3.RateLimitResponse_Code" json:"overall_code,omitempty"`
239
240
241
242 Statuses []*RateLimitResponse_DescriptorStatus `protobuf:"bytes,2,rep,name=statuses,proto3" json:"statuses,omitempty"`
243
244 ResponseHeadersToAdd []*v31.HeaderValue `protobuf:"bytes,3,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"`
245
246 RequestHeadersToAdd []*v31.HeaderValue `protobuf:"bytes,4,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"`
247
248 RawBody []byte `protobuf:"bytes,5,opt,name=raw_body,json=rawBody,proto3" json:"raw_body,omitempty"`
249
250
251
252
253
254
255
256 DynamicMetadata *_struct.Struct `protobuf:"bytes,6,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"`
257 }
258
259 func (x *RateLimitResponse) Reset() {
260 *x = RateLimitResponse{}
261 if protoimpl.UnsafeEnabled {
262 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[1]
263 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
264 ms.StoreMessageInfo(mi)
265 }
266 }
267
268 func (x *RateLimitResponse) String() string {
269 return protoimpl.X.MessageStringOf(x)
270 }
271
272 func (*RateLimitResponse) ProtoMessage() {}
273
274 func (x *RateLimitResponse) ProtoReflect() protoreflect.Message {
275 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[1]
276 if protoimpl.UnsafeEnabled && x != nil {
277 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
278 if ms.LoadMessageInfo() == nil {
279 ms.StoreMessageInfo(mi)
280 }
281 return ms
282 }
283 return mi.MessageOf(x)
284 }
285
286
287 func (*RateLimitResponse) Descriptor() ([]byte, []int) {
288 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1}
289 }
290
291 func (x *RateLimitResponse) GetOverallCode() RateLimitResponse_Code {
292 if x != nil {
293 return x.OverallCode
294 }
295 return RateLimitResponse_UNKNOWN
296 }
297
298 func (x *RateLimitResponse) GetStatuses() []*RateLimitResponse_DescriptorStatus {
299 if x != nil {
300 return x.Statuses
301 }
302 return nil
303 }
304
305 func (x *RateLimitResponse) GetResponseHeadersToAdd() []*v31.HeaderValue {
306 if x != nil {
307 return x.ResponseHeadersToAdd
308 }
309 return nil
310 }
311
312 func (x *RateLimitResponse) GetRequestHeadersToAdd() []*v31.HeaderValue {
313 if x != nil {
314 return x.RequestHeadersToAdd
315 }
316 return nil
317 }
318
319 func (x *RateLimitResponse) GetRawBody() []byte {
320 if x != nil {
321 return x.RawBody
322 }
323 return nil
324 }
325
326 func (x *RateLimitResponse) GetDynamicMetadata() *_struct.Struct {
327 if x != nil {
328 return x.DynamicMetadata
329 }
330 return nil
331 }
332
333
334 type RateLimitResponse_RateLimit struct {
335 state protoimpl.MessageState
336 sizeCache protoimpl.SizeCache
337 unknownFields protoimpl.UnknownFields
338
339
340 Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
341
342 RequestsPerUnit uint32 `protobuf:"varint,1,opt,name=requests_per_unit,json=requestsPerUnit,proto3" json:"requests_per_unit,omitempty"`
343
344 Unit RateLimitResponse_RateLimit_Unit `protobuf:"varint,2,opt,name=unit,proto3,enum=envoy.service.ratelimit.v3.RateLimitResponse_RateLimit_Unit" json:"unit,omitempty"`
345 }
346
347 func (x *RateLimitResponse_RateLimit) Reset() {
348 *x = RateLimitResponse_RateLimit{}
349 if protoimpl.UnsafeEnabled {
350 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[2]
351 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
352 ms.StoreMessageInfo(mi)
353 }
354 }
355
356 func (x *RateLimitResponse_RateLimit) String() string {
357 return protoimpl.X.MessageStringOf(x)
358 }
359
360 func (*RateLimitResponse_RateLimit) ProtoMessage() {}
361
362 func (x *RateLimitResponse_RateLimit) ProtoReflect() protoreflect.Message {
363 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[2]
364 if protoimpl.UnsafeEnabled && x != nil {
365 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
366 if ms.LoadMessageInfo() == nil {
367 ms.StoreMessageInfo(mi)
368 }
369 return ms
370 }
371 return mi.MessageOf(x)
372 }
373
374
375 func (*RateLimitResponse_RateLimit) Descriptor() ([]byte, []int) {
376 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 0}
377 }
378
379 func (x *RateLimitResponse_RateLimit) GetName() string {
380 if x != nil {
381 return x.Name
382 }
383 return ""
384 }
385
386 func (x *RateLimitResponse_RateLimit) GetRequestsPerUnit() uint32 {
387 if x != nil {
388 return x.RequestsPerUnit
389 }
390 return 0
391 }
392
393 func (x *RateLimitResponse_RateLimit) GetUnit() RateLimitResponse_RateLimit_Unit {
394 if x != nil {
395 return x.Unit
396 }
397 return RateLimitResponse_RateLimit_UNKNOWN
398 }
399
400 type RateLimitResponse_DescriptorStatus struct {
401 state protoimpl.MessageState
402 sizeCache protoimpl.SizeCache
403 unknownFields protoimpl.UnknownFields
404
405
406 Code RateLimitResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=envoy.service.ratelimit.v3.RateLimitResponse_Code" json:"code,omitempty"`
407
408 CurrentLimit *RateLimitResponse_RateLimit `protobuf:"bytes,2,opt,name=current_limit,json=currentLimit,proto3" json:"current_limit,omitempty"`
409
410 LimitRemaining uint32 `protobuf:"varint,3,opt,name=limit_remaining,json=limitRemaining,proto3" json:"limit_remaining,omitempty"`
411
412 DurationUntilReset *duration.Duration `protobuf:"bytes,4,opt,name=duration_until_reset,json=durationUntilReset,proto3" json:"duration_until_reset,omitempty"`
413 }
414
415 func (x *RateLimitResponse_DescriptorStatus) Reset() {
416 *x = RateLimitResponse_DescriptorStatus{}
417 if protoimpl.UnsafeEnabled {
418 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3]
419 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
420 ms.StoreMessageInfo(mi)
421 }
422 }
423
424 func (x *RateLimitResponse_DescriptorStatus) String() string {
425 return protoimpl.X.MessageStringOf(x)
426 }
427
428 func (*RateLimitResponse_DescriptorStatus) ProtoMessage() {}
429
430 func (x *RateLimitResponse_DescriptorStatus) ProtoReflect() protoreflect.Message {
431 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3]
432 if protoimpl.UnsafeEnabled && x != nil {
433 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
434 if ms.LoadMessageInfo() == nil {
435 ms.StoreMessageInfo(mi)
436 }
437 return ms
438 }
439 return mi.MessageOf(x)
440 }
441
442
443 func (*RateLimitResponse_DescriptorStatus) Descriptor() ([]byte, []int) {
444 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 1}
445 }
446
447 func (x *RateLimitResponse_DescriptorStatus) GetCode() RateLimitResponse_Code {
448 if x != nil {
449 return x.Code
450 }
451 return RateLimitResponse_UNKNOWN
452 }
453
454 func (x *RateLimitResponse_DescriptorStatus) GetCurrentLimit() *RateLimitResponse_RateLimit {
455 if x != nil {
456 return x.CurrentLimit
457 }
458 return nil
459 }
460
461 func (x *RateLimitResponse_DescriptorStatus) GetLimitRemaining() uint32 {
462 if x != nil {
463 return x.LimitRemaining
464 }
465 return 0
466 }
467
468 func (x *RateLimitResponse_DescriptorStatus) GetDurationUntilReset() *duration.Duration {
469 if x != nil {
470 return x.DurationUntilReset
471 }
472 return nil
473 }
474
475 var File_envoy_service_ratelimit_v3_rls_proto protoreflect.FileDescriptor
476
477 var file_envoy_service_ratelimit_v3_rls_proto_rawDesc = []byte{
478 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
479 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6c, 0x73,
480 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65,
481 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e,
482 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
483 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72,
484 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e,
485 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x61, 0x74,
486 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69,
487 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
488 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74,
489 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
490 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63,
491 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e,
492 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
493 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e,
494 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
495 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64,
496 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f,
497 0x74, 0x6f, 0x22, 0xdc, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74,
498 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69,
499 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12,
500 0x5b, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02,
501 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
502 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x72,
503 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65,
504 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52,
505 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b,
506 0x68, 0x69, 0x74, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
507 0x0d, 0x52, 0x0a, 0x68, 0x69, 0x74, 0x73, 0x41, 0x64, 0x64, 0x65, 0x6e, 0x64, 0x3a, 0x32, 0x9a,
508 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76,
509 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32,
510 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
511 0x74, 0x22, 0xcf, 0x09, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52,
512 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x6f, 0x76, 0x65, 0x72, 0x61,
513 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e,
514 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61,
515 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c,
516 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x64,
517 0x65, 0x52, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x5a,
518 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
519 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
520 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61,
521 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,
522 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
523 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x17, 0x72, 0x65,
524 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74,
525 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e,
526 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
527 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14,
528 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54,
529 0x6f, 0x41, 0x64, 0x64, 0x12, 0x56, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
530 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x04,
531 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e,
532 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64,
533 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
534 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x19, 0x0a, 0x08,
535 0x72, 0x61, 0x77, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
536 0x72, 0x61, 0x77, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d,
537 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28,
538 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
539 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61,
540 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x9c, 0x02, 0x0a, 0x09,
541 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
542 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a,
543 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e,
544 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
545 0x74, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x04, 0x75, 0x6e, 0x69,
546 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
547 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69,
548 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65,
549 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74,
550 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x3e, 0x0a, 0x04, 0x55,
551 0x6e, 0x69, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00,
552 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06,
553 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x55, 0x52,
554 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x04, 0x3a, 0x3d, 0x9a, 0xc5, 0x88,
555 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
556 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52,
557 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
558 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0xf4, 0x02, 0x0a, 0x10, 0x44,
559 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
560 0x46, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e,
561 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61,
562 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c,
563 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x64,
564 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x5c, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65,
565 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37,
566 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72,
567 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65,
568 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x61,
569 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74,
570 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x72,
571 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e,
572 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x4b,
573 0x0a, 0x14, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c,
574 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
575 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
576 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
577 0x6e, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x3a, 0x44, 0x9a, 0xc5, 0x88,
578 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
579 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52,
580 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
581 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75,
582 0x73, 0x22, 0x2b, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b,
583 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x0e,
584 0x0a, 0x0a, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x3a, 0x33,
585 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72,
586 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76,
587 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
588 0x6e, 0x73, 0x65, 0x32, 0x84, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69,
589 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x75,
590 0x6c, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x2e, 0x65, 0x6e,
591 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65,
592 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d,
593 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
594 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69,
595 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74,
596 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x41, 0x0a, 0x28, 0x69, 0x6f,
597 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
598 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69,
599 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f,
600 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70,
601 0x72, 0x6f, 0x74, 0x6f, 0x33,
602 }
603
604 var (
605 file_envoy_service_ratelimit_v3_rls_proto_rawDescOnce sync.Once
606 file_envoy_service_ratelimit_v3_rls_proto_rawDescData = file_envoy_service_ratelimit_v3_rls_proto_rawDesc
607 )
608
609 func file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP() []byte {
610 file_envoy_service_ratelimit_v3_rls_proto_rawDescOnce.Do(func() {
611 file_envoy_service_ratelimit_v3_rls_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_ratelimit_v3_rls_proto_rawDescData)
612 })
613 return file_envoy_service_ratelimit_v3_rls_proto_rawDescData
614 }
615
616 var file_envoy_service_ratelimit_v3_rls_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
617 var file_envoy_service_ratelimit_v3_rls_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
618 var file_envoy_service_ratelimit_v3_rls_proto_goTypes = []interface{}{
619 (RateLimitResponse_Code)(0),
620 (RateLimitResponse_RateLimit_Unit)(0),
621 (*RateLimitRequest)(nil),
622 (*RateLimitResponse)(nil),
623 (*RateLimitResponse_RateLimit)(nil),
624 (*RateLimitResponse_DescriptorStatus)(nil),
625 (*v3.RateLimitDescriptor)(nil),
626 (*v31.HeaderValue)(nil),
627 (*_struct.Struct)(nil),
628 (*duration.Duration)(nil),
629 }
630 var file_envoy_service_ratelimit_v3_rls_proto_depIdxs = []int32{
631 6,
632 0,
633 5,
634 7,
635 7,
636 8,
637 1,
638 0,
639 4,
640 9,
641 2,
642 3,
643 11,
644 10,
645 10,
646 10,
647 0,
648 }
649
650 func init() { file_envoy_service_ratelimit_v3_rls_proto_init() }
651 func file_envoy_service_ratelimit_v3_rls_proto_init() {
652 if File_envoy_service_ratelimit_v3_rls_proto != nil {
653 return
654 }
655 if !protoimpl.UnsafeEnabled {
656 file_envoy_service_ratelimit_v3_rls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
657 switch v := v.(*RateLimitRequest); i {
658 case 0:
659 return &v.state
660 case 1:
661 return &v.sizeCache
662 case 2:
663 return &v.unknownFields
664 default:
665 return nil
666 }
667 }
668 file_envoy_service_ratelimit_v3_rls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
669 switch v := v.(*RateLimitResponse); i {
670 case 0:
671 return &v.state
672 case 1:
673 return &v.sizeCache
674 case 2:
675 return &v.unknownFields
676 default:
677 return nil
678 }
679 }
680 file_envoy_service_ratelimit_v3_rls_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
681 switch v := v.(*RateLimitResponse_RateLimit); i {
682 case 0:
683 return &v.state
684 case 1:
685 return &v.sizeCache
686 case 2:
687 return &v.unknownFields
688 default:
689 return nil
690 }
691 }
692 file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
693 switch v := v.(*RateLimitResponse_DescriptorStatus); i {
694 case 0:
695 return &v.state
696 case 1:
697 return &v.sizeCache
698 case 2:
699 return &v.unknownFields
700 default:
701 return nil
702 }
703 }
704 }
705 type x struct{}
706 out := protoimpl.TypeBuilder{
707 File: protoimpl.DescBuilder{
708 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
709 RawDescriptor: file_envoy_service_ratelimit_v3_rls_proto_rawDesc,
710 NumEnums: 2,
711 NumMessages: 4,
712 NumExtensions: 0,
713 NumServices: 1,
714 },
715 GoTypes: file_envoy_service_ratelimit_v3_rls_proto_goTypes,
716 DependencyIndexes: file_envoy_service_ratelimit_v3_rls_proto_depIdxs,
717 EnumInfos: file_envoy_service_ratelimit_v3_rls_proto_enumTypes,
718 MessageInfos: file_envoy_service_ratelimit_v3_rls_proto_msgTypes,
719 }.Build()
720 File_envoy_service_ratelimit_v3_rls_proto = out.File
721 file_envoy_service_ratelimit_v3_rls_proto_rawDesc = nil
722 file_envoy_service_ratelimit_v3_rls_proto_goTypes = nil
723 file_envoy_service_ratelimit_v3_rls_proto_depIdxs = nil
724 }
725
726
727 var _ context.Context
728 var _ grpc.ClientConnInterface
729
730
731
732 const _ = grpc.SupportPackageIsVersion6
733
734
735
736
737 type RateLimitServiceClient interface {
738
739 ShouldRateLimit(ctx context.Context, in *RateLimitRequest, opts ...grpc.CallOption) (*RateLimitResponse, error)
740 }
741
742 type rateLimitServiceClient struct {
743 cc grpc.ClientConnInterface
744 }
745
746 func NewRateLimitServiceClient(cc grpc.ClientConnInterface) RateLimitServiceClient {
747 return &rateLimitServiceClient{cc}
748 }
749
750 func (c *rateLimitServiceClient) ShouldRateLimit(ctx context.Context, in *RateLimitRequest, opts ...grpc.CallOption) (*RateLimitResponse, error) {
751 out := new(RateLimitResponse)
752 err := c.cc.Invoke(ctx, "/envoy.service.ratelimit.v3.RateLimitService/ShouldRateLimit", in, out, opts...)
753 if err != nil {
754 return nil, err
755 }
756 return out, nil
757 }
758
759
760 type RateLimitServiceServer interface {
761
762 ShouldRateLimit(context.Context, *RateLimitRequest) (*RateLimitResponse, error)
763 }
764
765
766 type UnimplementedRateLimitServiceServer struct {
767 }
768
769 func (*UnimplementedRateLimitServiceServer) ShouldRateLimit(context.Context, *RateLimitRequest) (*RateLimitResponse, error) {
770 return nil, status.Errorf(codes.Unimplemented, "method ShouldRateLimit not implemented")
771 }
772
773 func RegisterRateLimitServiceServer(s *grpc.Server, srv RateLimitServiceServer) {
774 s.RegisterService(&_RateLimitService_serviceDesc, srv)
775 }
776
777 func _RateLimitService_ShouldRateLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
778 in := new(RateLimitRequest)
779 if err := dec(in); err != nil {
780 return nil, err
781 }
782 if interceptor == nil {
783 return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, in)
784 }
785 info := &grpc.UnaryServerInfo{
786 Server: srv,
787 FullMethod: "/envoy.service.ratelimit.v3.RateLimitService/ShouldRateLimit",
788 }
789 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
790 return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, req.(*RateLimitRequest))
791 }
792 return interceptor(ctx, in, info, handler)
793 }
794
795 var _RateLimitService_serviceDesc = grpc.ServiceDesc{
796 ServiceName: "envoy.service.ratelimit.v3.RateLimitService",
797 HandlerType: (*RateLimitServiceServer)(nil),
798 Methods: []grpc.MethodDesc{
799 {
800 MethodName: "ShouldRateLimit",
801 Handler: _RateLimitService_ShouldRateLimit_Handler,
802 },
803 },
804 Streams: []grpc.StreamDesc{},
805 Metadata: "envoy/service/ratelimit/v3/rls.proto",
806 }
807
View as plain text