-
Notifications
You must be signed in to change notification settings - Fork 0
/
rate_limit.pb.go
175 lines (157 loc) · 7.64 KB
/
rate_limit.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/filter/http/rate_limit/v2/rate_limit.proto
package envoy_config_filter_http_rate_limit_v2
import (
fmt "fmt"
v2 "github.com/altipla-consulting/envoy-api/envoy/config/ratelimit/v2"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
types "github.com/gogo/protobuf/types"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// [#next-free-field: 8]
type RateLimit struct {
// The rate limit domain to use when calling the rate limit service.
Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
// Specifies the rate limit configurations to be applied with the same
// stage number. If not set, the default stage number is 0.
//
// .. note::
//
// The filter supports a range of 0 - 10 inclusively for stage numbers.
Stage uint32 `protobuf:"varint,2,opt,name=stage,proto3" json:"stage,omitempty"`
// The type of requests the filter should apply to. The supported
// types are *internal*, *external* or *both*. A request is considered internal if
// :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is set to true. If
// :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is not set or false, a
// request is considered external. The filter defaults to *both*, and it will apply to all request
// types.
RequestType string `protobuf:"bytes,3,opt,name=request_type,json=requestType,proto3" json:"request_type,omitempty"`
// The timeout in milliseconds for the rate limit service RPC. If not
// set, this defaults to 20ms.
Timeout *types.Duration `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"`
// The filter's behaviour in case the rate limiting service does
// not respond back. When it is set to true, Envoy will not allow traffic in case of
// communication failure between rate limiting service and the proxy.
// Defaults to false.
FailureModeDeny bool `protobuf:"varint,5,opt,name=failure_mode_deny,json=failureModeDeny,proto3" json:"failure_mode_deny,omitempty"`
// Specifies whether a `RESOURCE_EXHAUSTED` gRPC code must be returned instead
// of the default `UNAVAILABLE` gRPC code for a rate limited gRPC call. The
// HTTP code will be 200 for a gRPC response.
RateLimitedAsResourceExhausted bool `protobuf:"varint,6,opt,name=rate_limited_as_resource_exhausted,json=rateLimitedAsResourceExhausted,proto3" json:"rate_limited_as_resource_exhausted,omitempty"`
// Configuration for an external rate limit service provider. If not
// specified, any calls to the rate limit service will immediately return
// success.
RateLimitService *v2.RateLimitServiceConfig `protobuf:"bytes,7,opt,name=rate_limit_service,json=rateLimitService,proto3" json:"rate_limit_service,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RateLimit) Reset() { *m = RateLimit{} }
func (m *RateLimit) String() string { return proto.CompactTextString(m) }
func (*RateLimit) ProtoMessage() {}
func (*RateLimit) Descriptor() ([]byte, []int) {
return fileDescriptor_af348a51c982d3a6, []int{0}
}
func (m *RateLimit) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RateLimit.Unmarshal(m, b)
}
func (m *RateLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RateLimit.Marshal(b, m, deterministic)
}
func (m *RateLimit) XXX_Merge(src proto.Message) {
xxx_messageInfo_RateLimit.Merge(m, src)
}
func (m *RateLimit) XXX_Size() int {
return xxx_messageInfo_RateLimit.Size(m)
}
func (m *RateLimit) XXX_DiscardUnknown() {
xxx_messageInfo_RateLimit.DiscardUnknown(m)
}
var xxx_messageInfo_RateLimit proto.InternalMessageInfo
func (m *RateLimit) GetDomain() string {
if m != nil {
return m.Domain
}
return ""
}
func (m *RateLimit) GetStage() uint32 {
if m != nil {
return m.Stage
}
return 0
}
func (m *RateLimit) GetRequestType() string {
if m != nil {
return m.RequestType
}
return ""
}
func (m *RateLimit) GetTimeout() *types.Duration {
if m != nil {
return m.Timeout
}
return nil
}
func (m *RateLimit) GetFailureModeDeny() bool {
if m != nil {
return m.FailureModeDeny
}
return false
}
func (m *RateLimit) GetRateLimitedAsResourceExhausted() bool {
if m != nil {
return m.RateLimitedAsResourceExhausted
}
return false
}
func (m *RateLimit) GetRateLimitService() *v2.RateLimitServiceConfig {
if m != nil {
return m.RateLimitService
}
return nil
}
func init() {
proto.RegisterType((*RateLimit)(nil), "envoy.config.filter.http.rate_limit.v2.RateLimit")
}
func init() {
proto.RegisterFile("envoy/config/filter/http/rate_limit/v2/rate_limit.proto", fileDescriptor_af348a51c982d3a6)
}
var fileDescriptor_af348a51c982d3a6 = []byte{
// 404 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcb, 0x6e, 0xd4, 0x30,
0x14, 0x95, 0xa7, 0x9d, 0x99, 0xd6, 0xe5, 0x51, 0xbc, 0xc1, 0x54, 0xa2, 0x84, 0x22, 0xa1, 0x51,
0x17, 0xb6, 0x98, 0x22, 0xb1, 0x26, 0x14, 0x09, 0x21, 0x90, 0x2a, 0xc3, 0xde, 0x72, 0xc7, 0x37,
0xa9, 0xa5, 0x24, 0x0e, 0xb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