github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/grpc/internal/proto/grpc_lookup_v1/rls.pb.go (about) 1 // Copyright 2020 The gRPC Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Code generated by protoc-gen-go. DO NOT EDIT. 16 // versions: 17 // protoc-gen-go v1.25.0 18 // protoc v3.14.0 19 // source: grpc/lookup/v1/rls.proto 20 21 package grpc_lookup_v1 22 23 import ( 24 proto "github.com/golang/protobuf/proto" 25 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 26 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 27 reflect "reflect" 28 sync "sync" 29 ) 30 31 const ( 32 // Verify that this generated code is sufficiently up-to-date. 33 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 34 // Verify that runtime/protoimpl is sufficiently up-to-date. 35 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 36 ) 37 38 // This is a compile-time assertion that a sufficiently up-to-date version 39 // of the legacy proto package is being used. 40 const _ = proto.ProtoPackageIsVersion4 41 42 // Possible reasons for making a request. 43 type RouteLookupRequest_Reason int32 44 45 const ( 46 RouteLookupRequest_REASON_UNKNOWN RouteLookupRequest_Reason = 0 // Unused 47 RouteLookupRequest_REASON_MISS RouteLookupRequest_Reason = 1 // No data available in local cache 48 RouteLookupRequest_REASON_STALE RouteLookupRequest_Reason = 2 // Data in local cache is stale 49 ) 50 51 // Enum value maps for RouteLookupRequest_Reason. 52 var ( 53 RouteLookupRequest_Reason_name = map[int32]string{ 54 0: "REASON_UNKNOWN", 55 1: "REASON_MISS", 56 2: "REASON_STALE", 57 } 58 RouteLookupRequest_Reason_value = map[string]int32{ 59 "REASON_UNKNOWN": 0, 60 "REASON_MISS": 1, 61 "REASON_STALE": 2, 62 } 63 ) 64 65 func (x RouteLookupRequest_Reason) Enum() *RouteLookupRequest_Reason { 66 p := new(RouteLookupRequest_Reason) 67 *p = x 68 return p 69 } 70 71 func (x RouteLookupRequest_Reason) String() string { 72 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 73 } 74 75 func (RouteLookupRequest_Reason) Descriptor() protoreflect.EnumDescriptor { 76 return file_grpc_lookup_v1_rls_proto_enumTypes[0].Descriptor() 77 } 78 79 func (RouteLookupRequest_Reason) Type() protoreflect.EnumType { 80 return &file_grpc_lookup_v1_rls_proto_enumTypes[0] 81 } 82 83 func (x RouteLookupRequest_Reason) Number() protoreflect.EnumNumber { 84 return protoreflect.EnumNumber(x) 85 } 86 87 // Deprecated: Use RouteLookupRequest_Reason.Descriptor instead. 88 func (RouteLookupRequest_Reason) EnumDescriptor() ([]byte, []int) { 89 return file_grpc_lookup_v1_rls_proto_rawDescGZIP(), []int{0, 0} 90 } 91 92 type RouteLookupRequest struct { 93 state protoimpl.MessageState 94 sizeCache protoimpl.SizeCache 95 unknownFields protoimpl.UnknownFields 96 97 // Target type allows the client to specify what kind of target format it 98 // would like from RLS to allow it to find the regional server, e.g. "grpc". 99 TargetType string `protobuf:"bytes,3,opt,name=target_type,json=targetType,proto3" json:"target_type,omitempty"` 100 // Reason for making this request. 101 Reason RouteLookupRequest_Reason `protobuf:"varint,5,opt,name=reason,proto3,enum=grpc.lookup.v1.RouteLookupRequest_Reason" json:"reason,omitempty"` 102 // For REASON_STALE, the header_data from the stale response, if any. 103 StaleHeaderData string `protobuf:"bytes,6,opt,name=stale_header_data,json=staleHeaderData,proto3" json:"stale_header_data,omitempty"` 104 // Map of key values extracted via key builders for the gRPC or HTTP request. 105 KeyMap map[string]string `protobuf:"bytes,4,rep,name=key_map,json=keyMap,proto3" json:"key_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 106 } 107 108 func (x *RouteLookupRequest) Reset() { 109 *x = RouteLookupRequest{} 110 if protoimpl.UnsafeEnabled { 111 mi := &file_grpc_lookup_v1_rls_proto_msgTypes[0] 112 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 113 ms.StoreMessageInfo(mi) 114 } 115 } 116 117 func (x *RouteLookupRequest) String() string { 118 return protoimpl.X.MessageStringOf(x) 119 } 120 121 func (*RouteLookupRequest) ProtoMessage() {} 122 123 func (x *RouteLookupRequest) ProtoReflect() protoreflect.Message { 124 mi := &file_grpc_lookup_v1_rls_proto_msgTypes[0] 125 if protoimpl.UnsafeEnabled && x != nil { 126 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 127 if ms.LoadMessageInfo() == nil { 128 ms.StoreMessageInfo(mi) 129 } 130 return ms 131 } 132 return mi.MessageOf(x) 133 } 134 135 // Deprecated: Use RouteLookupRequest.ProtoReflect.Descriptor instead. 136 func (*RouteLookupRequest) Descriptor() ([]byte, []int) { 137 return file_grpc_lookup_v1_rls_proto_rawDescGZIP(), []int{0} 138 } 139 140 func (x *RouteLookupRequest) GetTargetType() string { 141 if x != nil { 142 return x.TargetType 143 } 144 return "" 145 } 146 147 func (x *RouteLookupRequest) GetReason() RouteLookupRequest_Reason { 148 if x != nil { 149 return x.Reason 150 } 151 return RouteLookupRequest_REASON_UNKNOWN 152 } 153 154 func (x *RouteLookupRequest) GetStaleHeaderData() string { 155 if x != nil { 156 return x.StaleHeaderData 157 } 158 return "" 159 } 160 161 func (x *RouteLookupRequest) GetKeyMap() map[string]string { 162 if x != nil { 163 return x.KeyMap 164 } 165 return nil 166 } 167 168 type RouteLookupResponse struct { 169 state protoimpl.MessageState 170 sizeCache protoimpl.SizeCache 171 unknownFields protoimpl.UnknownFields 172 173 // Prioritized list (best one first) of addressable entities to use 174 // for routing, using syntax requested by the request target_type. 175 // The targets will be tried in order until a healthy one is found. 176 Targets []string `protobuf:"bytes,3,rep,name=targets,proto3" json:"targets,omitempty"` 177 // Optional header value to pass along to AFE in the X-Google-RLS-Data header. 178 // Cached with "target" and sent with all requests that match the request key. 179 // Allows the RLS to pass its work product to the eventual target. 180 HeaderData string `protobuf:"bytes,2,opt,name=header_data,json=headerData,proto3" json:"header_data,omitempty"` 181 } 182 183 func (x *RouteLookupResponse) Reset() { 184 *x = RouteLookupResponse{} 185 if protoimpl.UnsafeEnabled { 186 mi := &file_grpc_lookup_v1_rls_proto_msgTypes[1] 187 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 188 ms.StoreMessageInfo(mi) 189 } 190 } 191 192 func (x *RouteLookupResponse) String() string { 193 return protoimpl.X.MessageStringOf(x) 194 } 195 196 func (*RouteLookupResponse) ProtoMessage() {} 197 198 func (x *RouteLookupResponse) ProtoReflect() protoreflect.Message { 199 mi := &file_grpc_lookup_v1_rls_proto_msgTypes[1] 200 if protoimpl.UnsafeEnabled && x != nil { 201 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 202 if ms.LoadMessageInfo() == nil { 203 ms.StoreMessageInfo(mi) 204 } 205 return ms 206 } 207 return mi.MessageOf(x) 208 } 209 210 // Deprecated: Use RouteLookupResponse.ProtoReflect.Descriptor instead. 211 func (*RouteLookupResponse) Descriptor() ([]byte, []int) { 212 return file_grpc_lookup_v1_rls_proto_rawDescGZIP(), []int{1} 213 } 214 215 func (x *RouteLookupResponse) GetTargets() []string { 216 if x != nil { 217 return x.Targets 218 } 219 return nil 220 } 221 222 func (x *RouteLookupResponse) GetHeaderData() string { 223 if x != nil { 224 return x.HeaderData 225 } 226 return "" 227 } 228 229 var File_grpc_lookup_v1_rls_proto protoreflect.FileDescriptor 230 231 var file_grpc_lookup_v1_rls_proto_rawDesc = []byte{ 232 0x0a, 0x18, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x2f, 0x76, 0x31, 233 0x2f, 0x72, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x72, 0x70, 0x63, 234 0x2e, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x22, 0x83, 0x03, 0x0a, 0x12, 0x52, 235 0x6f, 0x75, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 236 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 237 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 238 0x70, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 239 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 240 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 241 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 242 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x5f, 0x68, 243 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 244 0x52, 0x0f, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, 0x61, 0x74, 245 0x61, 0x12, 0x47, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x04, 0x20, 0x03, 246 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 247 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 248 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 249 0x72, 0x79, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x1a, 0x39, 0x0a, 0x0b, 0x4b, 0x65, 250 0x79, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 251 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 252 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 253 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3f, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 254 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 255 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 256 0x53, 0x53, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 257 0x54, 0x41, 0x4c, 0x45, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 258 0x10, 0x03, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 259 0x22, 0x5e, 0x0a, 0x13, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 260 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 261 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 262 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 263 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, 0x61, 264 0x74, 0x61, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 265 0x32, 0x6e, 0x0a, 0x12, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 266 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4c, 267 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6c, 0x6f, 0x6f, 268 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 269 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 270 0x2e, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 271 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 272 0x42, 0x4d, 0x0a, 0x11, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6c, 0x6f, 0x6f, 0x6b, 273 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 274 0x01, 0x5a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 275 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 276 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x76, 0x31, 0x62, 277 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 278 } 279 280 var ( 281 file_grpc_lookup_v1_rls_proto_rawDescOnce sync.Once 282 file_grpc_lookup_v1_rls_proto_rawDescData = file_grpc_lookup_v1_rls_proto_rawDesc 283 ) 284 285 func file_grpc_lookup_v1_rls_proto_rawDescGZIP() []byte { 286 file_grpc_lookup_v1_rls_proto_rawDescOnce.Do(func() { 287 file_grpc_lookup_v1_rls_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_lookup_v1_rls_proto_rawDescData) 288 }) 289 return file_grpc_lookup_v1_rls_proto_rawDescData 290 } 291 292 var file_grpc_lookup_v1_rls_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 293 var file_grpc_lookup_v1_rls_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 294 var file_grpc_lookup_v1_rls_proto_goTypes = []interface{}{ 295 (RouteLookupRequest_Reason)(0), // 0: grpc.lookup.v1.RouteLookupRequest.Reason 296 (*RouteLookupRequest)(nil), // 1: grpc.lookup.v1.RouteLookupRequest 297 (*RouteLookupResponse)(nil), // 2: grpc.lookup.v1.RouteLookupResponse 298 nil, // 3: grpc.lookup.v1.RouteLookupRequest.KeyMapEntry 299 } 300 var file_grpc_lookup_v1_rls_proto_depIdxs = []int32{ 301 0, // 0: grpc.lookup.v1.RouteLookupRequest.reason:type_name -> grpc.lookup.v1.RouteLookupRequest.Reason 302 3, // 1: grpc.lookup.v1.RouteLookupRequest.key_map:type_name -> grpc.lookup.v1.RouteLookupRequest.KeyMapEntry 303 1, // 2: grpc.lookup.v1.RouteLookupService.RouteLookup:input_type -> grpc.lookup.v1.RouteLookupRequest 304 2, // 3: grpc.lookup.v1.RouteLookupService.RouteLookup:output_type -> grpc.lookup.v1.RouteLookupResponse 305 3, // [3:4] is the sub-list for method output_type 306 2, // [2:3] is the sub-list for method input_type 307 2, // [2:2] is the sub-list for extension type_name 308 2, // [2:2] is the sub-list for extension extendee 309 0, // [0:2] is the sub-list for field type_name 310 } 311 312 func init() { file_grpc_lookup_v1_rls_proto_init() } 313 func file_grpc_lookup_v1_rls_proto_init() { 314 if File_grpc_lookup_v1_rls_proto != nil { 315 return 316 } 317 if !protoimpl.UnsafeEnabled { 318 file_grpc_lookup_v1_rls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 319 switch v := v.(*RouteLookupRequest); i { 320 case 0: 321 return &v.state 322 case 1: 323 return &v.sizeCache 324 case 2: 325 return &v.unknownFields 326 default: 327 return nil 328 } 329 } 330 file_grpc_lookup_v1_rls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 331 switch v := v.(*RouteLookupResponse); i { 332 case 0: 333 return &v.state 334 case 1: 335 return &v.sizeCache 336 case 2: 337 return &v.unknownFields 338 default: 339 return nil 340 } 341 } 342 } 343 type x struct{} 344 out := protoimpl.TypeBuilder{ 345 File: protoimpl.DescBuilder{ 346 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 347 RawDescriptor: file_grpc_lookup_v1_rls_proto_rawDesc, 348 NumEnums: 1, 349 NumMessages: 3, 350 NumExtensions: 0, 351 NumServices: 1, 352 }, 353 GoTypes: file_grpc_lookup_v1_rls_proto_goTypes, 354 DependencyIndexes: file_grpc_lookup_v1_rls_proto_depIdxs, 355 EnumInfos: file_grpc_lookup_v1_rls_proto_enumTypes, 356 MessageInfos: file_grpc_lookup_v1_rls_proto_msgTypes, 357 }.Build() 358 File_grpc_lookup_v1_rls_proto = out.File 359 file_grpc_lookup_v1_rls_proto_rawDesc = nil 360 file_grpc_lookup_v1_rls_proto_goTypes = nil 361 file_grpc_lookup_v1_rls_proto_depIdxs = nil 362 }