google.golang.org/grpc@v1.74.2/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.36.6 18 // protoc v5.27.1 19 // source: grpc/lookup/v1/rls.proto 20 21 package grpc_lookup_v1 22 23 import ( 24 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 25 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 26 anypb "google.golang.org/protobuf/types/known/anypb" 27 reflect "reflect" 28 sync "sync" 29 unsafe "unsafe" 30 ) 31 32 const ( 33 // Verify that this generated code is sufficiently up-to-date. 34 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 35 // Verify that runtime/protoimpl is sufficiently up-to-date. 36 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 37 ) 38 39 // Possible reasons for making a request. 40 type RouteLookupRequest_Reason int32 41 42 const ( 43 RouteLookupRequest_REASON_UNKNOWN RouteLookupRequest_Reason = 0 // Unused 44 RouteLookupRequest_REASON_MISS RouteLookupRequest_Reason = 1 // No data available in local cache 45 RouteLookupRequest_REASON_STALE RouteLookupRequest_Reason = 2 // Data in local cache is stale 46 ) 47 48 // Enum value maps for RouteLookupRequest_Reason. 49 var ( 50 RouteLookupRequest_Reason_name = map[int32]string{ 51 0: "REASON_UNKNOWN", 52 1: "REASON_MISS", 53 2: "REASON_STALE", 54 } 55 RouteLookupRequest_Reason_value = map[string]int32{ 56 "REASON_UNKNOWN": 0, 57 "REASON_MISS": 1, 58 "REASON_STALE": 2, 59 } 60 ) 61 62 func (x RouteLookupRequest_Reason) Enum() *RouteLookupRequest_Reason { 63 p := new(RouteLookupRequest_Reason) 64 *p = x 65 return p 66 } 67 68 func (x RouteLookupRequest_Reason) String() string { 69 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 70 } 71 72 func (RouteLookupRequest_Reason) Descriptor() protoreflect.EnumDescriptor { 73 return file_grpc_lookup_v1_rls_proto_enumTypes[0].Descriptor() 74 } 75 76 func (RouteLookupRequest_Reason) Type() protoreflect.EnumType { 77 return &file_grpc_lookup_v1_rls_proto_enumTypes[0] 78 } 79 80 func (x RouteLookupRequest_Reason) Number() protoreflect.EnumNumber { 81 return protoreflect.EnumNumber(x) 82 } 83 84 // Deprecated: Use RouteLookupRequest_Reason.Descriptor instead. 85 func (RouteLookupRequest_Reason) EnumDescriptor() ([]byte, []int) { 86 return file_grpc_lookup_v1_rls_proto_rawDescGZIP(), []int{0, 0} 87 } 88 89 type RouteLookupRequest struct { 90 state protoimpl.MessageState `protogen:"open.v1"` 91 // Target type allows the client to specify what kind of target format it 92 // would like from RLS to allow it to find the regional server, e.g. "grpc". 93 TargetType string `protobuf:"bytes,3,opt,name=target_type,json=targetType,proto3" json:"target_type,omitempty"` 94 // Reason for making this request. 95 Reason RouteLookupRequest_Reason `protobuf:"varint,5,opt,name=reason,proto3,enum=grpc.lookup.v1.RouteLookupRequest_Reason" json:"reason,omitempty"` 96 // For REASON_STALE, the header_data from the stale response, if any. 97 StaleHeaderData string `protobuf:"bytes,6,opt,name=stale_header_data,json=staleHeaderData,proto3" json:"stale_header_data,omitempty"` 98 // Map of key values extracted via key builders for the gRPC or HTTP request. 99 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" protobuf_val:"bytes,2,opt,name=value"` 100 // Application-specific optional extensions. 101 Extensions []*anypb.Any `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty"` 102 unknownFields protoimpl.UnknownFields 103 sizeCache protoimpl.SizeCache 104 } 105 106 func (x *RouteLookupRequest) Reset() { 107 *x = RouteLookupRequest{} 108 mi := &file_grpc_lookup_v1_rls_proto_msgTypes[0] 109 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 110 ms.StoreMessageInfo(mi) 111 } 112 113 func (x *RouteLookupRequest) String() string { 114 return protoimpl.X.MessageStringOf(x) 115 } 116 117 func (*RouteLookupRequest) ProtoMessage() {} 118 119 func (x *RouteLookupRequest) ProtoReflect() protoreflect.Message { 120 mi := &file_grpc_lookup_v1_rls_proto_msgTypes[0] 121 if x != nil { 122 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 123 if ms.LoadMessageInfo() == nil { 124 ms.StoreMessageInfo(mi) 125 } 126 return ms 127 } 128 return mi.MessageOf(x) 129 } 130 131 // Deprecated: Use RouteLookupRequest.ProtoReflect.Descriptor instead. 132 func (*RouteLookupRequest) Descriptor() ([]byte, []int) { 133 return file_grpc_lookup_v1_rls_proto_rawDescGZIP(), []int{0} 134 } 135 136 func (x *RouteLookupRequest) GetTargetType() string { 137 if x != nil { 138 return x.TargetType 139 } 140 return "" 141 } 142 143 func (x *RouteLookupRequest) GetReason() RouteLookupRequest_Reason { 144 if x != nil { 145 return x.Reason 146 } 147 return RouteLookupRequest_REASON_UNKNOWN 148 } 149 150 func (x *RouteLookupRequest) GetStaleHeaderData() string { 151 if x != nil { 152 return x.StaleHeaderData 153 } 154 return "" 155 } 156 157 func (x *RouteLookupRequest) GetKeyMap() map[string]string { 158 if x != nil { 159 return x.KeyMap 160 } 161 return nil 162 } 163 164 func (x *RouteLookupRequest) GetExtensions() []*anypb.Any { 165 if x != nil { 166 return x.Extensions 167 } 168 return nil 169 } 170 171 type RouteLookupResponse struct { 172 state protoimpl.MessageState `protogen:"open.v1"` 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 // Application-specific optional extensions. 182 Extensions []*anypb.Any `protobuf:"bytes,4,rep,name=extensions,proto3" json:"extensions,omitempty"` 183 unknownFields protoimpl.UnknownFields 184 sizeCache protoimpl.SizeCache 185 } 186 187 func (x *RouteLookupResponse) Reset() { 188 *x = RouteLookupResponse{} 189 mi := &file_grpc_lookup_v1_rls_proto_msgTypes[1] 190 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 191 ms.StoreMessageInfo(mi) 192 } 193 194 func (x *RouteLookupResponse) String() string { 195 return protoimpl.X.MessageStringOf(x) 196 } 197 198 func (*RouteLookupResponse) ProtoMessage() {} 199 200 func (x *RouteLookupResponse) ProtoReflect() protoreflect.Message { 201 mi := &file_grpc_lookup_v1_rls_proto_msgTypes[1] 202 if x != nil { 203 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 204 if ms.LoadMessageInfo() == nil { 205 ms.StoreMessageInfo(mi) 206 } 207 return ms 208 } 209 return mi.MessageOf(x) 210 } 211 212 // Deprecated: Use RouteLookupResponse.ProtoReflect.Descriptor instead. 213 func (*RouteLookupResponse) Descriptor() ([]byte, []int) { 214 return file_grpc_lookup_v1_rls_proto_rawDescGZIP(), []int{1} 215 } 216 217 func (x *RouteLookupResponse) GetTargets() []string { 218 if x != nil { 219 return x.Targets 220 } 221 return nil 222 } 223 224 func (x *RouteLookupResponse) GetHeaderData() string { 225 if x != nil { 226 return x.HeaderData 227 } 228 return "" 229 } 230 231 func (x *RouteLookupResponse) GetExtensions() []*anypb.Any { 232 if x != nil { 233 return x.Extensions 234 } 235 return nil 236 } 237 238 var File_grpc_lookup_v1_rls_proto protoreflect.FileDescriptor 239 240 const file_grpc_lookup_v1_rls_proto_rawDesc = "" + 241 "\n" + 242 "\x18grpc/lookup/v1/rls.proto\x12\x0egrpc.lookup.v1\x1a\x19google/protobuf/any.proto\"\xb9\x03\n" + 243 "\x12RouteLookupRequest\x12\x1f\n" + 244 "\vtarget_type\x18\x03 \x01(\tR\n" + 245 "targetType\x12A\n" + 246 "\x06reason\x18\x05 \x01(\x0e2).grpc.lookup.v1.RouteLookupRequest.ReasonR\x06reason\x12*\n" + 247 "\x11stale_header_data\x18\x06 \x01(\tR\x0fstaleHeaderData\x12G\n" + 248 "\akey_map\x18\x04 \x03(\v2..grpc.lookup.v1.RouteLookupRequest.KeyMapEntryR\x06keyMap\x124\n" + 249 "\n" + 250 "extensions\x18\a \x03(\v2\x14.google.protobuf.AnyR\n" + 251 "extensions\x1a9\n" + 252 "\vKeyMapEntry\x12\x10\n" + 253 "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + 254 "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"?\n" + 255 "\x06Reason\x12\x12\n" + 256 "\x0eREASON_UNKNOWN\x10\x00\x12\x0f\n" + 257 "\vREASON_MISS\x10\x01\x12\x10\n" + 258 "\fREASON_STALE\x10\x02J\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\x06serverR\x04path\"\x94\x01\n" + 259 "\x13RouteLookupResponse\x12\x18\n" + 260 "\atargets\x18\x03 \x03(\tR\atargets\x12\x1f\n" + 261 "\vheader_data\x18\x02 \x01(\tR\n" + 262 "headerData\x124\n" + 263 "\n" + 264 "extensions\x18\x04 \x03(\v2\x14.google.protobuf.AnyR\n" + 265 "extensionsJ\x04\b\x01\x10\x02R\x06target2n\n" + 266 "\x12RouteLookupService\x12X\n" + 267 "\vRouteLookup\x12\".grpc.lookup.v1.RouteLookupRequest\x1a#.grpc.lookup.v1.RouteLookupResponse\"\x00BM\n" + 268 "\x11io.grpc.lookup.v1B\bRlsProtoP\x01Z,google.golang.org/grpc/lookup/grpc_lookup_v1b\x06proto3" 269 270 var ( 271 file_grpc_lookup_v1_rls_proto_rawDescOnce sync.Once 272 file_grpc_lookup_v1_rls_proto_rawDescData []byte 273 ) 274 275 func file_grpc_lookup_v1_rls_proto_rawDescGZIP() []byte { 276 file_grpc_lookup_v1_rls_proto_rawDescOnce.Do(func() { 277 file_grpc_lookup_v1_rls_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_grpc_lookup_v1_rls_proto_rawDesc), len(file_grpc_lookup_v1_rls_proto_rawDesc))) 278 }) 279 return file_grpc_lookup_v1_rls_proto_rawDescData 280 } 281 282 var file_grpc_lookup_v1_rls_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 283 var file_grpc_lookup_v1_rls_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 284 var file_grpc_lookup_v1_rls_proto_goTypes = []any{ 285 (RouteLookupRequest_Reason)(0), // 0: grpc.lookup.v1.RouteLookupRequest.Reason 286 (*RouteLookupRequest)(nil), // 1: grpc.lookup.v1.RouteLookupRequest 287 (*RouteLookupResponse)(nil), // 2: grpc.lookup.v1.RouteLookupResponse 288 nil, // 3: grpc.lookup.v1.RouteLookupRequest.KeyMapEntry 289 (*anypb.Any)(nil), // 4: google.protobuf.Any 290 } 291 var file_grpc_lookup_v1_rls_proto_depIdxs = []int32{ 292 0, // 0: grpc.lookup.v1.RouteLookupRequest.reason:type_name -> grpc.lookup.v1.RouteLookupRequest.Reason 293 3, // 1: grpc.lookup.v1.RouteLookupRequest.key_map:type_name -> grpc.lookup.v1.RouteLookupRequest.KeyMapEntry 294 4, // 2: grpc.lookup.v1.RouteLookupRequest.extensions:type_name -> google.protobuf.Any 295 4, // 3: grpc.lookup.v1.RouteLookupResponse.extensions:type_name -> google.protobuf.Any 296 1, // 4: grpc.lookup.v1.RouteLookupService.RouteLookup:input_type -> grpc.lookup.v1.RouteLookupRequest 297 2, // 5: grpc.lookup.v1.RouteLookupService.RouteLookup:output_type -> grpc.lookup.v1.RouteLookupResponse 298 5, // [5:6] is the sub-list for method output_type 299 4, // [4:5] is the sub-list for method input_type 300 4, // [4:4] is the sub-list for extension type_name 301 4, // [4:4] is the sub-list for extension extendee 302 0, // [0:4] is the sub-list for field type_name 303 } 304 305 func init() { file_grpc_lookup_v1_rls_proto_init() } 306 func file_grpc_lookup_v1_rls_proto_init() { 307 if File_grpc_lookup_v1_rls_proto != nil { 308 return 309 } 310 type x struct{} 311 out := protoimpl.TypeBuilder{ 312 File: protoimpl.DescBuilder{ 313 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 314 RawDescriptor: unsafe.Slice(unsafe.StringData(file_grpc_lookup_v1_rls_proto_rawDesc), len(file_grpc_lookup_v1_rls_proto_rawDesc)), 315 NumEnums: 1, 316 NumMessages: 3, 317 NumExtensions: 0, 318 NumServices: 1, 319 }, 320 GoTypes: file_grpc_lookup_v1_rls_proto_goTypes, 321 DependencyIndexes: file_grpc_lookup_v1_rls_proto_depIdxs, 322 EnumInfos: file_grpc_lookup_v1_rls_proto_enumTypes, 323 MessageInfos: file_grpc_lookup_v1_rls_proto_msgTypes, 324 }.Build() 325 File_grpc_lookup_v1_rls_proto = out.File 326 file_grpc_lookup_v1_rls_proto_goTypes = nil 327 file_grpc_lookup_v1_rls_proto_depIdxs = nil 328 }