diff --git a/envoy/COMMIT b/envoy/COMMIT index 1c0ad23c3..84268dbc6 100644 --- a/envoy/COMMIT +++ b/envoy/COMMIT @@ -1 +1 @@ -b9c4ff2da2a91feb263eda5f39bc7e8307a669ee +640fcc0f2637c50c51bdd831de26c588debc9277 diff --git a/envoy/config/cluster/v3/cluster.pb.go b/envoy/config/cluster/v3/cluster.pb.go index 78a20ac7d..b58c7e2e0 100755 --- a/envoy/config/cluster/v3/cluster.pb.go +++ b/envoy/config/cluster/v3/cluster.pb.go @@ -858,6 +858,12 @@ type Cluster struct { // :ref:`STRICT_DNS` // and :ref:`LOGICAL_DNS` // this setting is ignored. + // This field is deprecated in favor of using the :ref:`cluster_type` + // extension point and configuring it with :ref:`DnsCluster`. + // If :ref:`cluster_type` is configured with + // :ref:`DnsCluster`, this field will be ignored. + // + // Deprecated: Marked as deprecated in envoy/config/cluster/v3/cluster.proto. DnsRefreshRate *durationpb.Duration `protobuf:"bytes,16,opt,name=dns_refresh_rate,json=dnsRefreshRate,proto3" json:"dns_refresh_rate,omitempty"` // DNS jitter can be optionally specified if the cluster type is either // :ref:`STRICT_DNS`, @@ -868,6 +874,12 @@ type Cluster struct { // :ref:`STRICT_DNS` // and :ref:`LOGICAL_DNS` // this setting is ignored. + // This field is deprecated in favor of using the :ref:`cluster_type` + // extension point and configuring it with :ref:`DnsCluster`. + // If :ref:`cluster_type` is configured with + // :ref:`DnsCluster`, this field will be ignored. + // + // Deprecated: Marked as deprecated in envoy/config/cluster/v3/cluster.proto. DnsJitter *durationpb.Duration `protobuf:"bytes,58,opt,name=dns_jitter,json=dnsJitter,proto3" json:"dns_jitter,omitempty"` // If the DNS failure refresh rate is specified and the cluster type is either // :ref:`STRICT_DNS`, @@ -877,14 +889,31 @@ type Cluster struct { // other than :ref:`STRICT_DNS` and // :ref:`LOGICAL_DNS` this setting is // ignored. + // This field is deprecated in favor of using the :ref:`cluster_type` + // extension point and configuring it with :ref:`DnsCluster`. + // If :ref:`cluster_type` is configured with + // :ref:`DnsCluster`, this field will be ignored. + // + // Deprecated: Marked as deprecated in envoy/config/cluster/v3/cluster.proto. DnsFailureRefreshRate *Cluster_RefreshRate `protobuf:"bytes,44,opt,name=dns_failure_refresh_rate,json=dnsFailureRefreshRate,proto3" json:"dns_failure_refresh_rate,omitempty"` // Optional configuration for setting cluster's DNS refresh rate. If the value is set to true, // cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS // resolution. + // This field is deprecated in favor of using the :ref:`cluster_type` + // extension point and configuring it with :ref:`DnsCluster`. + // If :ref:`cluster_type` is configured with + // :ref:`DnsCluster`, this field will be ignored. + // + // Deprecated: Marked as deprecated in envoy/config/cluster/v3/cluster.proto. RespectDnsTtl bool `protobuf:"varint,39,opt,name=respect_dns_ttl,json=respectDnsTtl,proto3" json:"respect_dns_ttl,omitempty"` // The DNS IP address resolution policy. If this setting is not specified, the // value defaults to // :ref:`AUTO`. + // For logical and strict dns cluster, this field is deprecated in favor of using the + // :ref:`cluster_type` + // extension point and configuring it with :ref:`DnsCluster`. + // If :ref:`cluster_type` is configured with + // :ref:`DnsCluster`, this field will be ignored. DnsLookupFamily Cluster_DnsLookupFamily `protobuf:"varint,17,opt,name=dns_lookup_family,json=dnsLookupFamily,proto3,enum=envoy.config.cluster.v3.Cluster_DnsLookupFamily" json:"dns_lookup_family,omitempty"` // If DNS resolvers are specified and the cluster type is either // :ref:`STRICT_DNS`, @@ -923,6 +952,9 @@ type Cluster struct { // During the transition period when both “dns_resolution_config“ and “typed_dns_resolver_config“ exists, // when “typed_dns_resolver_config“ is in place, Envoy will use it and ignore “dns_resolution_config“. // When “typed_dns_resolver_config“ is missing, the default behavior is in place. + // Also note that this field is deprecated for logical dns and strict dns clusters and will be ignored when + // :ref:`cluster_type` is configured with + // :ref:`DnsCluster`. // [#extension-category: envoy.network.dns_resolver] TypedDnsResolverConfig *v32.TypedExtensionConfig `protobuf:"bytes,55,opt,name=typed_dns_resolver_config,json=typedDnsResolverConfig,proto3" json:"typed_dns_resolver_config,omitempty"` // Optional configuration for having cluster readiness block on warm-up. Currently, only applicable for @@ -1265,6 +1297,7 @@ func (x *Cluster) GetTypedExtensionProtocolOptions() map[string]*anypb.Any { return nil } +// Deprecated: Marked as deprecated in envoy/config/cluster/v3/cluster.proto. func (x *Cluster) GetDnsRefreshRate() *durationpb.Duration { if x != nil { return x.DnsRefreshRate @@ -1272,6 +1305,7 @@ func (x *Cluster) GetDnsRefreshRate() *durationpb.Duration { return nil } +// Deprecated: Marked as deprecated in envoy/config/cluster/v3/cluster.proto. func (x *Cluster) GetDnsJitter() *durationpb.Duration { if x != nil { return x.DnsJitter @@ -1279,6 +1313,7 @@ func (x *Cluster) GetDnsJitter() *durationpb.Duration { return nil } +// Deprecated: Marked as deprecated in envoy/config/cluster/v3/cluster.proto. func (x *Cluster) GetDnsFailureRefreshRate() *Cluster_RefreshRate { if x != nil { return x.DnsFailureRefreshRate @@ -1286,6 +1321,7 @@ func (x *Cluster) GetDnsFailureRefreshRate() *Cluster_RefreshRate { return nil } +// Deprecated: Marked as deprecated in envoy/config/cluster/v3/cluster.proto. func (x *Cluster) GetRespectDnsTtl() bool { if x != nil { return x.RespectDnsTtl @@ -3389,7 +3425,7 @@ var file_envoy_config_cluster_v3_cluster_proto_rawDesc = []byte{ 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, - 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x9a, 0x54, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xca, 0x54, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x6f, 0x0a, 0x18, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x2b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, @@ -3497,25 +3533,28 @@ var file_envoy_config_cluster_v3_cluster_proto_rawDesc = []byte{ 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1d, 0x74, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x51, 0x0a, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x10, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, - 0x52, 0x0e, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, - 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x6e, 0x73, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x3a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x32, 0x00, 0x52, 0x09, 0x64, 0x6e, 0x73, 0x4a, 0x69, - 0x74, 0x74, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x18, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, - 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, - 0x52, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64, 0x6e, 0x73, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x72, - 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x27, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x44, 0x6e, 0x73, + 0x6f, 0x6e, 0x42, 0x17, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, + 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x52, 0x0e, 0x64, 0x6e, 0x73, + 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x64, + 0x6e, 0x73, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x3a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x13, 0xfa, 0x42, 0x05, 0xaa, + 0x01, 0x02, 0x32, 0x00, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x52, + 0x09, 0x64, 0x6e, 0x73, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x72, 0x0a, 0x18, 0x64, 0x6e, + 0x73, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x42, 0x0b, 0x92, 0xc7, 0x86, 0xd8, + 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x52, 0x15, 0x64, 0x6e, 0x73, 0x46, 0x61, 0x69, 0x6c, + 0x75, 0x72, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x33, + 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x74, + 0x6c, 0x18, 0x27, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0b, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, + 0x2e, 0x30, 0x18, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x44, 0x6e, 0x73, 0x54, 0x74, 0x6c, 0x12, 0x66, 0x0a, 0x11, 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, diff --git a/envoy/extensions/clusters/common/dns/v3/dns.pb.go b/envoy/extensions/clusters/common/dns/v3/dns.pb.go new file mode 100755 index 000000000..01ec1f4b4 --- /dev/null +++ b/envoy/extensions/clusters/common/dns/v3/dns.pb.go @@ -0,0 +1,159 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v5.29.1 +// source: envoy/extensions/clusters/common/dns/v3/dns.proto + +package dnsv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + 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) +) + +type DnsLookupFamily int32 + +const ( + DnsLookupFamily_UNSPECIFIED DnsLookupFamily = 0 + DnsLookupFamily_AUTO DnsLookupFamily = 1 + DnsLookupFamily_V4_ONLY DnsLookupFamily = 2 + DnsLookupFamily_V6_ONLY DnsLookupFamily = 3 + DnsLookupFamily_V4_PREFERRED DnsLookupFamily = 4 + DnsLookupFamily_ALL DnsLookupFamily = 5 +) + +// Enum value maps for DnsLookupFamily. +var ( + DnsLookupFamily_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "AUTO", + 2: "V4_ONLY", + 3: "V6_ONLY", + 4: "V4_PREFERRED", + 5: "ALL", + } + DnsLookupFamily_value = map[string]int32{ + "UNSPECIFIED": 0, + "AUTO": 1, + "V4_ONLY": 2, + "V6_ONLY": 3, + "V4_PREFERRED": 4, + "ALL": 5, + } +) + +func (x DnsLookupFamily) Enum() *DnsLookupFamily { + p := new(DnsLookupFamily) + *p = x + return p +} + +func (x DnsLookupFamily) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DnsLookupFamily) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_clusters_common_dns_v3_dns_proto_enumTypes[0].Descriptor() +} + +func (DnsLookupFamily) Type() protoreflect.EnumType { + return &file_envoy_extensions_clusters_common_dns_v3_dns_proto_enumTypes[0] +} + +func (x DnsLookupFamily) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DnsLookupFamily.Descriptor instead. +func (DnsLookupFamily) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_clusters_common_dns_v3_dns_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_clusters_common_dns_v3_dns_proto protoreflect.FileDescriptor + +var file_envoy_extensions_clusters_common_dns_v3_dns_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0x61, 0x0a, 0x0f, 0x44, + 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x0f, + 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x34, 0x5f, + 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x36, 0x5f, 0x4f, 0x4e, 0x4c, + 0x59, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x56, 0x34, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, + 0x52, 0x45, 0x44, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x05, 0x42, 0xa1, + 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, + 0x42, 0x08, 0x44, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x6e, 0x73, + 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_clusters_common_dns_v3_dns_proto_rawDescOnce sync.Once + file_envoy_extensions_clusters_common_dns_v3_dns_proto_rawDescData = file_envoy_extensions_clusters_common_dns_v3_dns_proto_rawDesc +) + +func file_envoy_extensions_clusters_common_dns_v3_dns_proto_rawDescGZIP() []byte { + file_envoy_extensions_clusters_common_dns_v3_dns_proto_rawDescOnce.Do(func() { + file_envoy_extensions_clusters_common_dns_v3_dns_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_clusters_common_dns_v3_dns_proto_rawDescData) + }) + return file_envoy_extensions_clusters_common_dns_v3_dns_proto_rawDescData +} + +var file_envoy_extensions_clusters_common_dns_v3_dns_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_clusters_common_dns_v3_dns_proto_goTypes = []interface{}{ + (DnsLookupFamily)(0), // 0: envoy.extensions.clusters.common.dns.v3.DnsLookupFamily +} +var file_envoy_extensions_clusters_common_dns_v3_dns_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_clusters_common_dns_v3_dns_proto_init() } +func file_envoy_extensions_clusters_common_dns_v3_dns_proto_init() { + if File_envoy_extensions_clusters_common_dns_v3_dns_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_clusters_common_dns_v3_dns_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_clusters_common_dns_v3_dns_proto_goTypes, + DependencyIndexes: file_envoy_extensions_clusters_common_dns_v3_dns_proto_depIdxs, + EnumInfos: file_envoy_extensions_clusters_common_dns_v3_dns_proto_enumTypes, + }.Build() + File_envoy_extensions_clusters_common_dns_v3_dns_proto = out.File + file_envoy_extensions_clusters_common_dns_v3_dns_proto_rawDesc = nil + file_envoy_extensions_clusters_common_dns_v3_dns_proto_goTypes = nil + file_envoy_extensions_clusters_common_dns_v3_dns_proto_depIdxs = nil +} diff --git a/envoy/extensions/clusters/common/dns/v3/dns.pb.validate.go b/envoy/extensions/clusters/common/dns/v3/dns.pb.validate.go new file mode 100755 index 000000000..b32c8d909 --- /dev/null +++ b/envoy/extensions/clusters/common/dns/v3/dns.pb.validate.go @@ -0,0 +1,37 @@ +//go:build !disable_pgv +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/clusters/common/dns/v3/dns.proto + +package dnsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) diff --git a/envoy/extensions/clusters/common/dns/v3/dns_vtproto.pb.go b/envoy/extensions/clusters/common/dns/v3/dns_vtproto.pb.go new file mode 100755 index 000000000..b76fb6098 --- /dev/null +++ b/envoy/extensions/clusters/common/dns/v3/dns_vtproto.pb.go @@ -0,0 +1,3 @@ +// +build ignore + +package ignore \ No newline at end of file diff --git a/envoy/extensions/clusters/dns/v3/dns_cluster.pb.go b/envoy/extensions/clusters/dns/v3/dns_cluster.pb.go new file mode 100755 index 000000000..77ea15dcd --- /dev/null +++ b/envoy/extensions/clusters/dns/v3/dns_cluster.pb.go @@ -0,0 +1,387 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v5.29.1 +// source: envoy/extensions/clusters/dns/v3/dns_cluster.proto + +package dnsv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" + v31 "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/common/dns/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + 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) +) + +// [#next-free-field: 10] +type DnsCluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This value is the cluster’s DNS refresh rate. The value configured must be at least 1ms. + // If this setting is not specified, the + // value defaults to 5000ms. + DnsRefreshRate *durationpb.Duration `protobuf:"bytes,3,opt,name=dns_refresh_rate,json=dnsRefreshRate,proto3" json:"dns_refresh_rate,omitempty"` + // This is the cluster’s DNS refresh rate when requests are failing. If this setting is + // not specified, the failure refresh rate defaults to the DNS refresh rate. + DnsFailureRefreshRate *DnsCluster_RefreshRate `protobuf:"bytes,4,opt,name=dns_failure_refresh_rate,json=dnsFailureRefreshRate,proto3" json:"dns_failure_refresh_rate,omitempty"` + // Optional configuration for setting cluster's DNS refresh rate. If the value is set to true, + // cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS + // resolution. + RespectDnsTtl bool `protobuf:"varint,5,opt,name=respect_dns_ttl,json=respectDnsTtl,proto3" json:"respect_dns_ttl,omitempty"` + // DNS jitter causes the cluster to refresh DNS entries later by a random amount of time to avoid a + // stampede of DNS requests. This value sets the upper bound (exclusive) for the random amount. + // There will be no jitter if this value is omitted. + DnsJitter *durationpb.Duration `protobuf:"bytes,6,opt,name=dns_jitter,json=dnsJitter,proto3" json:"dns_jitter,omitempty"` + // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, + // or any other DNS resolver types and the related parameters. + // For example, an object of + // :ref:`CaresDnsResolverConfig` + // can be packed into this “typed_dns_resolver_config“. This configuration replaces the + // :ref:`Cluster.typed_dns_resolver_config` + // configuration which replaces :ref:`Cluster.dns_resolution_config`. + // During the transition period when + // :ref:`DnsCluster.typed_dns_resolver_config`, + // :ref:`Cluster.typed_dns_resolver_config`, + // and :ref:`Cluster.dns_resolution_config` + // exist, Envoy will use + // :ref:`DnsCluster.typed_dns_resolver_config` + // and ignore + // DNS resolver-related fields in :ref:`Cluster` if the cluster is configured via the + // :ref:`Cluster.cluster_type` extension point with the + // :ref:`DnsCluster` extension type. + // Otherwise, see :ref:`Cluster.typed_dns_resolver_config`. + // [#extension-category: envoy.network.dns_resolver] + TypedDnsResolverConfig *v3.TypedExtensionConfig `protobuf:"bytes,7,opt,name=typed_dns_resolver_config,json=typedDnsResolverConfig,proto3" json:"typed_dns_resolver_config,omitempty"` + // The DNS IP address resolution policy. If this setting is not specified, the + // value defaults to + // :ref:`AUTO`. + DnsLookupFamily v31.DnsLookupFamily `protobuf:"varint,8,opt,name=dns_lookup_family,json=dnsLookupFamily,proto3,enum=envoy.extensions.clusters.common.dns.v3.DnsLookupFamily" json:"dns_lookup_family,omitempty"` + // If true, all returned addresses are considered to be associated with a single endpoint, + // which maps to :ref:`logical DNS discovery ` + // semantics. Otherwise, each address is considered to be a separate endpoint, which maps to + // :ref:`strict DNS discovery ` semantics. + AllAddressesInSingleEndpoint bool `protobuf:"varint,9,opt,name=all_addresses_in_single_endpoint,json=allAddressesInSingleEndpoint,proto3" json:"all_addresses_in_single_endpoint,omitempty"` +} + +func (x *DnsCluster) Reset() { + *x = DnsCluster{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsCluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsCluster) ProtoMessage() {} + +func (x *DnsCluster) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_clusters_dns_v3_dns_cluster_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 DnsCluster.ProtoReflect.Descriptor instead. +func (*DnsCluster) Descriptor() ([]byte, []int) { + return file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *DnsCluster) GetDnsRefreshRate() *durationpb.Duration { + if x != nil { + return x.DnsRefreshRate + } + return nil +} + +func (x *DnsCluster) GetDnsFailureRefreshRate() *DnsCluster_RefreshRate { + if x != nil { + return x.DnsFailureRefreshRate + } + return nil +} + +func (x *DnsCluster) GetRespectDnsTtl() bool { + if x != nil { + return x.RespectDnsTtl + } + return false +} + +func (x *DnsCluster) GetDnsJitter() *durationpb.Duration { + if x != nil { + return x.DnsJitter + } + return nil +} + +func (x *DnsCluster) GetTypedDnsResolverConfig() *v3.TypedExtensionConfig { + if x != nil { + return x.TypedDnsResolverConfig + } + return nil +} + +func (x *DnsCluster) GetDnsLookupFamily() v31.DnsLookupFamily { + if x != nil { + return x.DnsLookupFamily + } + return v31.DnsLookupFamily(0) +} + +func (x *DnsCluster) GetAllAddressesInSingleEndpoint() bool { + if x != nil { + return x.AllAddressesInSingleEndpoint + } + return false +} + +type DnsCluster_RefreshRate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the base interval between refreshes. This parameter is required and must be greater + // than zero and less than + // :ref:`max_interval `. + BaseInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` + // Specifies the maximum interval between refreshes. This parameter is optional, but must be + // greater than or equal to the + // :ref:`base_interval ` if set. The default + // is 10 times the :ref:`base_interval `. + MaxInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` +} + +func (x *DnsCluster_RefreshRate) Reset() { + *x = DnsCluster_RefreshRate{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsCluster_RefreshRate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsCluster_RefreshRate) ProtoMessage() {} + +func (x *DnsCluster_RefreshRate) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_clusters_dns_v3_dns_cluster_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 DnsCluster_RefreshRate.ProtoReflect.Descriptor instead. +func (*DnsCluster_RefreshRate) Descriptor() ([]byte, []int) { + return file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *DnsCluster_RefreshRate) GetBaseInterval() *durationpb.Duration { + if x != nil { + return x.BaseInterval + } + return nil +} + +func (x *DnsCluster_RefreshRate) GetMaxInterval() *durationpb.Duration { + if x != nil { + return x.MaxInterval + } + return nil +} + +var File_envoy_extensions_clusters_dns_v3_dns_cluster_proto protoreflect.FileDescriptor + +var file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x64, 0x6e, 0x73, 0x2f, + 0x76, 0x33, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x64, + 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x05, 0x0a, 0x0a, 0x44, 0x6e, 0x73, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x10, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, + 0xaa, 0x01, 0x06, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0e, 0x64, 0x6e, 0x73, 0x52, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x71, 0x0a, 0x18, 0x64, 0x6e, 0x73, + 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, + 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x52, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64, 0x6e, 0x73, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0f, + 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x74, 0x6c, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x44, 0x6e, + 0x73, 0x54, 0x74, 0x6c, 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x6e, 0x73, 0x5f, 0x6a, 0x69, 0x74, 0x74, + 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x32, 0x00, 0x52, 0x09, 0x64, + 0x6e, 0x73, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x19, 0x74, 0x79, 0x70, 0x65, + 0x64, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x74, 0x79, 0x70, 0x65, 0x64, 0x44, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x64, 0x0a, 0x11, 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x66, 0x61, + 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x6e, + 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x61, + 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0f, 0x64, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, + 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x46, 0x0a, 0x20, 0x61, 0x6c, 0x6c, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x1c, 0x61, 0x6c, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x49, 0x6e, 0x53, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x1a, 0xa9, 0x01, + 0x0a, 0x0b, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, + 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x0e, 0xfa, 0x42, 0x0b, 0xaa, 0x01, 0x08, 0x08, 0x01, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, + 0x0c, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x4a, 0x0a, + 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, + 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0b, 0x6d, 0x61, + 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x9a, 0x01, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x64, 0x6e, + 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x44, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x76, 0x33, + 0x3b, 0x64, 0x6e, 0x73, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescOnce sync.Once + file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescData = file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDesc +) + +func file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescGZIP() []byte { + file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescOnce.Do(func() { + file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescData) + }) + return file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescData +} + +var file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_goTypes = []interface{}{ + (*DnsCluster)(nil), // 0: envoy.extensions.clusters.dns.v3.DnsCluster + (*DnsCluster_RefreshRate)(nil), // 1: envoy.extensions.clusters.dns.v3.DnsCluster.RefreshRate + (*durationpb.Duration)(nil), // 2: google.protobuf.Duration + (*v3.TypedExtensionConfig)(nil), // 3: envoy.config.core.v3.TypedExtensionConfig + (v31.DnsLookupFamily)(0), // 4: envoy.extensions.clusters.common.dns.v3.DnsLookupFamily +} +var file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.clusters.dns.v3.DnsCluster.dns_refresh_rate:type_name -> google.protobuf.Duration + 1, // 1: envoy.extensions.clusters.dns.v3.DnsCluster.dns_failure_refresh_rate:type_name -> envoy.extensions.clusters.dns.v3.DnsCluster.RefreshRate + 2, // 2: envoy.extensions.clusters.dns.v3.DnsCluster.dns_jitter:type_name -> google.protobuf.Duration + 3, // 3: envoy.extensions.clusters.dns.v3.DnsCluster.typed_dns_resolver_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 4, // 4: envoy.extensions.clusters.dns.v3.DnsCluster.dns_lookup_family:type_name -> envoy.extensions.clusters.common.dns.v3.DnsLookupFamily + 2, // 5: envoy.extensions.clusters.dns.v3.DnsCluster.RefreshRate.base_interval:type_name -> google.protobuf.Duration + 2, // 6: envoy.extensions.clusters.dns.v3.DnsCluster.RefreshRate.max_interval:type_name -> google.protobuf.Duration + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_init() } +func file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_init() { + if File_envoy_extensions_clusters_dns_v3_dns_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsCluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsCluster_RefreshRate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_goTypes, + DependencyIndexes: file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_depIdxs, + MessageInfos: file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_msgTypes, + }.Build() + File_envoy_extensions_clusters_dns_v3_dns_cluster_proto = out.File + file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDesc = nil + file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_goTypes = nil + file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_depIdxs = nil +} diff --git a/envoy/extensions/clusters/dns/v3/dns_cluster.pb.validate.go b/envoy/extensions/clusters/dns/v3/dns_cluster.pb.validate.go new file mode 100755 index 000000000..e638f7cac --- /dev/null +++ b/envoy/extensions/clusters/dns/v3/dns_cluster.pb.validate.go @@ -0,0 +1,437 @@ +//go:build !disable_pgv +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/clusters/dns/v3/dns_cluster.proto + +package dnsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" + + v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/common/dns/v3" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort + + _ = v3.DnsLookupFamily(0) +) + +// Validate checks the field values on DnsCluster with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *DnsCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsCluster with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DnsClusterMultiError, or +// nil if none found. +func (m *DnsCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsCluster) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if d := m.GetDnsRefreshRate(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = DnsClusterValidationError{ + field: "DnsRefreshRate", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur <= gt { + err := DnsClusterValidationError{ + field: "DnsRefreshRate", + reason: "value must be greater than 1ms", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if all { + switch v := interface{}(m.GetDnsFailureRefreshRate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsClusterValidationError{ + field: "DnsFailureRefreshRate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsClusterValidationError{ + field: "DnsFailureRefreshRate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsFailureRefreshRate()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsClusterValidationError{ + field: "DnsFailureRefreshRate", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for RespectDnsTtl + + if d := m.GetDnsJitter(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = DnsClusterValidationError{ + field: "DnsJitter", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur < gte { + err := DnsClusterValidationError{ + field: "DnsJitter", + reason: "value must be greater than or equal to 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if all { + switch v := interface{}(m.GetTypedDnsResolverConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsClusterValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsClusterValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedDnsResolverConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsClusterValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for DnsLookupFamily + + // no validation rules for AllAddressesInSingleEndpoint + + if len(errors) > 0 { + return DnsClusterMultiError(errors) + } + + return nil +} + +// DnsClusterMultiError is an error wrapping multiple validation errors +// returned by DnsCluster.ValidateAll() if the designated constraints aren't met. +type DnsClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsClusterMultiError) AllErrors() []error { return m } + +// DnsClusterValidationError is the validation error returned by +// DnsCluster.Validate if the designated constraints aren't met. +type DnsClusterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsClusterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsClusterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsClusterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsClusterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsClusterValidationError) ErrorName() string { return "DnsClusterValidationError" } + +// Error satisfies the builtin error interface +func (e DnsClusterValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDnsCluster.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsClusterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsClusterValidationError{} + +// Validate checks the field values on DnsCluster_RefreshRate with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DnsCluster_RefreshRate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsCluster_RefreshRate with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsCluster_RefreshRateMultiError, or nil if none found. +func (m *DnsCluster_RefreshRate) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsCluster_RefreshRate) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetBaseInterval() == nil { + err := DnsCluster_RefreshRateValidationError{ + field: "BaseInterval", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if d := m.GetBaseInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = DnsCluster_RefreshRateValidationError{ + field: "BaseInterval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur <= gt { + err := DnsCluster_RefreshRateValidationError{ + field: "BaseInterval", + reason: "value must be greater than 1ms", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if d := m.GetMaxInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = DnsCluster_RefreshRateValidationError{ + field: "MaxInterval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur <= gt { + err := DnsCluster_RefreshRateValidationError{ + field: "MaxInterval", + reason: "value must be greater than 1ms", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if len(errors) > 0 { + return DnsCluster_RefreshRateMultiError(errors) + } + + return nil +} + +// DnsCluster_RefreshRateMultiError is an error wrapping multiple validation +// errors returned by DnsCluster_RefreshRate.ValidateAll() if the designated +// constraints aren't met. +type DnsCluster_RefreshRateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsCluster_RefreshRateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsCluster_RefreshRateMultiError) AllErrors() []error { return m } + +// DnsCluster_RefreshRateValidationError is the validation error returned by +// DnsCluster_RefreshRate.Validate if the designated constraints aren't met. +type DnsCluster_RefreshRateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsCluster_RefreshRateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsCluster_RefreshRateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsCluster_RefreshRateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsCluster_RefreshRateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsCluster_RefreshRateValidationError) ErrorName() string { + return "DnsCluster_RefreshRateValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsCluster_RefreshRateValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDnsCluster_RefreshRate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsCluster_RefreshRateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsCluster_RefreshRateValidationError{} diff --git a/envoy/extensions/clusters/dns/v3/dns_cluster_vtproto.pb.go b/envoy/extensions/clusters/dns/v3/dns_cluster_vtproto.pb.go new file mode 100755 index 000000000..2601b209a --- /dev/null +++ b/envoy/extensions/clusters/dns/v3/dns_cluster_vtproto.pb.go @@ -0,0 +1,243 @@ +//go:build vtprotobuf +// +build vtprotobuf + +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// source: envoy/extensions/clusters/dns/v3/dns_cluster.proto + +package dnsv3 + +import ( + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +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) +) + +func (m *DnsCluster_RefreshRate) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DnsCluster_RefreshRate) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DnsCluster_RefreshRate) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.MaxInterval != nil { + size, err := (*durationpb.Duration)(m.MaxInterval).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.BaseInterval != nil { + size, err := (*durationpb.Duration)(m.BaseInterval).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DnsCluster) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DnsCluster) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DnsCluster) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AllAddressesInSingleEndpoint { + i-- + if m.AllAddressesInSingleEndpoint { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.DnsLookupFamily != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DnsLookupFamily)) + i-- + dAtA[i] = 0x40 + } + if m.TypedDnsResolverConfig != nil { + if vtmsg, ok := interface{}(m.TypedDnsResolverConfig).(interface { + MarshalToSizedBufferVTStrict([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(m.TypedDnsResolverConfig) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) + } + i-- + dAtA[i] = 0x3a + } + if m.DnsJitter != nil { + size, err := (*durationpb.Duration)(m.DnsJitter).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + if m.RespectDnsTtl { + i-- + if m.RespectDnsTtl { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.DnsFailureRefreshRate != nil { + size, err := m.DnsFailureRefreshRate.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if m.DnsRefreshRate != nil { + size, err := (*durationpb.Duration)(m.DnsRefreshRate).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} + +func (m *DnsCluster_RefreshRate) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BaseInterval != nil { + l = (*durationpb.Duration)(m.BaseInterval).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.MaxInterval != nil { + l = (*durationpb.Duration)(m.MaxInterval).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DnsCluster) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DnsRefreshRate != nil { + l = (*durationpb.Duration)(m.DnsRefreshRate).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.DnsFailureRefreshRate != nil { + l = m.DnsFailureRefreshRate.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.RespectDnsTtl { + n += 2 + } + if m.DnsJitter != nil { + l = (*durationpb.Duration)(m.DnsJitter).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.TypedDnsResolverConfig != nil { + if size, ok := interface{}(m.TypedDnsResolverConfig).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(m.TypedDnsResolverConfig) + } + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.DnsLookupFamily != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DnsLookupFamily)) + } + if m.AllAddressesInSingleEndpoint { + n += 2 + } + n += len(m.unknownFields) + return n +}