google.golang.org/grpc@v1.74.2/internal/proto/grpc_lookup_v1/rls_config.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_config.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 durationpb "google.golang.org/protobuf/types/known/durationpb" 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 // Extract a key based on a given name (e.g. header name or query parameter 40 // name). The name must match one of the names listed in the "name" field. If 41 // the "required_match" field is true, one of the specified names must be 42 // present for the keybuilder to match. 43 type NameMatcher struct { 44 state protoimpl.MessageState `protogen:"open.v1"` 45 // The name that will be used in the RLS key_map to refer to this value. 46 // If required_match is true, you may omit this field or set it to an empty 47 // string, in which case the matcher will require a match, but won't update 48 // the key_map. 49 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 50 // Ordered list of names (headers or query parameter names) that can supply 51 // this value; the first one with a non-empty value is used. 52 Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"` 53 // If true, make this extraction required; the key builder will not match 54 // if no value is found. 55 RequiredMatch bool `protobuf:"varint,3,opt,name=required_match,json=requiredMatch,proto3" json:"required_match,omitempty"` 56 unknownFields protoimpl.UnknownFields 57 sizeCache protoimpl.SizeCache 58 } 59 60 func (x *NameMatcher) Reset() { 61 *x = NameMatcher{} 62 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[0] 63 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 64 ms.StoreMessageInfo(mi) 65 } 66 67 func (x *NameMatcher) String() string { 68 return protoimpl.X.MessageStringOf(x) 69 } 70 71 func (*NameMatcher) ProtoMessage() {} 72 73 func (x *NameMatcher) ProtoReflect() protoreflect.Message { 74 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[0] 75 if x != nil { 76 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 77 if ms.LoadMessageInfo() == nil { 78 ms.StoreMessageInfo(mi) 79 } 80 return ms 81 } 82 return mi.MessageOf(x) 83 } 84 85 // Deprecated: Use NameMatcher.ProtoReflect.Descriptor instead. 86 func (*NameMatcher) Descriptor() ([]byte, []int) { 87 return file_grpc_lookup_v1_rls_config_proto_rawDescGZIP(), []int{0} 88 } 89 90 func (x *NameMatcher) GetKey() string { 91 if x != nil { 92 return x.Key 93 } 94 return "" 95 } 96 97 func (x *NameMatcher) GetNames() []string { 98 if x != nil { 99 return x.Names 100 } 101 return nil 102 } 103 104 func (x *NameMatcher) GetRequiredMatch() bool { 105 if x != nil { 106 return x.RequiredMatch 107 } 108 return false 109 } 110 111 // A GrpcKeyBuilder applies to a given gRPC service, name, and headers. 112 type GrpcKeyBuilder struct { 113 state protoimpl.MessageState `protogen:"open.v1"` 114 Names []*GrpcKeyBuilder_Name `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` 115 ExtraKeys *GrpcKeyBuilder_ExtraKeys `protobuf:"bytes,3,opt,name=extra_keys,json=extraKeys,proto3" json:"extra_keys,omitempty"` 116 // Extract keys from all listed headers. 117 // For gRPC, it is an error to specify "required_match" on the NameMatcher 118 // protos. 119 Headers []*NameMatcher `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` 120 // You can optionally set one or more specific key/value pairs to be added to 121 // the key_map. This can be useful to identify which builder built the key, 122 // for example if you are suppressing the actual method, but need to 123 // separately cache and request all the matched methods. 124 ConstantKeys map[string]string `protobuf:"bytes,4,rep,name=constant_keys,json=constantKeys,proto3" json:"constant_keys,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 125 unknownFields protoimpl.UnknownFields 126 sizeCache protoimpl.SizeCache 127 } 128 129 func (x *GrpcKeyBuilder) Reset() { 130 *x = GrpcKeyBuilder{} 131 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[1] 132 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 133 ms.StoreMessageInfo(mi) 134 } 135 136 func (x *GrpcKeyBuilder) String() string { 137 return protoimpl.X.MessageStringOf(x) 138 } 139 140 func (*GrpcKeyBuilder) ProtoMessage() {} 141 142 func (x *GrpcKeyBuilder) ProtoReflect() protoreflect.Message { 143 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[1] 144 if x != nil { 145 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 146 if ms.LoadMessageInfo() == nil { 147 ms.StoreMessageInfo(mi) 148 } 149 return ms 150 } 151 return mi.MessageOf(x) 152 } 153 154 // Deprecated: Use GrpcKeyBuilder.ProtoReflect.Descriptor instead. 155 func (*GrpcKeyBuilder) Descriptor() ([]byte, []int) { 156 return file_grpc_lookup_v1_rls_config_proto_rawDescGZIP(), []int{1} 157 } 158 159 func (x *GrpcKeyBuilder) GetNames() []*GrpcKeyBuilder_Name { 160 if x != nil { 161 return x.Names 162 } 163 return nil 164 } 165 166 func (x *GrpcKeyBuilder) GetExtraKeys() *GrpcKeyBuilder_ExtraKeys { 167 if x != nil { 168 return x.ExtraKeys 169 } 170 return nil 171 } 172 173 func (x *GrpcKeyBuilder) GetHeaders() []*NameMatcher { 174 if x != nil { 175 return x.Headers 176 } 177 return nil 178 } 179 180 func (x *GrpcKeyBuilder) GetConstantKeys() map[string]string { 181 if x != nil { 182 return x.ConstantKeys 183 } 184 return nil 185 } 186 187 // An HttpKeyBuilder applies to a given HTTP URL and headers. 188 // 189 // Path and host patterns use the matching syntax from gRPC transcoding to 190 // extract named key/value pairs from the path and host components of the URL: 191 // https://github.com/googleapis/googleapis/blob/master/google/api/http.proto 192 // 193 // It is invalid to specify the same key name in multiple places in a pattern. 194 // 195 // For a service where the project id can be expressed either as a subdomain or 196 // in the path, separate HttpKeyBuilders must be used: 197 // 198 // host_pattern: 'example.com' path_pattern: '/{id}/{object}/**' 199 // host_pattern: '{id}.example.com' path_pattern: '/{object}/**' 200 // 201 // If the host is exactly 'example.com', the first path segment will be used as 202 // the id and the second segment as the object. If the host has a subdomain, the 203 // subdomain will be used as the id and the first segment as the object. If 204 // neither pattern matches, no keys will be extracted. 205 type HttpKeyBuilder struct { 206 state protoimpl.MessageState `protogen:"open.v1"` 207 // host_pattern is an ordered list of host template patterns for the desired 208 // value. If any host_pattern values are specified, then at least one must 209 // match, and the last one wins and sets any specified variables. A host 210 // consists of labels separated by dots. Each label is matched against the 211 // label in the pattern as follows: 212 // - "*": Matches any single label. 213 // - "**": Matches zero or more labels (first or last part of host only). 214 // - "{<name>=...}": One or more label capture, where "..." can be any 215 // template that does not include a capture. 216 // - "{<name>}": A single label capture. Identical to {<name>=*}. 217 // 218 // Examples: 219 // - "example.com": Only applies to the exact host example.com. 220 // - "*.example.com": Matches subdomains of example.com. 221 // - "**.example.com": matches example.com, and all levels of subdomains. 222 // - "{project}.example.com": Extracts the third level subdomain. 223 // - "{project=**}.example.com": Extracts the third level+ subdomains. 224 // - "{project=**}": Extracts the entire host. 225 HostPatterns []string `protobuf:"bytes,1,rep,name=host_patterns,json=hostPatterns,proto3" json:"host_patterns,omitempty"` 226 // path_pattern is an ordered list of path template patterns for the desired 227 // value. If any path_pattern values are specified, then at least one must 228 // match, and the last one wins and sets any specified variables. A path 229 // consists of segments separated by slashes. Each segment is matched against 230 // the segment in the pattern as follows: 231 // - "*": Matches any single segment. 232 // - "**": Matches zero or more segments (first or last part of path only). 233 // - "{<name>=...}": One or more segment capture, where "..." can be any 234 // template that does not include a capture. 235 // - "{<name>}": A single segment capture. Identical to {<name>=*}. 236 // 237 // A custom method may also be specified by appending ":" and the custom 238 // method name or "*" to indicate any custom method (including no custom 239 // method). For example, "/*/projects/{project_id}/**:*" extracts 240 // `{project_id}` for any version, resource and custom method that includes 241 // it. By default, any custom method will be matched. 242 // 243 // Examples: 244 // - "/v1/{name=messages/*}": extracts a name like "messages/12345". 245 // - "/v1/messages/{message_id}": extracts a message_id like "12345". 246 // - "/v1/users/{user_id}/messages/{message_id}": extracts two key values. 247 PathPatterns []string `protobuf:"bytes,2,rep,name=path_patterns,json=pathPatterns,proto3" json:"path_patterns,omitempty"` 248 // List of query parameter names to try to match. 249 // For example: ["parent", "name", "resource.name"] 250 // We extract all the specified query_parameters (case-sensitively). If any 251 // are marked as "required_match" and are not present, this keybuilder fails 252 // to match. If a given parameter appears multiple times (?foo=a&foo=b) we 253 // will report it as a comma-separated string (foo=a,b). 254 QueryParameters []*NameMatcher `protobuf:"bytes,3,rep,name=query_parameters,json=queryParameters,proto3" json:"query_parameters,omitempty"` 255 // List of headers to try to match. 256 // We extract all the specified header values (case-insensitively). If any 257 // are marked as "required_match" and are not present, this keybuilder fails 258 // to match. If a given header appears multiple times in the request we will 259 // report it as a comma-separated string, in standard HTTP fashion. 260 Headers []*NameMatcher `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"` 261 // You can optionally set one or more specific key/value pairs to be added to 262 // the key_map. This can be useful to identify which builder built the key, 263 // for example if you are suppressing a lot of information from the URL, but 264 // need to separately cache and request URLs with that content. 265 ConstantKeys map[string]string `protobuf:"bytes,5,rep,name=constant_keys,json=constantKeys,proto3" json:"constant_keys,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 266 // If specified, the HTTP method/verb will be extracted under this key name. 267 Method string `protobuf:"bytes,6,opt,name=method,proto3" json:"method,omitempty"` 268 unknownFields protoimpl.UnknownFields 269 sizeCache protoimpl.SizeCache 270 } 271 272 func (x *HttpKeyBuilder) Reset() { 273 *x = HttpKeyBuilder{} 274 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[2] 275 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 276 ms.StoreMessageInfo(mi) 277 } 278 279 func (x *HttpKeyBuilder) String() string { 280 return protoimpl.X.MessageStringOf(x) 281 } 282 283 func (*HttpKeyBuilder) ProtoMessage() {} 284 285 func (x *HttpKeyBuilder) ProtoReflect() protoreflect.Message { 286 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[2] 287 if x != nil { 288 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 289 if ms.LoadMessageInfo() == nil { 290 ms.StoreMessageInfo(mi) 291 } 292 return ms 293 } 294 return mi.MessageOf(x) 295 } 296 297 // Deprecated: Use HttpKeyBuilder.ProtoReflect.Descriptor instead. 298 func (*HttpKeyBuilder) Descriptor() ([]byte, []int) { 299 return file_grpc_lookup_v1_rls_config_proto_rawDescGZIP(), []int{2} 300 } 301 302 func (x *HttpKeyBuilder) GetHostPatterns() []string { 303 if x != nil { 304 return x.HostPatterns 305 } 306 return nil 307 } 308 309 func (x *HttpKeyBuilder) GetPathPatterns() []string { 310 if x != nil { 311 return x.PathPatterns 312 } 313 return nil 314 } 315 316 func (x *HttpKeyBuilder) GetQueryParameters() []*NameMatcher { 317 if x != nil { 318 return x.QueryParameters 319 } 320 return nil 321 } 322 323 func (x *HttpKeyBuilder) GetHeaders() []*NameMatcher { 324 if x != nil { 325 return x.Headers 326 } 327 return nil 328 } 329 330 func (x *HttpKeyBuilder) GetConstantKeys() map[string]string { 331 if x != nil { 332 return x.ConstantKeys 333 } 334 return nil 335 } 336 337 func (x *HttpKeyBuilder) GetMethod() string { 338 if x != nil { 339 return x.Method 340 } 341 return "" 342 } 343 344 type RouteLookupConfig struct { 345 state protoimpl.MessageState `protogen:"open.v1"` 346 // Ordered specifications for constructing keys for HTTP requests. Last 347 // match wins. If no HttpKeyBuilder matches, an empty key_map will be sent to 348 // the lookup service; it should likely reply with a global default route 349 // and raise an alert. 350 HttpKeybuilders []*HttpKeyBuilder `protobuf:"bytes,1,rep,name=http_keybuilders,json=httpKeybuilders,proto3" json:"http_keybuilders,omitempty"` 351 // Unordered specifications for constructing keys for gRPC requests. All 352 // GrpcKeyBuilders on this list must have unique "name" fields so that the 353 // client is free to prebuild a hash map keyed by name. If no GrpcKeyBuilder 354 // matches, an empty key_map will be sent to the lookup service; it should 355 // likely reply with a global default route and raise an alert. 356 GrpcKeybuilders []*GrpcKeyBuilder `protobuf:"bytes,2,rep,name=grpc_keybuilders,json=grpcKeybuilders,proto3" json:"grpc_keybuilders,omitempty"` 357 // The name of the lookup service as a gRPC URI. Typically, this will be 358 // a subdomain of the target, such as "lookup.datastore.googleapis.com". 359 LookupService string `protobuf:"bytes,3,opt,name=lookup_service,json=lookupService,proto3" json:"lookup_service,omitempty"` 360 // Configure a timeout value for lookup service requests. 361 // Defaults to 10 seconds if not specified. 362 LookupServiceTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=lookup_service_timeout,json=lookupServiceTimeout,proto3" json:"lookup_service_timeout,omitempty"` 363 // How long are responses valid for (like HTTP Cache-Control). 364 // If omitted or zero, the longest valid cache time is used. 365 // This value is clamped to 5 minutes to avoid unflushable bad responses, 366 // unless stale_age is specified. 367 MaxAge *durationpb.Duration `protobuf:"bytes,5,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` 368 // After a response has been in the client cache for this amount of time 369 // and is re-requested, start an asynchronous RPC to re-validate it. 370 // This value should be less than max_age by at least the length of a 371 // typical RTT to the Route Lookup Service to fully mask the RTT latency. 372 // If omitted, keys are only re-requested after they have expired. 373 // This value is clamped to 5 minutes. 374 StaleAge *durationpb.Duration `protobuf:"bytes,6,opt,name=stale_age,json=staleAge,proto3" json:"stale_age,omitempty"` 375 // Rough indicator of amount of memory to use for the client cache. Some of 376 // the data structure overhead is not accounted for, so actual memory consumed 377 // will be somewhat greater than this value. If this field is omitted or set 378 // to zero, a client default will be used. The value may be capped to a lower 379 // amount based on client configuration. 380 CacheSizeBytes int64 `protobuf:"varint,7,opt,name=cache_size_bytes,json=cacheSizeBytes,proto3" json:"cache_size_bytes,omitempty"` 381 // This is a list of all the possible targets that can be returned by the 382 // lookup service. If a target not on this list is returned, it will be 383 // treated the same as an unhealthy target. 384 ValidTargets []string `protobuf:"bytes,8,rep,name=valid_targets,json=validTargets,proto3" json:"valid_targets,omitempty"` 385 // This value provides a default target to use if needed. If set, it will be 386 // used if RLS returns an error, times out, or returns an invalid response. 387 // Note that requests can be routed only to a subdomain of the original 388 // target, e.g. "us_east_1.cloudbigtable.googleapis.com". 389 DefaultTarget string `protobuf:"bytes,9,opt,name=default_target,json=defaultTarget,proto3" json:"default_target,omitempty"` 390 unknownFields protoimpl.UnknownFields 391 sizeCache protoimpl.SizeCache 392 } 393 394 func (x *RouteLookupConfig) Reset() { 395 *x = RouteLookupConfig{} 396 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[3] 397 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 398 ms.StoreMessageInfo(mi) 399 } 400 401 func (x *RouteLookupConfig) String() string { 402 return protoimpl.X.MessageStringOf(x) 403 } 404 405 func (*RouteLookupConfig) ProtoMessage() {} 406 407 func (x *RouteLookupConfig) ProtoReflect() protoreflect.Message { 408 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[3] 409 if x != nil { 410 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 411 if ms.LoadMessageInfo() == nil { 412 ms.StoreMessageInfo(mi) 413 } 414 return ms 415 } 416 return mi.MessageOf(x) 417 } 418 419 // Deprecated: Use RouteLookupConfig.ProtoReflect.Descriptor instead. 420 func (*RouteLookupConfig) Descriptor() ([]byte, []int) { 421 return file_grpc_lookup_v1_rls_config_proto_rawDescGZIP(), []int{3} 422 } 423 424 func (x *RouteLookupConfig) GetHttpKeybuilders() []*HttpKeyBuilder { 425 if x != nil { 426 return x.HttpKeybuilders 427 } 428 return nil 429 } 430 431 func (x *RouteLookupConfig) GetGrpcKeybuilders() []*GrpcKeyBuilder { 432 if x != nil { 433 return x.GrpcKeybuilders 434 } 435 return nil 436 } 437 438 func (x *RouteLookupConfig) GetLookupService() string { 439 if x != nil { 440 return x.LookupService 441 } 442 return "" 443 } 444 445 func (x *RouteLookupConfig) GetLookupServiceTimeout() *durationpb.Duration { 446 if x != nil { 447 return x.LookupServiceTimeout 448 } 449 return nil 450 } 451 452 func (x *RouteLookupConfig) GetMaxAge() *durationpb.Duration { 453 if x != nil { 454 return x.MaxAge 455 } 456 return nil 457 } 458 459 func (x *RouteLookupConfig) GetStaleAge() *durationpb.Duration { 460 if x != nil { 461 return x.StaleAge 462 } 463 return nil 464 } 465 466 func (x *RouteLookupConfig) GetCacheSizeBytes() int64 { 467 if x != nil { 468 return x.CacheSizeBytes 469 } 470 return 0 471 } 472 473 func (x *RouteLookupConfig) GetValidTargets() []string { 474 if x != nil { 475 return x.ValidTargets 476 } 477 return nil 478 } 479 480 func (x *RouteLookupConfig) GetDefaultTarget() string { 481 if x != nil { 482 return x.DefaultTarget 483 } 484 return "" 485 } 486 487 // RouteLookupClusterSpecifier is used in xDS to represent a cluster specifier 488 // plugin for RLS. 489 type RouteLookupClusterSpecifier struct { 490 state protoimpl.MessageState `protogen:"open.v1"` 491 // The RLS config for this cluster specifier plugin instance. 492 RouteLookupConfig *RouteLookupConfig `protobuf:"bytes,1,opt,name=route_lookup_config,json=routeLookupConfig,proto3" json:"route_lookup_config,omitempty"` 493 unknownFields protoimpl.UnknownFields 494 sizeCache protoimpl.SizeCache 495 } 496 497 func (x *RouteLookupClusterSpecifier) Reset() { 498 *x = RouteLookupClusterSpecifier{} 499 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[4] 500 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 501 ms.StoreMessageInfo(mi) 502 } 503 504 func (x *RouteLookupClusterSpecifier) String() string { 505 return protoimpl.X.MessageStringOf(x) 506 } 507 508 func (*RouteLookupClusterSpecifier) ProtoMessage() {} 509 510 func (x *RouteLookupClusterSpecifier) ProtoReflect() protoreflect.Message { 511 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[4] 512 if x != nil { 513 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 514 if ms.LoadMessageInfo() == nil { 515 ms.StoreMessageInfo(mi) 516 } 517 return ms 518 } 519 return mi.MessageOf(x) 520 } 521 522 // Deprecated: Use RouteLookupClusterSpecifier.ProtoReflect.Descriptor instead. 523 func (*RouteLookupClusterSpecifier) Descriptor() ([]byte, []int) { 524 return file_grpc_lookup_v1_rls_config_proto_rawDescGZIP(), []int{4} 525 } 526 527 func (x *RouteLookupClusterSpecifier) GetRouteLookupConfig() *RouteLookupConfig { 528 if x != nil { 529 return x.RouteLookupConfig 530 } 531 return nil 532 } 533 534 // To match, one of the given Name fields must match; the service and method 535 // fields are specified as fixed strings. The service name is required and 536 // includes the proto package name. The method name may be omitted, in 537 // which case any method on the given service is matched. 538 type GrpcKeyBuilder_Name struct { 539 state protoimpl.MessageState `protogen:"open.v1"` 540 Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` 541 Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` 542 unknownFields protoimpl.UnknownFields 543 sizeCache protoimpl.SizeCache 544 } 545 546 func (x *GrpcKeyBuilder_Name) Reset() { 547 *x = GrpcKeyBuilder_Name{} 548 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[5] 549 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 550 ms.StoreMessageInfo(mi) 551 } 552 553 func (x *GrpcKeyBuilder_Name) String() string { 554 return protoimpl.X.MessageStringOf(x) 555 } 556 557 func (*GrpcKeyBuilder_Name) ProtoMessage() {} 558 559 func (x *GrpcKeyBuilder_Name) ProtoReflect() protoreflect.Message { 560 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[5] 561 if x != nil { 562 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 563 if ms.LoadMessageInfo() == nil { 564 ms.StoreMessageInfo(mi) 565 } 566 return ms 567 } 568 return mi.MessageOf(x) 569 } 570 571 // Deprecated: Use GrpcKeyBuilder_Name.ProtoReflect.Descriptor instead. 572 func (*GrpcKeyBuilder_Name) Descriptor() ([]byte, []int) { 573 return file_grpc_lookup_v1_rls_config_proto_rawDescGZIP(), []int{1, 0} 574 } 575 576 func (x *GrpcKeyBuilder_Name) GetService() string { 577 if x != nil { 578 return x.Service 579 } 580 return "" 581 } 582 583 func (x *GrpcKeyBuilder_Name) GetMethod() string { 584 if x != nil { 585 return x.Method 586 } 587 return "" 588 } 589 590 // If you wish to include the host, service, or method names as keys in the 591 // generated RouteLookupRequest, specify key names to use in the extra_keys 592 // submessage. If a key name is empty, no key will be set for that value. 593 // If this submessage is specified, the normal host/path fields will be left 594 // unset in the RouteLookupRequest. We are deprecating host/path in the 595 // RouteLookupRequest, so services should migrate to the ExtraKeys approach. 596 type GrpcKeyBuilder_ExtraKeys struct { 597 state protoimpl.MessageState `protogen:"open.v1"` 598 Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` 599 Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` 600 Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` 601 unknownFields protoimpl.UnknownFields 602 sizeCache protoimpl.SizeCache 603 } 604 605 func (x *GrpcKeyBuilder_ExtraKeys) Reset() { 606 *x = GrpcKeyBuilder_ExtraKeys{} 607 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[6] 608 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 609 ms.StoreMessageInfo(mi) 610 } 611 612 func (x *GrpcKeyBuilder_ExtraKeys) String() string { 613 return protoimpl.X.MessageStringOf(x) 614 } 615 616 func (*GrpcKeyBuilder_ExtraKeys) ProtoMessage() {} 617 618 func (x *GrpcKeyBuilder_ExtraKeys) ProtoReflect() protoreflect.Message { 619 mi := &file_grpc_lookup_v1_rls_config_proto_msgTypes[6] 620 if x != nil { 621 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 622 if ms.LoadMessageInfo() == nil { 623 ms.StoreMessageInfo(mi) 624 } 625 return ms 626 } 627 return mi.MessageOf(x) 628 } 629 630 // Deprecated: Use GrpcKeyBuilder_ExtraKeys.ProtoReflect.Descriptor instead. 631 func (*GrpcKeyBuilder_ExtraKeys) Descriptor() ([]byte, []int) { 632 return file_grpc_lookup_v1_rls_config_proto_rawDescGZIP(), []int{1, 1} 633 } 634 635 func (x *GrpcKeyBuilder_ExtraKeys) GetHost() string { 636 if x != nil { 637 return x.Host 638 } 639 return "" 640 } 641 642 func (x *GrpcKeyBuilder_ExtraKeys) GetService() string { 643 if x != nil { 644 return x.Service 645 } 646 return "" 647 } 648 649 func (x *GrpcKeyBuilder_ExtraKeys) GetMethod() string { 650 if x != nil { 651 return x.Method 652 } 653 return "" 654 } 655 656 var File_grpc_lookup_v1_rls_config_proto protoreflect.FileDescriptor 657 658 const file_grpc_lookup_v1_rls_config_proto_rawDesc = "" + 659 "\n" + 660 "\x1fgrpc/lookup/v1/rls_config.proto\x12\x0egrpc.lookup.v1\x1a\x1egoogle/protobuf/duration.proto\"\\\n" + 661 "\vNameMatcher\x12\x10\n" + 662 "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + 663 "\x05names\x18\x02 \x03(\tR\x05names\x12%\n" + 664 "\x0erequired_match\x18\x03 \x01(\bR\rrequiredMatch\"\xf0\x03\n" + 665 "\x0eGrpcKeyBuilder\x129\n" + 666 "\x05names\x18\x01 \x03(\v2#.grpc.lookup.v1.GrpcKeyBuilder.NameR\x05names\x12G\n" + 667 "\n" + 668 "extra_keys\x18\x03 \x01(\v2(.grpc.lookup.v1.GrpcKeyBuilder.ExtraKeysR\textraKeys\x125\n" + 669 "\aheaders\x18\x02 \x03(\v2\x1b.grpc.lookup.v1.NameMatcherR\aheaders\x12U\n" + 670 "\rconstant_keys\x18\x04 \x03(\v20.grpc.lookup.v1.GrpcKeyBuilder.ConstantKeysEntryR\fconstantKeys\x1a8\n" + 671 "\x04Name\x12\x18\n" + 672 "\aservice\x18\x01 \x01(\tR\aservice\x12\x16\n" + 673 "\x06method\x18\x02 \x01(\tR\x06method\x1aQ\n" + 674 "\tExtraKeys\x12\x12\n" + 675 "\x04host\x18\x01 \x01(\tR\x04host\x12\x18\n" + 676 "\aservice\x18\x02 \x01(\tR\aservice\x12\x16\n" + 677 "\x06method\x18\x03 \x01(\tR\x06method\x1a?\n" + 678 "\x11ConstantKeysEntry\x12\x10\n" + 679 "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + 680 "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x89\x03\n" + 681 "\x0eHttpKeyBuilder\x12#\n" + 682 "\rhost_patterns\x18\x01 \x03(\tR\fhostPatterns\x12#\n" + 683 "\rpath_patterns\x18\x02 \x03(\tR\fpathPatterns\x12F\n" + 684 "\x10query_parameters\x18\x03 \x03(\v2\x1b.grpc.lookup.v1.NameMatcherR\x0fqueryParameters\x125\n" + 685 "\aheaders\x18\x04 \x03(\v2\x1b.grpc.lookup.v1.NameMatcherR\aheaders\x12U\n" + 686 "\rconstant_keys\x18\x05 \x03(\v20.grpc.lookup.v1.HttpKeyBuilder.ConstantKeysEntryR\fconstantKeys\x12\x16\n" + 687 "\x06method\x18\x06 \x01(\tR\x06method\x1a?\n" + 688 "\x11ConstantKeysEntry\x12\x10\n" + 689 "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + 690 "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xa6\x04\n" + 691 "\x11RouteLookupConfig\x12I\n" + 692 "\x10http_keybuilders\x18\x01 \x03(\v2\x1e.grpc.lookup.v1.HttpKeyBuilderR\x0fhttpKeybuilders\x12I\n" + 693 "\x10grpc_keybuilders\x18\x02 \x03(\v2\x1e.grpc.lookup.v1.GrpcKeyBuilderR\x0fgrpcKeybuilders\x12%\n" + 694 "\x0elookup_service\x18\x03 \x01(\tR\rlookupService\x12O\n" + 695 "\x16lookup_service_timeout\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\x14lookupServiceTimeout\x122\n" + 696 "\amax_age\x18\x05 \x01(\v2\x19.google.protobuf.DurationR\x06maxAge\x126\n" + 697 "\tstale_age\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\bstaleAge\x12(\n" + 698 "\x10cache_size_bytes\x18\a \x01(\x03R\x0ecacheSizeBytes\x12#\n" + 699 "\rvalid_targets\x18\b \x03(\tR\fvalidTargets\x12%\n" + 700 "\x0edefault_target\x18\t \x01(\tR\rdefaultTargetJ\x04\b\n" + 701 "\x10\vR\x1brequest_processing_strategy\"p\n" + 702 "\x1bRouteLookupClusterSpecifier\x12Q\n" + 703 "\x13route_lookup_config\x18\x01 \x01(\v2!.grpc.lookup.v1.RouteLookupConfigR\x11routeLookupConfigBS\n" + 704 "\x11io.grpc.lookup.v1B\x0eRlsConfigProtoP\x01Z,google.golang.org/grpc/lookup/grpc_lookup_v1b\x06proto3" 705 706 var ( 707 file_grpc_lookup_v1_rls_config_proto_rawDescOnce sync.Once 708 file_grpc_lookup_v1_rls_config_proto_rawDescData []byte 709 ) 710 711 func file_grpc_lookup_v1_rls_config_proto_rawDescGZIP() []byte { 712 file_grpc_lookup_v1_rls_config_proto_rawDescOnce.Do(func() { 713 file_grpc_lookup_v1_rls_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_grpc_lookup_v1_rls_config_proto_rawDesc), len(file_grpc_lookup_v1_rls_config_proto_rawDesc))) 714 }) 715 return file_grpc_lookup_v1_rls_config_proto_rawDescData 716 } 717 718 var file_grpc_lookup_v1_rls_config_proto_msgTypes = make([]protoimpl.MessageInfo, 9) 719 var file_grpc_lookup_v1_rls_config_proto_goTypes = []any{ 720 (*NameMatcher)(nil), // 0: grpc.lookup.v1.NameMatcher 721 (*GrpcKeyBuilder)(nil), // 1: grpc.lookup.v1.GrpcKeyBuilder 722 (*HttpKeyBuilder)(nil), // 2: grpc.lookup.v1.HttpKeyBuilder 723 (*RouteLookupConfig)(nil), // 3: grpc.lookup.v1.RouteLookupConfig 724 (*RouteLookupClusterSpecifier)(nil), // 4: grpc.lookup.v1.RouteLookupClusterSpecifier 725 (*GrpcKeyBuilder_Name)(nil), // 5: grpc.lookup.v1.GrpcKeyBuilder.Name 726 (*GrpcKeyBuilder_ExtraKeys)(nil), // 6: grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys 727 nil, // 7: grpc.lookup.v1.GrpcKeyBuilder.ConstantKeysEntry 728 nil, // 8: grpc.lookup.v1.HttpKeyBuilder.ConstantKeysEntry 729 (*durationpb.Duration)(nil), // 9: google.protobuf.Duration 730 } 731 var file_grpc_lookup_v1_rls_config_proto_depIdxs = []int32{ 732 5, // 0: grpc.lookup.v1.GrpcKeyBuilder.names:type_name -> grpc.lookup.v1.GrpcKeyBuilder.Name 733 6, // 1: grpc.lookup.v1.GrpcKeyBuilder.extra_keys:type_name -> grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys 734 0, // 2: grpc.lookup.v1.GrpcKeyBuilder.headers:type_name -> grpc.lookup.v1.NameMatcher 735 7, // 3: grpc.lookup.v1.GrpcKeyBuilder.constant_keys:type_name -> grpc.lookup.v1.GrpcKeyBuilder.ConstantKeysEntry 736 0, // 4: grpc.lookup.v1.HttpKeyBuilder.query_parameters:type_name -> grpc.lookup.v1.NameMatcher 737 0, // 5: grpc.lookup.v1.HttpKeyBuilder.headers:type_name -> grpc.lookup.v1.NameMatcher 738 8, // 6: grpc.lookup.v1.HttpKeyBuilder.constant_keys:type_name -> grpc.lookup.v1.HttpKeyBuilder.ConstantKeysEntry 739 2, // 7: grpc.lookup.v1.RouteLookupConfig.http_keybuilders:type_name -> grpc.lookup.v1.HttpKeyBuilder 740 1, // 8: grpc.lookup.v1.RouteLookupConfig.grpc_keybuilders:type_name -> grpc.lookup.v1.GrpcKeyBuilder 741 9, // 9: grpc.lookup.v1.RouteLookupConfig.lookup_service_timeout:type_name -> google.protobuf.Duration 742 9, // 10: grpc.lookup.v1.RouteLookupConfig.max_age:type_name -> google.protobuf.Duration 743 9, // 11: grpc.lookup.v1.RouteLookupConfig.stale_age:type_name -> google.protobuf.Duration 744 3, // 12: grpc.lookup.v1.RouteLookupClusterSpecifier.route_lookup_config:type_name -> grpc.lookup.v1.RouteLookupConfig 745 13, // [13:13] is the sub-list for method output_type 746 13, // [13:13] is the sub-list for method input_type 747 13, // [13:13] is the sub-list for extension type_name 748 13, // [13:13] is the sub-list for extension extendee 749 0, // [0:13] is the sub-list for field type_name 750 } 751 752 func init() { file_grpc_lookup_v1_rls_config_proto_init() } 753 func file_grpc_lookup_v1_rls_config_proto_init() { 754 if File_grpc_lookup_v1_rls_config_proto != nil { 755 return 756 } 757 type x struct{} 758 out := protoimpl.TypeBuilder{ 759 File: protoimpl.DescBuilder{ 760 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 761 RawDescriptor: unsafe.Slice(unsafe.StringData(file_grpc_lookup_v1_rls_config_proto_rawDesc), len(file_grpc_lookup_v1_rls_config_proto_rawDesc)), 762 NumEnums: 0, 763 NumMessages: 9, 764 NumExtensions: 0, 765 NumServices: 0, 766 }, 767 GoTypes: file_grpc_lookup_v1_rls_config_proto_goTypes, 768 DependencyIndexes: file_grpc_lookup_v1_rls_config_proto_depIdxs, 769 MessageInfos: file_grpc_lookup_v1_rls_config_proto_msgTypes, 770 }.Build() 771 File_grpc_lookup_v1_rls_config_proto = out.File 772 file_grpc_lookup_v1_rls_config_proto_goTypes = nil 773 file_grpc_lookup_v1_rls_config_proto_depIdxs = nil 774 }