forked from envoyproxy/go-control-plane
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cds.pb.go
6131 lines (5897 loc) · 174 KB
/
cds.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
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: envoy/api/v2/cds.proto
package v2
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
import cluster "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster"
import core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
import _type "github.com/envoyproxy/go-control-plane/envoy/type"
import _ "github.com/gogo/googleapis/google/api"
import _ "github.com/gogo/protobuf/gogoproto"
import types "github.com/gogo/protobuf/types"
import _ "github.com/lyft/protoc-gen-validate/validate"
import time "time"
import bytes "bytes"
import context "golang.org/x/net/context"
import grpc "google.golang.org/grpc"
import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// Refer to :ref:`service discovery type <arch_overview_service_discovery_types>`
// for an explanation on each type.
type Cluster_DiscoveryType int32
const (
// Refer to the :ref:`static discovery type<arch_overview_service_discovery_types_static>`
// for an explanation.
Cluster_STATIC Cluster_DiscoveryType = 0
// Refer to the :ref:`strict DNS discovery
// type<arch_overview_service_discovery_types_strict_dns>`
// for an explanation.
Cluster_STRICT_DNS Cluster_DiscoveryType = 1
// Refer to the :ref:`logical DNS discovery
// type<arch_overview_service_discovery_types_logical_dns>`
// for an explanation.
Cluster_LOGICAL_DNS Cluster_DiscoveryType = 2
// Refer to the :ref:`service discovery type<arch_overview_service_discovery_types_sds>`
// for an explanation.
Cluster_EDS Cluster_DiscoveryType = 3
// Refer to the :ref:`original destination discovery
// type<arch_overview_service_discovery_types_original_destination>`
// for an explanation.
Cluster_ORIGINAL_DST Cluster_DiscoveryType = 4
)
var Cluster_DiscoveryType_name = map[int32]string{
0: "STATIC",
1: "STRICT_DNS",
2: "LOGICAL_DNS",
3: "EDS",
4: "ORIGINAL_DST",
}
var Cluster_DiscoveryType_value = map[string]int32{
"STATIC": 0,
"STRICT_DNS": 1,
"LOGICAL_DNS": 2,
"EDS": 3,
"ORIGINAL_DST": 4,
}
func (x Cluster_DiscoveryType) String() string {
return proto.EnumName(Cluster_DiscoveryType_name, int32(x))
}
func (Cluster_DiscoveryType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_cds_c9aad078b729c273, []int{0, 0}
}
// Refer to :ref:`load balancer type <arch_overview_load_balancing_types>` architecture
// overview section for information on each type.
type Cluster_LbPolicy int32
const (
// Refer to the :ref:`round robin load balancing
// policy<arch_overview_load_balancing_types_round_robin>`
// for an explanation.
Cluster_ROUND_ROBIN Cluster_LbPolicy = 0
// Refer to the :ref:`least request load balancing
// policy<arch_overview_load_balancing_types_least_request>`
// for an explanation.
Cluster_LEAST_REQUEST Cluster_LbPolicy = 1
// Refer to the :ref:`ring hash load balancing
// policy<arch_overview_load_balancing_types_ring_hash>`
// for an explanation.
Cluster_RING_HASH Cluster_LbPolicy = 2
// Refer to the :ref:`random load balancing
// policy<arch_overview_load_balancing_types_random>`
// for an explanation.
Cluster_RANDOM Cluster_LbPolicy = 3
// Refer to the :ref:`original destination load balancing
// policy<arch_overview_load_balancing_types_original_destination>`
// for an explanation.
Cluster_ORIGINAL_DST_LB Cluster_LbPolicy = 4
// Refer to the :ref:`Maglev load balancing policy<arch_overview_load_balancing_types_maglev>`
// for an explanation.
Cluster_MAGLEV Cluster_LbPolicy = 5
)
var Cluster_LbPolicy_name = map[int32]string{
0: "ROUND_ROBIN",
1: "LEAST_REQUEST",
2: "RING_HASH",
3: "RANDOM",
4: "ORIGINAL_DST_LB",
5: "MAGLEV",
}
var Cluster_LbPolicy_value = map[string]int32{
"ROUND_ROBIN": 0,
"LEAST_REQUEST": 1,
"RING_HASH": 2,
"RANDOM": 3,
"ORIGINAL_DST_LB": 4,
"MAGLEV": 5,
}
func (x Cluster_LbPolicy) String() string {
return proto.EnumName(Cluster_LbPolicy_name, int32(x))
}
func (Cluster_LbPolicy) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_cds_c9aad078b729c273, []int{0, 1}
}
// When V4_ONLY is selected, the DNS resolver will only perform a lookup for
// addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will
// only perform a lookup for addresses in the IPv6 family. If AUTO is
// specified, the DNS resolver will first perform a lookup for addresses in
// the IPv6 family and fallback to a lookup for addresses in the IPv4 family.
// For cluster types other than
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>` and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this setting is
// ignored.
type Cluster_DnsLookupFamily int32
const (
Cluster_AUTO Cluster_DnsLookupFamily = 0
Cluster_V4_ONLY Cluster_DnsLookupFamily = 1
Cluster_V6_ONLY Cluster_DnsLookupFamily = 2
)
var Cluster_DnsLookupFamily_name = map[int32]string{
0: "AUTO",
1: "V4_ONLY",
2: "V6_ONLY",
}
var Cluster_DnsLookupFamily_value = map[string]int32{
"AUTO": 0,
"V4_ONLY": 1,
"V6_ONLY": 2,
}
func (x Cluster_DnsLookupFamily) String() string {
return proto.EnumName(Cluster_DnsLookupFamily_name, int32(x))
}
func (Cluster_DnsLookupFamily) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_cds_c9aad078b729c273, []int{0, 2}
}
type Cluster_ClusterProtocolSelection int32
const (
// Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2).
// If :ref:`http2_protocol_options <envoy_api_field_Cluster.http2_protocol_options>` are
// present, HTTP2 will be used, otherwise HTTP1.1 will be used.
Cluster_USE_CONFIGURED_PROTOCOL Cluster_ClusterProtocolSelection = 0
// Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection.
Cluster_USE_DOWNSTREAM_PROTOCOL Cluster_ClusterProtocolSelection = 1
)
var Cluster_ClusterProtocolSelection_name = map[int32]string{
0: "USE_CONFIGURED_PROTOCOL",
1: "USE_DOWNSTREAM_PROTOCOL",
}
var Cluster_ClusterProtocolSelection_value = map[string]int32{
"USE_CONFIGURED_PROTOCOL": 0,
"USE_DOWNSTREAM_PROTOCOL": 1,
}
func (x Cluster_ClusterProtocolSelection) String() string {
return proto.EnumName(Cluster_ClusterProtocolSelection_name, int32(x))
}
func (Cluster_ClusterProtocolSelection) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_cds_c9aad078b729c273, []int{0, 3}
}
// If NO_FALLBACK is selected, a result
// equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected,
// any cluster endpoint may be returned (subject to policy, health checks,
// etc). If DEFAULT_SUBSET is selected, load balancing is performed over the
// endpoints matching the values from the default_subset field.
type Cluster_LbSubsetConfig_LbSubsetFallbackPolicy int32
const (
Cluster_LbSubsetConfig_NO_FALLBACK Cluster_LbSubsetConfig_LbSubsetFallbackPolicy = 0
Cluster_LbSubsetConfig_ANY_ENDPOINT Cluster_LbSubsetConfig_LbSubsetFallbackPolicy = 1
Cluster_LbSubsetConfig_DEFAULT_SUBSET Cluster_LbSubsetConfig_LbSubsetFallbackPolicy = 2
)
var Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name = map[int32]string{
0: "NO_FALLBACK",
1: "ANY_ENDPOINT",
2: "DEFAULT_SUBSET",
}
var Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_value = map[string]int32{
"NO_FALLBACK": 0,
"ANY_ENDPOINT": 1,
"DEFAULT_SUBSET": 2,
}
func (x Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) String() string {
return proto.EnumName(Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name, int32(x))
}
func (Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_cds_c9aad078b729c273, []int{0, 2, 0}
}
// Configuration for a single upstream cluster.
// [#comment:next free field: 36]
type Cluster struct {
// Supplies the name of the cluster which must be unique across all clusters.
// The cluster name is used when emitting
// :ref:`statistics <config_cluster_manager_cluster_stats>` if :ref:`alt_stat_name
// <envoy_api_field_Cluster.alt_stat_name>` is not provided.
// Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics.
// By default, the maximum length of a cluster name is limited to 60
// characters. This limit can be increased by setting the
// :option:`--max-obj-name-len` command line argument to the desired value.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// An optional alternative to the cluster name to be used while emitting stats.
// Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be
// confused with :ref:`Router Filter Header
// <config_http_filters_router_x-envoy-upstream-alt-stat-name>`.
AltStatName string `protobuf:"bytes,28,opt,name=alt_stat_name,json=altStatName,proto3" json:"alt_stat_name,omitempty"`
// The :ref:`service discovery type <arch_overview_service_discovery_types>`
// to use for resolving the cluster.
Type Cluster_DiscoveryType `protobuf:"varint,2,opt,name=type,proto3,enum=envoy.api.v2.Cluster_DiscoveryType" json:"type,omitempty"`
// Configuration to use for EDS updates for the Cluster.
EdsClusterConfig *Cluster_EdsClusterConfig `protobuf:"bytes,3,opt,name=eds_cluster_config,json=edsClusterConfig" json:"eds_cluster_config,omitempty"`
// The timeout for new network connections to hosts in the cluster.
ConnectTimeout time.Duration `protobuf:"bytes,4,opt,name=connect_timeout,json=connectTimeout,stdduration" json:"connect_timeout"`
// Soft limit on size of the cluster’s connections read and write buffers. If
// unspecified, an implementation defined default is applied (1MiB).
PerConnectionBufferLimitBytes *types.UInt32Value `protobuf:"bytes,5,opt,name=per_connection_buffer_limit_bytes,json=perConnectionBufferLimitBytes" json:"per_connection_buffer_limit_bytes,omitempty"`
// The :ref:`load balancer type <arch_overview_load_balancing_types>` to use
// when picking a host in the cluster.
LbPolicy Cluster_LbPolicy `protobuf:"varint,6,opt,name=lb_policy,json=lbPolicy,proto3,enum=envoy.api.v2.Cluster_LbPolicy" json:"lb_policy,omitempty"`
// If the service discovery type is
// :ref:`STATIC<envoy_api_enum_value_Cluster.DiscoveryType.STATIC>`,
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// then hosts is required.
//
// .. attention::
//
// **This field is deprecated**. Set the
// :ref:`load_assignment<envoy_api_field_Cluster.load_assignment>` field instead.
//
Hosts []*core.Address `protobuf:"bytes,7,rep,name=hosts" json:"hosts,omitempty"` // Deprecated: Do not use.
// Setting this is required for specifying members of
// :ref:`STATIC<envoy_api_enum_value_Cluster.DiscoveryType.STATIC>`,
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>` clusters.
// This field supersedes :ref:`hosts<envoy_api_field_Cluster.hosts>` field.
// [#comment:TODO(dio): Deprecate the hosts field and add it to DEPRECATED.md
// once load_assignment is implemented.]
//
// .. attention::
//
// Setting this allows non-EDS cluster types to contain embedded EDS equivalent
// :ref:`endpoint assignments<envoy_api_msg_ClusterLoadAssignment>`.
// Setting this overrides :ref:`hosts<envoy_api_field_Cluster.hosts>` values.
//
LoadAssignment *ClusterLoadAssignment `protobuf:"bytes,33,opt,name=load_assignment,json=loadAssignment" json:"load_assignment,omitempty"`
// Optional :ref:`active health checking <arch_overview_health_checking>`
// configuration for the cluster. If no
// configuration is specified no health checking will be done and all cluster
// members will be considered healthy at all times.
HealthChecks []*core.HealthCheck `protobuf:"bytes,8,rep,name=health_checks,json=healthChecks" json:"health_checks,omitempty"`
// Optional maximum requests for a single upstream connection. This parameter
// is respected by both the HTTP/1.1 and HTTP/2 connection pool
// implementations. If not specified, there is no limit. Setting this
// parameter to 1 will effectively disable keep alive.
MaxRequestsPerConnection *types.UInt32Value `protobuf:"bytes,9,opt,name=max_requests_per_connection,json=maxRequestsPerConnection" json:"max_requests_per_connection,omitempty"`
// Optional :ref:`circuit breaking <arch_overview_circuit_break>` for the cluster.
CircuitBreakers *cluster.CircuitBreakers `protobuf:"bytes,10,opt,name=circuit_breakers,json=circuitBreakers" json:"circuit_breakers,omitempty"`
// The TLS configuration for connections to the upstream cluster. If no TLS
// configuration is specified, TLS will not be used for new connections.
//
// .. attention::
//
// Server certificate verification is not enabled by default. Configure
// :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
// verification.
TlsContext *auth.UpstreamTlsContext `protobuf:"bytes,11,opt,name=tls_context,json=tlsContext" json:"tls_context,omitempty"`
// Additional options when handling HTTP requests. These options will be applicable to both
// HTTP1 and HTTP2 requests.
CommonHttpProtocolOptions *core.HttpProtocolOptions `protobuf:"bytes,29,opt,name=common_http_protocol_options,json=commonHttpProtocolOptions" json:"common_http_protocol_options,omitempty"`
// Additional options when handling HTTP1 requests.
HttpProtocolOptions *core.Http1ProtocolOptions `protobuf:"bytes,13,opt,name=http_protocol_options,json=httpProtocolOptions" json:"http_protocol_options,omitempty"`
// Even if default HTTP2 protocol options are desired, this field must be
// set so that Envoy will assume that the upstream supports HTTP/2 when
// making new HTTP connection pool connections. Currently, Envoy only
// supports prior knowledge for upstream connections. Even if TLS is used
// with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2
// connections to happen over plain text.
Http2ProtocolOptions *core.Http2ProtocolOptions `protobuf:"bytes,14,opt,name=http2_protocol_options,json=http2ProtocolOptions" json:"http2_protocol_options,omitempty"`
// The extension_protocol_options field is used to provide extension-specific protocol options
// for upstream connections. The key should match the extension filter name, such as
// "envoy.filters.network.thrift_proxy". See the extension's documentation for details on
// specific options.
ExtensionProtocolOptions map[string]*types.Struct `protobuf:"bytes,35,rep,name=extension_protocol_options,json=extensionProtocolOptions" json:"extension_protocol_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"`
// If the DNS refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this value is used as the cluster’s DNS refresh
// rate. If this setting is not specified, the value defaults to 5000. For
// cluster types other than
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// and :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
DnsRefreshRate *time.Duration `protobuf:"bytes,16,opt,name=dns_refresh_rate,json=dnsRefreshRate,stdduration" json:"dns_refresh_rate,omitempty"`
// The DNS IP address resolution policy. If this setting is not specified, the
// value defaults to
// :ref:`AUTO<envoy_api_enum_value_Cluster.DnsLookupFamily.AUTO>`.
DnsLookupFamily Cluster_DnsLookupFamily `protobuf:"varint,17,opt,name=dns_lookup_family,json=dnsLookupFamily,proto3,enum=envoy.api.v2.Cluster_DnsLookupFamily" json:"dns_lookup_family,omitempty"`
// If DNS resolvers are specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this value is used to specify the cluster’s dns resolvers.
// If this setting is not specified, the value defaults to the default
// resolver, which uses /etc/resolv.conf for configuration. For cluster types
// other than
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// and :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
DnsResolvers []*core.Address `protobuf:"bytes,18,rep,name=dns_resolvers,json=dnsResolvers" json:"dns_resolvers,omitempty"`
// If specified, outlier detection will be enabled for this upstream cluster.
// Each of the configuration values can be overridden via
// :ref:`runtime values <config_cluster_manager_cluster_runtime_outlier_detection>`.
OutlierDetection *cluster.OutlierDetection `protobuf:"bytes,19,opt,name=outlier_detection,json=outlierDetection" json:"outlier_detection,omitempty"`
// The interval for removing stale hosts from a cluster type
// :ref:`ORIGINAL_DST<envoy_api_enum_value_Cluster.DiscoveryType.ORIGINAL_DST>`.
// Hosts are considered stale if they have not been used
// as upstream destinations during this interval. New hosts are added
// to original destination clusters on demand as new connections are
// redirected to Envoy, causing the number of hosts in the cluster to
// grow over time. Hosts that are not stale (they are actively used as
// destinations) are kept in the cluster, which allows connections to
// them remain open, saving the latency that would otherwise be spent
// on opening new connections. If this setting is not specified, the
// value defaults to 5000ms. For cluster types other than
// :ref:`ORIGINAL_DST<envoy_api_enum_value_Cluster.DiscoveryType.ORIGINAL_DST>`
// this setting is ignored.
CleanupInterval *time.Duration `protobuf:"bytes,20,opt,name=cleanup_interval,json=cleanupInterval,stdduration" json:"cleanup_interval,omitempty"`
// Optional configuration used to bind newly established upstream connections.
// This overrides any bind_config specified in the bootstrap proto.
// If the address and port are empty, no bind will be performed.
UpstreamBindConfig *core.BindConfig `protobuf:"bytes,21,opt,name=upstream_bind_config,json=upstreamBindConfig" json:"upstream_bind_config,omitempty"`
// Configuration for load balancing subsetting.
LbSubsetConfig *Cluster_LbSubsetConfig `protobuf:"bytes,22,opt,name=lb_subset_config,json=lbSubsetConfig" json:"lb_subset_config,omitempty"`
// Optional configuration for the load balancing algorithm selected by
// LbPolicy. Currently only
// :ref:`RING_HASH<envoy_api_enum_value_Cluster.LbPolicy.RING_HASH>`
// has additional configuration options.
// Specifying ring_hash_lb_config without setting the LbPolicy to
// :ref:`RING_HASH<envoy_api_enum_value_Cluster.LbPolicy.RING_HASH>`
// will generate an error at runtime.
//
// Types that are valid to be assigned to LbConfig:
// *Cluster_RingHashLbConfig_
// *Cluster_OriginalDstLbConfig_
LbConfig isCluster_LbConfig `protobuf_oneof:"lb_config"`
// Common configuration for all load balancer implementations.
CommonLbConfig *Cluster_CommonLbConfig `protobuf:"bytes,27,opt,name=common_lb_config,json=commonLbConfig" json:"common_lb_config,omitempty"`
// Optional custom transport socket implementation to use for upstream connections.
TransportSocket *core.TransportSocket `protobuf:"bytes,24,opt,name=transport_socket,json=transportSocket" json:"transport_socket,omitempty"`
// The Metadata field can be used to provide additional information about the
// cluster. It can be used for stats, logging, and varying filter behavior.
// Fields should use reverse DNS notation to denote which entity within Envoy
// will need the information. For instance, if the metadata is intended for
// the Router filter, the filter name should be specified as *envoy.router*.
Metadata *core.Metadata `protobuf:"bytes,25,opt,name=metadata" json:"metadata,omitempty"`
// Determines how Envoy selects the protocol used to speak to upstream hosts.
ProtocolSelection Cluster_ClusterProtocolSelection `protobuf:"varint,26,opt,name=protocol_selection,json=protocolSelection,proto3,enum=envoy.api.v2.Cluster_ClusterProtocolSelection" json:"protocol_selection,omitempty"`
// Optional options for upstream connections.
UpstreamConnectionOptions *UpstreamConnectionOptions `protobuf:"bytes,30,opt,name=upstream_connection_options,json=upstreamConnectionOptions" json:"upstream_connection_options,omitempty"`
// If an upstream host becomes unhealthy (as determined by the configured health checks
// or outlier detection), immediately close all connections to the failed host.
//
// .. note::
//
// This is currently only supported for connections created by tcp_proxy.
//
// .. note::
//
// The current implementation of this feature closes all connections immediately when
// the unhealthy status is detected. If there are a large number of connections open
// to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of
// time exclusively closing these connections, and not processing any other traffic.
CloseConnectionsOnHostHealthFailure bool `protobuf:"varint,31,opt,name=close_connections_on_host_health_failure,json=closeConnectionsOnHostHealthFailure,proto3" json:"close_connections_on_host_health_failure,omitempty"`
// If this cluster uses EDS or STRICT_DNS to configure its hosts, immediately drain
// connections from any hosts that are removed from service discovery.
//
// This only affects behavior for hosts that are being actively health checked.
// If this flag is not set to true, Envoy will wait until the hosts fail active health
// checking before removing it from the cluster.
DrainConnectionsOnHostRemoval bool `protobuf:"varint,32,opt,name=drain_connections_on_host_removal,json=drainConnectionsOnHostRemoval,proto3" json:"drain_connections_on_host_removal,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Cluster) Reset() { *m = Cluster{} }
func (m *Cluster) String() string { return proto.CompactTextString(m) }
func (*Cluster) ProtoMessage() {}
func (*Cluster) Descriptor() ([]byte, []int) {
return fileDescriptor_cds_c9aad078b729c273, []int{0}
}
func (m *Cluster) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Cluster.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Cluster) XXX_Merge(src proto.Message) {
xxx_messageInfo_Cluster.Merge(dst, src)
}
func (m *Cluster) XXX_Size() int {
return m.Size()
}
func (m *Cluster) XXX_DiscardUnknown() {
xxx_messageInfo_Cluster.DiscardUnknown(m)
}
var xxx_messageInfo_Cluster proto.InternalMessageInfo
type isCluster_LbConfig interface {
isCluster_LbConfig()
Equal(interface{}) bool
MarshalTo([]byte) (int, error)
Size() int
}
type Cluster_RingHashLbConfig_ struct {
RingHashLbConfig *Cluster_RingHashLbConfig `protobuf:"bytes,23,opt,name=ring_hash_lb_config,json=ringHashLbConfig,oneof"`
}
type Cluster_OriginalDstLbConfig_ struct {
OriginalDstLbConfig *Cluster_OriginalDstLbConfig `protobuf:"bytes,34,opt,name=original_dst_lb_config,json=originalDstLbConfig,oneof"`
}
func (*Cluster_RingHashLbConfig_) isCluster_LbConfig() {}
func (*Cluster_OriginalDstLbConfig_) isCluster_LbConfig() {}
func (m *Cluster) GetLbConfig() isCluster_LbConfig {
if m != nil {
return m.LbConfig
}
return nil
}
func (m *Cluster) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Cluster) GetAltStatName() string {
if m != nil {
return m.AltStatName
}
return ""
}
func (m *Cluster) GetType() Cluster_DiscoveryType {
if m != nil {
return m.Type
}
return Cluster_STATIC
}
func (m *Cluster) GetEdsClusterConfig() *Cluster_EdsClusterConfig {
if m != nil {
return m.EdsClusterConfig
}
return nil
}
func (m *Cluster) GetConnectTimeout() time.Duration {
if m != nil {
return m.ConnectTimeout
}
return 0
}
func (m *Cluster) GetPerConnectionBufferLimitBytes() *types.UInt32Value {
if m != nil {
return m.PerConnectionBufferLimitBytes
}
return nil
}
func (m *Cluster) GetLbPolicy() Cluster_LbPolicy {
if m != nil {
return m.LbPolicy
}
return Cluster_ROUND_ROBIN
}
// Deprecated: Do not use.
func (m *Cluster) GetHosts() []*core.Address {
if m != nil {
return m.Hosts
}
return nil
}
func (m *Cluster) GetLoadAssignment() *ClusterLoadAssignment {
if m != nil {
return m.LoadAssignment
}
return nil
}
func (m *Cluster) GetHealthChecks() []*core.HealthCheck {
if m != nil {
return m.HealthChecks
}
return nil
}
func (m *Cluster) GetMaxRequestsPerConnection() *types.UInt32Value {
if m != nil {
return m.MaxRequestsPerConnection
}
return nil
}
func (m *Cluster) GetCircuitBreakers() *cluster.CircuitBreakers {
if m != nil {
return m.CircuitBreakers
}
return nil
}
func (m *Cluster) GetTlsContext() *auth.UpstreamTlsContext {
if m != nil {
return m.TlsContext
}
return nil
}
func (m *Cluster) GetCommonHttpProtocolOptions() *core.HttpProtocolOptions {
if m != nil {
return m.CommonHttpProtocolOptions
}
return nil
}
func (m *Cluster) GetHttpProtocolOptions() *core.Http1ProtocolOptions {
if m != nil {
return m.HttpProtocolOptions
}
return nil
}
func (m *Cluster) GetHttp2ProtocolOptions() *core.Http2ProtocolOptions {
if m != nil {
return m.Http2ProtocolOptions
}
return nil
}
func (m *Cluster) GetExtensionProtocolOptions() map[string]*types.Struct {
if m != nil {
return m.ExtensionProtocolOptions
}
return nil
}
func (m *Cluster) GetDnsRefreshRate() *time.Duration {
if m != nil {
return m.DnsRefreshRate
}
return nil
}
func (m *Cluster) GetDnsLookupFamily() Cluster_DnsLookupFamily {
if m != nil {
return m.DnsLookupFamily
}
return Cluster_AUTO
}
func (m *Cluster) GetDnsResolvers() []*core.Address {
if m != nil {
return m.DnsResolvers
}
return nil
}
func (m *Cluster) GetOutlierDetection() *cluster.OutlierDetection {
if m != nil {
return m.OutlierDetection
}
return nil
}
func (m *Cluster) GetCleanupInterval() *time.Duration {
if m != nil {
return m.CleanupInterval
}
return nil
}
func (m *Cluster) GetUpstreamBindConfig() *core.BindConfig {
if m != nil {
return m.UpstreamBindConfig
}
return nil
}
func (m *Cluster) GetLbSubsetConfig() *Cluster_LbSubsetConfig {
if m != nil {
return m.LbSubsetConfig
}
return nil
}
func (m *Cluster) GetRingHashLbConfig() *Cluster_RingHashLbConfig {
if x, ok := m.GetLbConfig().(*Cluster_RingHashLbConfig_); ok {
return x.RingHashLbConfig
}
return nil
}
func (m *Cluster) GetOriginalDstLbConfig() *Cluster_OriginalDstLbConfig {
if x, ok := m.GetLbConfig().(*Cluster_OriginalDstLbConfig_); ok {
return x.OriginalDstLbConfig
}
return nil
}
func (m *Cluster) GetCommonLbConfig() *Cluster_CommonLbConfig {
if m != nil {
return m.CommonLbConfig
}
return nil
}
func (m *Cluster) GetTransportSocket() *core.TransportSocket {
if m != nil {
return m.TransportSocket
}
return nil
}
func (m *Cluster) GetMetadata() *core.Metadata {
if m != nil {
return m.Metadata
}
return nil
}
func (m *Cluster) GetProtocolSelection() Cluster_ClusterProtocolSelection {
if m != nil {
return m.ProtocolSelection
}
return Cluster_USE_CONFIGURED_PROTOCOL
}
func (m *Cluster) GetUpstreamConnectionOptions() *UpstreamConnectionOptions {
if m != nil {
return m.UpstreamConnectionOptions
}
return nil
}
func (m *Cluster) GetCloseConnectionsOnHostHealthFailure() bool {
if m != nil {
return m.CloseConnectionsOnHostHealthFailure
}
return false
}
func (m *Cluster) GetDrainConnectionsOnHostRemoval() bool {
if m != nil {
return m.DrainConnectionsOnHostRemoval
}
return false
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Cluster) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Cluster_OneofMarshaler, _Cluster_OneofUnmarshaler, _Cluster_OneofSizer, []interface{}{
(*Cluster_RingHashLbConfig_)(nil),
(*Cluster_OriginalDstLbConfig_)(nil),
}
}
func _Cluster_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Cluster)
// lb_config
switch x := m.LbConfig.(type) {
case *Cluster_RingHashLbConfig_:
_ = b.EncodeVarint(23<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RingHashLbConfig); err != nil {
return err
}
case *Cluster_OriginalDstLbConfig_:
_ = b.EncodeVarint(34<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.OriginalDstLbConfig); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Cluster.LbConfig has unexpected type %T", x)
}
return nil
}
func _Cluster_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Cluster)
switch tag {
case 23: // lb_config.ring_hash_lb_config
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Cluster_RingHashLbConfig)
err := b.DecodeMessage(msg)
m.LbConfig = &Cluster_RingHashLbConfig_{msg}
return true, err
case 34: // lb_config.original_dst_lb_config
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Cluster_OriginalDstLbConfig)
err := b.DecodeMessage(msg)
m.LbConfig = &Cluster_OriginalDstLbConfig_{msg}
return true, err
default:
return false, nil
}
}
func _Cluster_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Cluster)
// lb_config
switch x := m.LbConfig.(type) {
case *Cluster_RingHashLbConfig_:
s := proto.Size(x.RingHashLbConfig)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Cluster_OriginalDstLbConfig_:
s := proto.Size(x.OriginalDstLbConfig)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Only valid when discovery type is EDS.
type Cluster_EdsClusterConfig struct {
// Configuration for the source of EDS updates for this Cluster.
EdsConfig *core.ConfigSource `protobuf:"bytes,1,opt,name=eds_config,json=edsConfig" json:"eds_config,omitempty"`
// Optional alternative to cluster name to present to EDS. This does not
// have the same restrictions as cluster name, i.e. it may be arbitrary
// length.
ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Cluster_EdsClusterConfig) Reset() { *m = Cluster_EdsClusterConfig{} }
func (m *Cluster_EdsClusterConfig) String() string { return proto.CompactTextString(m) }
func (*Cluster_EdsClusterConfig) ProtoMessage() {}
func (*Cluster_EdsClusterConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_cds_c9aad078b729c273, []int{0, 0}
}
func (m *Cluster_EdsClusterConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Cluster_EdsClusterConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Cluster_EdsClusterConfig.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Cluster_EdsClusterConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_Cluster_EdsClusterConfig.Merge(dst, src)
}
func (m *Cluster_EdsClusterConfig) XXX_Size() int {
return m.Size()
}
func (m *Cluster_EdsClusterConfig) XXX_DiscardUnknown() {
xxx_messageInfo_Cluster_EdsClusterConfig.DiscardUnknown(m)
}
var xxx_messageInfo_Cluster_EdsClusterConfig proto.InternalMessageInfo
func (m *Cluster_EdsClusterConfig) GetEdsConfig() *core.ConfigSource {
if m != nil {
return m.EdsConfig
}
return nil
}
func (m *Cluster_EdsClusterConfig) GetServiceName() string {
if m != nil {
return m.ServiceName
}
return ""
}
// Optionally divide the endpoints in this cluster into subsets defined by
// endpoint metadata and selected by route and weighted cluster metadata.
type Cluster_LbSubsetConfig struct {
// The behavior used when no endpoint subset matches the selected route's
// metadata. The value defaults to
// :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
FallbackPolicy Cluster_LbSubsetConfig_LbSubsetFallbackPolicy `protobuf:"varint,1,opt,name=fallback_policy,json=fallbackPolicy,proto3,enum=envoy.api.v2.Cluster_LbSubsetConfig_LbSubsetFallbackPolicy" json:"fallback_policy,omitempty"`
// Specifies the default subset of endpoints used during fallback if
// fallback_policy is
// :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
// Each field in default_subset is
// compared to the matching LbEndpoint.Metadata under the *envoy.lb*
// namespace. It is valid for no hosts to match, in which case the behavior
// is the same as a fallback_policy of
// :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
DefaultSubset *types.Struct `protobuf:"bytes,2,opt,name=default_subset,json=defaultSubset" json:"default_subset,omitempty"`
// For each entry, LbEndpoint.Metadata's
// *envoy.lb* namespace is traversed and a subset is created for each unique
// combination of key and value. For example:
//
// .. code-block:: json
//
// { "subset_selectors": [
// { "keys": [ "version" ] },
// { "keys": [ "stage", "hardware_type" ] }
// ]}
//
// A subset is matched when the metadata from the selected route and
// weighted cluster contains the same keys and values as the subset's
// metadata. The same host may appear in multiple subsets.
SubsetSelectors []*Cluster_LbSubsetConfig_LbSubsetSelector `protobuf:"bytes,3,rep,name=subset_selectors,json=subsetSelectors" json:"subset_selectors,omitempty"`
// If true, routing to subsets will take into account the localities and locality weights of the
// endpoints when making the routing decision.
//
// There are some potential pitfalls associated with enabling this feature, as the resulting
// traffic split after applying both a subset match and locality weights might be undesirable.
//
// Consider for example a situation in which you have 50/50 split across two localities X/Y
// which have 100 hosts each without subsetting. If the subset LB results in X having only 1
// host selected but Y having 100, then a lot more load is being dumped on the single host in X
// than originally anticipated in the load balancing assignment delivered via EDS.
LocalityWeightAware bool `protobuf:"varint,4,opt,name=locality_weight_aware,json=localityWeightAware,proto3" json:"locality_weight_aware,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Cluster_LbSubsetConfig) Reset() { *m = Cluster_LbSubsetConfig{} }
func (m *Cluster_LbSubsetConfig) String() string { return proto.CompactTextString(m) }
func (*Cluster_LbSubsetConfig) ProtoMessage() {}
func (*Cluster_LbSubsetConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_cds_c9aad078b729c273, []int{0, 2}
}
func (m *Cluster_LbSubsetConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Cluster_LbSubsetConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Cluster_LbSubsetConfig.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Cluster_LbSubsetConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_Cluster_LbSubsetConfig.Merge(dst, src)
}
func (m *Cluster_LbSubsetConfig) XXX_Size() int {
return m.Size()
}
func (m *Cluster_LbSubsetConfig) XXX_DiscardUnknown() {
xxx_messageInfo_Cluster_LbSubsetConfig.DiscardUnknown(m)
}
var xxx_messageInfo_Cluster_LbSubsetConfig proto.InternalMessageInfo
func (m *Cluster_LbSubsetConfig) GetFallbackPolicy() Cluster_LbSubsetConfig_LbSubsetFallbackPolicy {
if m != nil {
return m.FallbackPolicy
}
return Cluster_LbSubsetConfig_NO_FALLBACK
}
func (m *Cluster_LbSubsetConfig) GetDefaultSubset() *types.Struct {
if m != nil {
return m.DefaultSubset
}
return nil
}
func (m *Cluster_LbSubsetConfig) GetSubsetSelectors() []*Cluster_LbSubsetConfig_LbSubsetSelector {
if m != nil {
return m.SubsetSelectors
}
return nil
}
func (m *Cluster_LbSubsetConfig) GetLocalityWeightAware() bool {
if m != nil {
return m.LocalityWeightAware
}
return false
}
// Specifications for subsets.
type Cluster_LbSubsetConfig_LbSubsetSelector struct {
// List of keys to match with the weighted cluster metadata.
Keys []string `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Cluster_LbSubsetConfig_LbSubsetSelector) Reset() {
*m = Cluster_LbSubsetConfig_LbSubsetSelector{}
}
func (m *Cluster_LbSubsetConfig_LbSubsetSelector) String() string { return proto.CompactTextString(m) }
func (*Cluster_LbSubsetConfig_LbSubsetSelector) ProtoMessage() {}
func (*Cluster_LbSubsetConfig_LbSubsetSelector) Descriptor() ([]byte, []int) {
return fileDescriptor_cds_c9aad078b729c273, []int{0, 2, 0}
}
func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Cluster_LbSubsetConfig_LbSubsetSelector.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_Merge(src proto.Message) {
xxx_messageInfo_Cluster_LbSubsetConfig_LbSubsetSelector.Merge(dst, src)
}
func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_Size() int {
return m.Size()
}