/
service_config.pb.go
2419 lines (2170 loc) · 103 KB
/
service_config.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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2016 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A ServiceConfig is supplied when a service is deployed. It mostly contains
// parameters for how clients that connect to the service should behave (for
// example, the load balancing policy to use to pick between service replicas).
//
// The configuration options provided here act as overrides to automatically
// chosen option values. Service owners should be conservative in specifying
// options as the system is likely to choose better values for these options in
// the vast majority of cases. In other words, please specify a configuration
// option only if you really have to, and avoid copy-paste inclusion of configs.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: grpc/service_config/service_config.proto
package grpc_service_config
import (
proto "github.com/golang/protobuf/proto"
code "google.golang.org/genproto/googleapis/rpc/code"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// Load balancing policy.
//
// Note that load_balancing_policy is deprecated in favor of
// load_balancing_config; the former will be used only if the latter
// is unset.
//
// If no LB policy is configured here, then the default is pick_first.
// If the policy name is set via the client API, that value overrides
// the value specified here.
//
// If the deprecated load_balancing_policy field is used, note that if the
// resolver returns at least one balancer address (as opposed to backend
// addresses), gRPC will use grpclb (see
// https://github.com/grpc/grpc/blob/master/doc/load-balancing.md),
// regardless of what policy is configured here. However, if the resolver
// returns at least one backend address in addition to the balancer
// address(es), the client may fall back to the requested policy if it
// is unable to reach any of the grpclb load balancers.
type ServiceConfig_LoadBalancingPolicy int32
const (
ServiceConfig_UNSPECIFIED ServiceConfig_LoadBalancingPolicy = 0
ServiceConfig_ROUND_ROBIN ServiceConfig_LoadBalancingPolicy = 1
)
// Enum value maps for ServiceConfig_LoadBalancingPolicy.
var (
ServiceConfig_LoadBalancingPolicy_name = map[int32]string{
0: "UNSPECIFIED",
1: "ROUND_ROBIN",
}
ServiceConfig_LoadBalancingPolicy_value = map[string]int32{
"UNSPECIFIED": 0,
"ROUND_ROBIN": 1,
}
)
func (x ServiceConfig_LoadBalancingPolicy) Enum() *ServiceConfig_LoadBalancingPolicy {
p := new(ServiceConfig_LoadBalancingPolicy)
*p = x
return p
}
func (x ServiceConfig_LoadBalancingPolicy) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ServiceConfig_LoadBalancingPolicy) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_service_config_service_config_proto_enumTypes[0].Descriptor()
}
func (ServiceConfig_LoadBalancingPolicy) Type() protoreflect.EnumType {
return &file_grpc_service_config_service_config_proto_enumTypes[0]
}
func (x ServiceConfig_LoadBalancingPolicy) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ServiceConfig_LoadBalancingPolicy.Descriptor instead.
func (ServiceConfig_LoadBalancingPolicy) EnumDescriptor() ([]byte, []int) {
return file_grpc_service_config_service_config_proto_rawDescGZIP(), []int{11, 0}
}
// Configuration for a method.
type MethodConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name []*MethodConfig_Name `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"`
// Whether RPCs sent to this method should wait until the connection is
// ready by default. If false, the RPC will abort immediately if there is
// a transient failure connecting to the server. Otherwise, gRPC will
// attempt to connect until the deadline is exceeded.
//
// The value specified via the gRPC client API will override the value
// set here. However, note that setting the value in the client API will
// also affect transient errors encountered during name resolution, which
// cannot be caught by the value here, since the service config is
// obtained by the gRPC client via name resolution.
WaitForReady *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=wait_for_ready,json=waitForReady,proto3" json:"wait_for_ready,omitempty"`
// The default timeout in seconds for RPCs sent to this method. This can be
// overridden in code. If no reply is received in the specified amount of
// time, the request is aborted and a DEADLINE_EXCEEDED error status
// is returned to the caller.
//
// The actual deadline used will be the minimum of the value specified here
// and the value set by the application via the gRPC client API. If either
// one is not set, then the other will be used. If neither is set, then the
// request has no deadline.
Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
// The maximum allowed payload size for an individual request or object in a
// stream (client->server) in bytes. The size which is measured is the
// serialized payload after per-message compression (but before stream
// compression) in bytes. This applies both to streaming and non-streaming
// requests.
//
// The actual value used is the minimum of the value specified here and the
// value set by the application via the gRPC client API. If either one is
// not set, then the other will be used. If neither is set, then the
// built-in default is used.
//
// If a client attempts to send an object larger than this value, it will not
// be sent and the client will see a ClientError.
// Note that 0 is a valid value, meaning that the request message
// must be empty.
MaxRequestMessageBytes *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=max_request_message_bytes,json=maxRequestMessageBytes,proto3" json:"max_request_message_bytes,omitempty"`
// The maximum allowed payload size for an individual response or object in a
// stream (server->client) in bytes. The size which is measured is the
// serialized payload after per-message compression (but before stream
// compression) in bytes. This applies both to streaming and non-streaming
// requests.
//
// The actual value used is the minimum of the value specified here and the
// value set by the application via the gRPC client API. If either one is
// not set, then the other will be used. If neither is set, then the
// built-in default is used.
//
// If a server attempts to send an object larger than this value, it will not
// be sent, and a ServerError will be sent to the client instead.
// Note that 0 is a valid value, meaning that the response message
// must be empty.
MaxResponseMessageBytes *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=max_response_message_bytes,json=maxResponseMessageBytes,proto3" json:"max_response_message_bytes,omitempty"`
// Only one of retry_policy or hedging_policy may be set. If neither is set,
// RPCs will not be retried or hedged.
//
// Types that are assignable to RetryOrHedgingPolicy:
// *MethodConfig_RetryPolicy_
// *MethodConfig_HedgingPolicy_
RetryOrHedgingPolicy isMethodConfig_RetryOrHedgingPolicy `protobuf_oneof:"retry_or_hedging_policy"`
}
func (x *MethodConfig) Reset() {
*x = MethodConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_service_config_service_config_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodConfig) ProtoMessage() {}
func (x *MethodConfig) ProtoReflect() protoreflect.Message {
mi := &file_grpc_service_config_service_config_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodConfig.ProtoReflect.Descriptor instead.
func (*MethodConfig) Descriptor() ([]byte, []int) {
return file_grpc_service_config_service_config_proto_rawDescGZIP(), []int{0}
}
func (x *MethodConfig) GetName() []*MethodConfig_Name {
if x != nil {
return x.Name
}
return nil
}
func (x *MethodConfig) GetWaitForReady() *wrapperspb.BoolValue {
if x != nil {
return x.WaitForReady
}
return nil
}
func (x *MethodConfig) GetTimeout() *durationpb.Duration {
if x != nil {
return x.Timeout
}
return nil
}
func (x *MethodConfig) GetMaxRequestMessageBytes() *wrapperspb.UInt32Value {
if x != nil {
return x.MaxRequestMessageBytes
}
return nil
}
func (x *MethodConfig) GetMaxResponseMessageBytes() *wrapperspb.UInt32Value {
if x != nil {
return x.MaxResponseMessageBytes
}
return nil
}
func (m *MethodConfig) GetRetryOrHedgingPolicy() isMethodConfig_RetryOrHedgingPolicy {
if m != nil {
return m.RetryOrHedgingPolicy
}
return nil
}
func (x *MethodConfig) GetRetryPolicy() *MethodConfig_RetryPolicy {
if x, ok := x.GetRetryOrHedgingPolicy().(*MethodConfig_RetryPolicy_); ok {
return x.RetryPolicy
}
return nil
}
func (x *MethodConfig) GetHedgingPolicy() *MethodConfig_HedgingPolicy {
if x, ok := x.GetRetryOrHedgingPolicy().(*MethodConfig_HedgingPolicy_); ok {
return x.HedgingPolicy
}
return nil
}
type isMethodConfig_RetryOrHedgingPolicy interface {
isMethodConfig_RetryOrHedgingPolicy()
}
type MethodConfig_RetryPolicy_ struct {
RetryPolicy *MethodConfig_RetryPolicy `protobuf:"bytes,6,opt,name=retry_policy,json=retryPolicy,proto3,oneof"`
}
type MethodConfig_HedgingPolicy_ struct {
HedgingPolicy *MethodConfig_HedgingPolicy `protobuf:"bytes,7,opt,name=hedging_policy,json=hedgingPolicy,proto3,oneof"`
}
func (*MethodConfig_RetryPolicy_) isMethodConfig_RetryOrHedgingPolicy() {}
func (*MethodConfig_HedgingPolicy_) isMethodConfig_RetryOrHedgingPolicy() {}
// Configuration for pick_first LB policy.
type PickFirstConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *PickFirstConfig) Reset() {
*x = PickFirstConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_service_config_service_config_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PickFirstConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PickFirstConfig) ProtoMessage() {}
func (x *PickFirstConfig) ProtoReflect() protoreflect.Message {
mi := &file_grpc_service_config_service_config_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PickFirstConfig.ProtoReflect.Descriptor instead.
func (*PickFirstConfig) Descriptor() ([]byte, []int) {
return file_grpc_service_config_service_config_proto_rawDescGZIP(), []int{1}
}
// Configuration for round_robin LB policy.
type RoundRobinConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *RoundRobinConfig) Reset() {
*x = RoundRobinConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_service_config_service_config_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RoundRobinConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RoundRobinConfig) ProtoMessage() {}
func (x *RoundRobinConfig) ProtoReflect() protoreflect.Message {
mi := &file_grpc_service_config_service_config_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RoundRobinConfig.ProtoReflect.Descriptor instead.
func (*RoundRobinConfig) Descriptor() ([]byte, []int) {
return file_grpc_service_config_service_config_proto_rawDescGZIP(), []int{2}
}
// Configuration for priority LB policy.
type PriorityLoadBalancingPolicyConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Children map[string]*PriorityLoadBalancingPolicyConfig_Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// A list of child names in decreasing priority order
// (i.e., first element is the highest priority).
Priorities []string `protobuf:"bytes,2,rep,name=priorities,proto3" json:"priorities,omitempty"`
}
func (x *PriorityLoadBalancingPolicyConfig) Reset() {
*x = PriorityLoadBalancingPolicyConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_service_config_service_config_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PriorityLoadBalancingPolicyConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PriorityLoadBalancingPolicyConfig) ProtoMessage() {}
func (x *PriorityLoadBalancingPolicyConfig) ProtoReflect() protoreflect.Message {
mi := &file_grpc_service_config_service_config_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PriorityLoadBalancingPolicyConfig.ProtoReflect.Descriptor instead.
func (*PriorityLoadBalancingPolicyConfig) Descriptor() ([]byte, []int) {
return file_grpc_service_config_service_config_proto_rawDescGZIP(), []int{3}
}
func (x *PriorityLoadBalancingPolicyConfig) GetChildren() map[string]*PriorityLoadBalancingPolicyConfig_Child {
if x != nil {
return x.Children
}
return nil
}
func (x *PriorityLoadBalancingPolicyConfig) GetPriorities() []string {
if x != nil {
return x.Priorities
}
return nil
}
// Configuration for weighted_target LB policy.
type WeightedTargetLoadBalancingPolicyConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Targets map[string]*WeightedTargetLoadBalancingPolicyConfig_Target `protobuf:"bytes,1,rep,name=targets,proto3" json:"targets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *WeightedTargetLoadBalancingPolicyConfig) Reset() {
*x = WeightedTargetLoadBalancingPolicyConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_service_config_service_config_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WeightedTargetLoadBalancingPolicyConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WeightedTargetLoadBalancingPolicyConfig) ProtoMessage() {}
func (x *WeightedTargetLoadBalancingPolicyConfig) ProtoReflect() protoreflect.Message {
mi := &file_grpc_service_config_service_config_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WeightedTargetLoadBalancingPolicyConfig.ProtoReflect.Descriptor instead.
func (*WeightedTargetLoadBalancingPolicyConfig) Descriptor() ([]byte, []int) {
return file_grpc_service_config_service_config_proto_rawDescGZIP(), []int{4}
}
func (x *WeightedTargetLoadBalancingPolicyConfig) GetTargets() map[string]*WeightedTargetLoadBalancingPolicyConfig_Target {
if x != nil {
return x.Targets
}
return nil
}
// Configuration for grpclb LB policy.
type GrpcLbConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Optional. What LB policy to use for routing between the backend
// addresses. If unset, defaults to round_robin.
// Currently, the only supported values are round_robin and pick_first.
// Note that this will be used both in balancer mode and in fallback mode.
// Multiple LB policies can be specified; clients will iterate through
// the list in order and stop at the first policy that they support.
ChildPolicy []*LoadBalancingConfig `protobuf:"bytes,1,rep,name=child_policy,json=childPolicy,proto3" json:"child_policy,omitempty"`
// Optional. If specified, overrides the name of the service to be sent to
// the balancer.
ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
}
func (x *GrpcLbConfig) Reset() {
*x = GrpcLbConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_service_config_service_config_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GrpcLbConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GrpcLbConfig) ProtoMessage() {}
func (x *GrpcLbConfig) ProtoReflect() protoreflect.Message {
mi := &file_grpc_service_config_service_config_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GrpcLbConfig.ProtoReflect.Descriptor instead.
func (*GrpcLbConfig) Descriptor() ([]byte, []int) {
return file_grpc_service_config_service_config_proto_rawDescGZIP(), []int{5}
}
func (x *GrpcLbConfig) GetChildPolicy() []*LoadBalancingConfig {
if x != nil {
return x.ChildPolicy
}
return nil
}
func (x *GrpcLbConfig) GetServiceName() string {
if x != nil {
return x.ServiceName
}
return ""
}
// Configuration for the cds LB policy.
type CdsConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` // Required.
}
func (x *CdsConfig) Reset() {
*x = CdsConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_service_config_service_config_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CdsConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CdsConfig) ProtoMessage() {}
func (x *CdsConfig) ProtoReflect() protoreflect.Message {
mi := &file_grpc_service_config_service_config_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CdsConfig.ProtoReflect.Descriptor instead.
func (*CdsConfig) Descriptor() ([]byte, []int) {
return file_grpc_service_config_service_config_proto_rawDescGZIP(), []int{6}
}
func (x *CdsConfig) GetCluster() string {
if x != nil {
return x.Cluster
}
return ""
}
// Configuration for xds LB policy.
type XdsConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of balancer to connect to.
//
// Deprecated: Do not use.
BalancerName string `protobuf:"bytes,1,opt,name=balancer_name,json=balancerName,proto3" json:"balancer_name,omitempty"`
// Optional. What LB policy to use for intra-locality routing.
// If unset, will use whatever algorithm is specified by the balancer.
// Multiple LB policies can be specified; clients will iterate through
// the list in order and stop at the first policy that they support.
ChildPolicy []*LoadBalancingConfig `protobuf:"bytes,2,rep,name=child_policy,json=childPolicy,proto3" json:"child_policy,omitempty"`
// Optional. What LB policy to use in fallback mode. If not
// specified, defaults to round_robin.
// Multiple LB policies can be specified; clients will iterate through
// the list in order and stop at the first policy that they support.
FallbackPolicy []*LoadBalancingConfig `protobuf:"bytes,3,rep,name=fallback_policy,json=fallbackPolicy,proto3" json:"fallback_policy,omitempty"`
// Optional. Name to use in EDS query. If not present, defaults to
// the server name from the target URI.
EdsServiceName string `protobuf:"bytes,4,opt,name=eds_service_name,json=edsServiceName,proto3" json:"eds_service_name,omitempty"`
// LRS server to send load reports to.
// If not present, load reporting will be disabled.
// If set to the empty string, load reporting will be sent to the same
// server that we obtained CDS data from.
LrsLoadReportingServerName *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=lrs_load_reporting_server_name,json=lrsLoadReportingServerName,proto3" json:"lrs_load_reporting_server_name,omitempty"`
}
func (x *XdsConfig) Reset() {
*x = XdsConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_service_config_service_config_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *XdsConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*XdsConfig) ProtoMessage() {}
func (x *XdsConfig) ProtoReflect() protoreflect.Message {
mi := &file_grpc_service_config_service_config_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use XdsConfig.ProtoReflect.Descriptor instead.
func (*XdsConfig) Descriptor() ([]byte, []int) {
return file_grpc_service_config_service_config_proto_rawDescGZIP(), []int{7}
}
// Deprecated: Do not use.
func (x *XdsConfig) GetBalancerName() string {
if x != nil {
return x.BalancerName
}
return ""
}
func (x *XdsConfig) GetChildPolicy() []*LoadBalancingConfig {
if x != nil {
return x.ChildPolicy
}
return nil
}
func (x *XdsConfig) GetFallbackPolicy() []*LoadBalancingConfig {
if x != nil {
return x.FallbackPolicy
}
return nil
}
func (x *XdsConfig) GetEdsServiceName() string {
if x != nil {
return x.EdsServiceName
}
return ""
}
func (x *XdsConfig) GetLrsLoadReportingServerName() *wrapperspb.StringValue {
if x != nil {
return x.LrsLoadReportingServerName
}
return nil
}
// Configuration for eds LB policy.
type EdsLoadBalancingPolicyConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Cluster name. Required.
Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"`
// EDS service name, as returned in CDS.
// May be unset if not specified in CDS.
EdsServiceName string `protobuf:"bytes,2,opt,name=eds_service_name,json=edsServiceName,proto3" json:"eds_service_name,omitempty"`
// Server to send load reports to.
// If unset, no load reporting is done.
// If set to empty string, load reporting will be sent to the same
// server as we are getting xds data from.
LrsLoadReportingServerName *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=lrs_load_reporting_server_name,json=lrsLoadReportingServerName,proto3" json:"lrs_load_reporting_server_name,omitempty"`
// Locality-picking policy.
// This policy's config is expected to be in the format used
// by the weighted_target policy. Note that the config should include
// an empty value for the "targets" field; that empty value will be
// replaced by one that is dynamically generated based on the EDS data.
// Optional; defaults to "weighted_target".
LocalityPickingPolicy []*LoadBalancingConfig `protobuf:"bytes,4,rep,name=locality_picking_policy,json=localityPickingPolicy,proto3" json:"locality_picking_policy,omitempty"`
// Endpoint-picking policy.
// This will be configured as the policy for each child in the
// locality-policy's config.
// Optional; defaults to "round_robin".
EndpointPickingPolicy []*LoadBalancingConfig `protobuf:"bytes,5,rep,name=endpoint_picking_policy,json=endpointPickingPolicy,proto3" json:"endpoint_picking_policy,omitempty"`
}
func (x *EdsLoadBalancingPolicyConfig) Reset() {
*x = EdsLoadBalancingPolicyConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_service_config_service_config_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EdsLoadBalancingPolicyConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EdsLoadBalancingPolicyConfig) ProtoMessage() {}
func (x *EdsLoadBalancingPolicyConfig) ProtoReflect() protoreflect.Message {
mi := &file_grpc_service_config_service_config_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EdsLoadBalancingPolicyConfig.ProtoReflect.Descriptor instead.
func (*EdsLoadBalancingPolicyConfig) Descriptor() ([]byte, []int) {
return file_grpc_service_config_service_config_proto_rawDescGZIP(), []int{8}
}
func (x *EdsLoadBalancingPolicyConfig) GetCluster() string {
if x != nil {
return x.Cluster
}
return ""
}
func (x *EdsLoadBalancingPolicyConfig) GetEdsServiceName() string {
if x != nil {
return x.EdsServiceName
}
return ""
}
func (x *EdsLoadBalancingPolicyConfig) GetLrsLoadReportingServerName() *wrapperspb.StringValue {
if x != nil {
return x.LrsLoadReportingServerName
}
return nil
}
func (x *EdsLoadBalancingPolicyConfig) GetLocalityPickingPolicy() []*LoadBalancingConfig {
if x != nil {
return x.LocalityPickingPolicy
}
return nil
}
func (x *EdsLoadBalancingPolicyConfig) GetEndpointPickingPolicy() []*LoadBalancingConfig {
if x != nil {
return x.EndpointPickingPolicy
}
return nil
}
// Configuration for lrs LB policy.
type LrsLoadBalancingPolicyConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Cluster name. Required.
ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"`
// EDS service name, as returned in CDS.
// May be unset if not specified in CDS.
EdsServiceName string `protobuf:"bytes,2,opt,name=eds_service_name,json=edsServiceName,proto3" json:"eds_service_name,omitempty"`
// Server to send load reports to. Required.
// If set to empty string, load reporting will be sent to the same
// server as we are getting xds data from.
LrsLoadReportingServerName string `protobuf:"bytes,3,opt,name=lrs_load_reporting_server_name,json=lrsLoadReportingServerName,proto3" json:"lrs_load_reporting_server_name,omitempty"`
Locality *LrsLoadBalancingPolicyConfig_Locality `protobuf:"bytes,4,opt,name=locality,proto3" json:"locality,omitempty"`
// Endpoint-picking policy.
ChildPolicy []*LoadBalancingConfig `protobuf:"bytes,5,rep,name=child_policy,json=childPolicy,proto3" json:"child_policy,omitempty"`
}
func (x *LrsLoadBalancingPolicyConfig) Reset() {
*x = LrsLoadBalancingPolicyConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_service_config_service_config_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LrsLoadBalancingPolicyConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LrsLoadBalancingPolicyConfig) ProtoMessage() {}
func (x *LrsLoadBalancingPolicyConfig) ProtoReflect() protoreflect.Message {
mi := &file_grpc_service_config_service_config_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LrsLoadBalancingPolicyConfig.ProtoReflect.Descriptor instead.
func (*LrsLoadBalancingPolicyConfig) Descriptor() ([]byte, []int) {
return file_grpc_service_config_service_config_proto_rawDescGZIP(), []int{9}
}
func (x *LrsLoadBalancingPolicyConfig) GetClusterName() string {
if x != nil {
return x.ClusterName
}
return ""
}
func (x *LrsLoadBalancingPolicyConfig) GetEdsServiceName() string {
if x != nil {
return x.EdsServiceName
}
return ""
}
func (x *LrsLoadBalancingPolicyConfig) GetLrsLoadReportingServerName() string {
if x != nil {
return x.LrsLoadReportingServerName
}
return ""
}
func (x *LrsLoadBalancingPolicyConfig) GetLocality() *LrsLoadBalancingPolicyConfig_Locality {
if x != nil {
return x.Locality
}
return nil
}
func (x *LrsLoadBalancingPolicyConfig) GetChildPolicy() []*LoadBalancingConfig {
if x != nil {
return x.ChildPolicy
}
return nil
}
// Selects LB policy and provides corresponding configuration.
//
// In general, all instances of this field should be repeated. Clients will
// iterate through the list in order and stop at the first policy that they
// support. This allows the service config to specify custom policies that may
// not be known to all clients.
//
// - If the config for the first supported policy is invalid, the whole service
// config is invalid.
// - If the list doesn't contain any supported policy, the whole service config
// is invalid.
type LoadBalancingConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Exactly one LB policy may be configured.
//
// Types that are assignable to Policy:
// *LoadBalancingConfig_PickFirst
// *LoadBalancingConfig_RoundRobin
// *LoadBalancingConfig_Grpclb
// *LoadBalancingConfig_Priority
// *LoadBalancingConfig_WeightedTarget
// *LoadBalancingConfig_Cds
// *LoadBalancingConfig_Eds
// *LoadBalancingConfig_Lrs
// *LoadBalancingConfig_Xds
// *LoadBalancingConfig_XdsExperimental
Policy isLoadBalancingConfig_Policy `protobuf_oneof:"policy"`
}
func (x *LoadBalancingConfig) Reset() {
*x = LoadBalancingConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_service_config_service_config_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LoadBalancingConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LoadBalancingConfig) ProtoMessage() {}
func (x *LoadBalancingConfig) ProtoReflect() protoreflect.Message {
mi := &file_grpc_service_config_service_config_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LoadBalancingConfig.ProtoReflect.Descriptor instead.
func (*LoadBalancingConfig) Descriptor() ([]byte, []int) {
return file_grpc_service_config_service_config_proto_rawDescGZIP(), []int{10}
}
func (m *LoadBalancingConfig) GetPolicy() isLoadBalancingConfig_Policy {
if m != nil {
return m.Policy
}
return nil
}
func (x *LoadBalancingConfig) GetPickFirst() *PickFirstConfig {
if x, ok := x.GetPolicy().(*LoadBalancingConfig_PickFirst); ok {
return x.PickFirst
}
return nil
}
func (x *LoadBalancingConfig) GetRoundRobin() *RoundRobinConfig {
if x, ok := x.GetPolicy().(*LoadBalancingConfig_RoundRobin); ok {
return x.RoundRobin
}
return nil
}
func (x *LoadBalancingConfig) GetGrpclb() *GrpcLbConfig {
if x, ok := x.GetPolicy().(*LoadBalancingConfig_Grpclb); ok {
return x.Grpclb
}
return nil
}
func (x *LoadBalancingConfig) GetPriority() *PriorityLoadBalancingPolicyConfig {
if x, ok := x.GetPolicy().(*LoadBalancingConfig_Priority); ok {
return x.Priority
}
return nil
}
func (x *LoadBalancingConfig) GetWeightedTarget() *WeightedTargetLoadBalancingPolicyConfig {
if x, ok := x.GetPolicy().(*LoadBalancingConfig_WeightedTarget); ok {
return x.WeightedTarget
}
return nil
}
func (x *LoadBalancingConfig) GetCds() *CdsConfig {
if x, ok := x.GetPolicy().(*LoadBalancingConfig_Cds); ok {
return x.Cds
}
return nil
}
func (x *LoadBalancingConfig) GetEds() *EdsLoadBalancingPolicyConfig {
if x, ok := x.GetPolicy().(*LoadBalancingConfig_Eds); ok {
return x.Eds
}
return nil
}
func (x *LoadBalancingConfig) GetLrs() *LrsLoadBalancingPolicyConfig {
if x, ok := x.GetPolicy().(*LoadBalancingConfig_Lrs); ok {
return x.Lrs
}
return nil
}
// Deprecated: Do not use.
func (x *LoadBalancingConfig) GetXds() *XdsConfig {
if x, ok := x.GetPolicy().(*LoadBalancingConfig_Xds); ok {
return x.Xds