1
2
3
4
5
6
7 package grpc_route
8
9 import (
10 http_route "github.com/linkerd/linkerd2-proxy-api/go/http_route"
11 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
12 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
13 reflect "reflect"
14 sync "sync"
15 )
16
17 const (
18
19 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
20
21 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
22 )
23
24 type GrpcRouteMatch struct {
25 state protoimpl.MessageState
26 sizeCache protoimpl.SizeCache
27 unknownFields protoimpl.UnknownFields
28
29 Rpc *GrpcRpcMatch `protobuf:"bytes,1,opt,name=rpc,proto3" json:"rpc,omitempty"`
30
31
32
33 Headers []*http_route.HeaderMatch `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"`
34 }
35
36 func (x *GrpcRouteMatch) Reset() {
37 *x = GrpcRouteMatch{}
38 if protoimpl.UnsafeEnabled {
39 mi := &file_grpc_route_proto_msgTypes[0]
40 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
41 ms.StoreMessageInfo(mi)
42 }
43 }
44
45 func (x *GrpcRouteMatch) String() string {
46 return protoimpl.X.MessageStringOf(x)
47 }
48
49 func (*GrpcRouteMatch) ProtoMessage() {}
50
51 func (x *GrpcRouteMatch) ProtoReflect() protoreflect.Message {
52 mi := &file_grpc_route_proto_msgTypes[0]
53 if protoimpl.UnsafeEnabled && x != nil {
54 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
55 if ms.LoadMessageInfo() == nil {
56 ms.StoreMessageInfo(mi)
57 }
58 return ms
59 }
60 return mi.MessageOf(x)
61 }
62
63
64 func (*GrpcRouteMatch) Descriptor() ([]byte, []int) {
65 return file_grpc_route_proto_rawDescGZIP(), []int{0}
66 }
67
68 func (x *GrpcRouteMatch) GetRpc() *GrpcRpcMatch {
69 if x != nil {
70 return x.Rpc
71 }
72 return nil
73 }
74
75 func (x *GrpcRouteMatch) GetHeaders() []*http_route.HeaderMatch {
76 if x != nil {
77 return x.Headers
78 }
79 return nil
80 }
81
82 type GrpcRpcMatch struct {
83 state protoimpl.MessageState
84 sizeCache protoimpl.SizeCache
85 unknownFields protoimpl.UnknownFields
86
87 Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
88 Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
89 }
90
91 func (x *GrpcRpcMatch) Reset() {
92 *x = GrpcRpcMatch{}
93 if protoimpl.UnsafeEnabled {
94 mi := &file_grpc_route_proto_msgTypes[1]
95 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
96 ms.StoreMessageInfo(mi)
97 }
98 }
99
100 func (x *GrpcRpcMatch) String() string {
101 return protoimpl.X.MessageStringOf(x)
102 }
103
104 func (*GrpcRpcMatch) ProtoMessage() {}
105
106 func (x *GrpcRpcMatch) ProtoReflect() protoreflect.Message {
107 mi := &file_grpc_route_proto_msgTypes[1]
108 if protoimpl.UnsafeEnabled && x != nil {
109 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
110 if ms.LoadMessageInfo() == nil {
111 ms.StoreMessageInfo(mi)
112 }
113 return ms
114 }
115 return mi.MessageOf(x)
116 }
117
118
119 func (*GrpcRpcMatch) Descriptor() ([]byte, []int) {
120 return file_grpc_route_proto_rawDescGZIP(), []int{1}
121 }
122
123 func (x *GrpcRpcMatch) GetService() string {
124 if x != nil {
125 return x.Service
126 }
127 return ""
128 }
129
130 func (x *GrpcRpcMatch) GetMethod() string {
131 if x != nil {
132 return x.Method
133 }
134 return ""
135 }
136
137
138 type GrpcFailureInjector struct {
139 state protoimpl.MessageState
140 sizeCache protoimpl.SizeCache
141 unknownFields protoimpl.UnknownFields
142
143
144 Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
145
146 Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
147
148
149 Ratio *http_route.Ratio `protobuf:"bytes,3,opt,name=ratio,proto3" json:"ratio,omitempty"`
150 }
151
152 func (x *GrpcFailureInjector) Reset() {
153 *x = GrpcFailureInjector{}
154 if protoimpl.UnsafeEnabled {
155 mi := &file_grpc_route_proto_msgTypes[2]
156 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
157 ms.StoreMessageInfo(mi)
158 }
159 }
160
161 func (x *GrpcFailureInjector) String() string {
162 return protoimpl.X.MessageStringOf(x)
163 }
164
165 func (*GrpcFailureInjector) ProtoMessage() {}
166
167 func (x *GrpcFailureInjector) ProtoReflect() protoreflect.Message {
168 mi := &file_grpc_route_proto_msgTypes[2]
169 if protoimpl.UnsafeEnabled && x != nil {
170 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
171 if ms.LoadMessageInfo() == nil {
172 ms.StoreMessageInfo(mi)
173 }
174 return ms
175 }
176 return mi.MessageOf(x)
177 }
178
179
180 func (*GrpcFailureInjector) Descriptor() ([]byte, []int) {
181 return file_grpc_route_proto_rawDescGZIP(), []int{2}
182 }
183
184 func (x *GrpcFailureInjector) GetCode() uint32 {
185 if x != nil {
186 return x.Code
187 }
188 return 0
189 }
190
191 func (x *GrpcFailureInjector) GetMessage() string {
192 if x != nil {
193 return x.Message
194 }
195 return ""
196 }
197
198 func (x *GrpcFailureInjector) GetRatio() *http_route.Ratio {
199 if x != nil {
200 return x.Ratio
201 }
202 return nil
203 }
204
205 var File_grpc_route_proto protoreflect.FileDescriptor
206
207 var file_grpc_route_proto_rawDesc = []byte{
208 0x0a, 0x10, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f,
209 0x74, 0x6f, 0x12, 0x1b, 0x69, 0x6f, 0x2e, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x64, 0x2e, 0x70,
210 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x1a,
211 0x10, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
212 0x6f, 0x22, 0x91, 0x01, 0x0a, 0x0e, 0x47, 0x72, 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d,
213 0x61, 0x74, 0x63, 0x68, 0x12, 0x3b, 0x0a, 0x03, 0x72, 0x70, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28,
214 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6f, 0x2e, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x64, 0x2e, 0x70,
215 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e,
216 0x47, 0x72, 0x70, 0x63, 0x52, 0x70, 0x63, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x03, 0x72, 0x70,
217 0x63, 0x12, 0x42, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03,
218 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x69, 0x6f, 0x2e, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x64, 0x2e,
219 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65,
220 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x68, 0x65,
221 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x40, 0x0a, 0x0c, 0x47, 0x72, 0x70, 0x63, 0x52, 0x70, 0x63,
222 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
223 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
224 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
225 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x7d, 0x0a, 0x13, 0x47, 0x72, 0x70, 0x63, 0x46,
226 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12,
227 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f,
228 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
229 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x05,
230 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f,
231 0x2e, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68,
232 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x52,
233 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
234 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x64, 0x2f, 0x6c, 0x69, 0x6e,
235 0x6b, 0x65, 0x72, 0x64, 0x32, 0x2d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x61, 0x70, 0x69, 0x2f,
236 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x62, 0x06, 0x70,
237 0x72, 0x6f, 0x74, 0x6f, 0x33,
238 }
239
240 var (
241 file_grpc_route_proto_rawDescOnce sync.Once
242 file_grpc_route_proto_rawDescData = file_grpc_route_proto_rawDesc
243 )
244
245 func file_grpc_route_proto_rawDescGZIP() []byte {
246 file_grpc_route_proto_rawDescOnce.Do(func() {
247 file_grpc_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_route_proto_rawDescData)
248 })
249 return file_grpc_route_proto_rawDescData
250 }
251
252 var file_grpc_route_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
253 var file_grpc_route_proto_goTypes = []interface{}{
254 (*GrpcRouteMatch)(nil),
255 (*GrpcRpcMatch)(nil),
256 (*GrpcFailureInjector)(nil),
257 (*http_route.HeaderMatch)(nil),
258 (*http_route.Ratio)(nil),
259 }
260 var file_grpc_route_proto_depIdxs = []int32{
261 1,
262 3,
263 4,
264 3,
265 3,
266 3,
267 3,
268 0,
269 }
270
271 func init() { file_grpc_route_proto_init() }
272 func file_grpc_route_proto_init() {
273 if File_grpc_route_proto != nil {
274 return
275 }
276 if !protoimpl.UnsafeEnabled {
277 file_grpc_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
278 switch v := v.(*GrpcRouteMatch); i {
279 case 0:
280 return &v.state
281 case 1:
282 return &v.sizeCache
283 case 2:
284 return &v.unknownFields
285 default:
286 return nil
287 }
288 }
289 file_grpc_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
290 switch v := v.(*GrpcRpcMatch); i {
291 case 0:
292 return &v.state
293 case 1:
294 return &v.sizeCache
295 case 2:
296 return &v.unknownFields
297 default:
298 return nil
299 }
300 }
301 file_grpc_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
302 switch v := v.(*GrpcFailureInjector); i {
303 case 0:
304 return &v.state
305 case 1:
306 return &v.sizeCache
307 case 2:
308 return &v.unknownFields
309 default:
310 return nil
311 }
312 }
313 }
314 type x struct{}
315 out := protoimpl.TypeBuilder{
316 File: protoimpl.DescBuilder{
317 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
318 RawDescriptor: file_grpc_route_proto_rawDesc,
319 NumEnums: 0,
320 NumMessages: 3,
321 NumExtensions: 0,
322 NumServices: 0,
323 },
324 GoTypes: file_grpc_route_proto_goTypes,
325 DependencyIndexes: file_grpc_route_proto_depIdxs,
326 MessageInfos: file_grpc_route_proto_msgTypes,
327 }.Build()
328 File_grpc_route_proto = out.File
329 file_grpc_route_proto_rawDesc = nil
330 file_grpc_route_proto_goTypes = nil
331 file_grpc_route_proto_depIdxs = nil
332 }
333
View as plain text