diff --git a/cmd/polaris-controller/app/config.go b/cmd/polaris-controller/app/config.go index 1640433e..a2b3b581 100644 --- a/cmd/polaris-controller/app/config.go +++ b/cmd/polaris-controller/app/config.go @@ -28,12 +28,13 @@ import ( type ProxyMetadata struct { ServerAddress string `yaml:"serverAddress"` ClusterName string `yaml:"clusterName"` + OpenDemand string `yaml:"openDemand"` CAAddress string `yaml:"caAddress"` } // DefaultConfig controller 用到的配置 type DefaultConfig struct { - ProxyMetadata ProxyMetadata `yaml:"serviceSync"` + ProxyMetadata ProxyMetadata `yaml:"proxyMetadata"` } // SidecarInject sidecar 注入相关 diff --git a/deploy/kubernetes_v1.21/helm/templates/_params.tpl b/deploy/kubernetes_v1.21/helm/templates/_params.tpl index 2edd85b7..e93dd7d9 100644 --- a/deploy/kubernetes_v1.21/helm/templates/_params.tpl +++ b/deploy/kubernetes_v1.21/helm/templates/_params.tpl @@ -89,6 +89,8 @@ Define the cmd envs for the bootstrap init container. value: 15010 - name: CLUSTER_NAME value: {{ "{{" }}.ProxyConfig.ProxyMetadata.clusterName{{ "}}" }} +- name: OPEN_DEMAND + value: {{ "{{" }}.ProxyConfig.ProxyMetadata.opemDemand{{ "}}" }} {{- end -}} diff --git a/deploy/kubernetes_v1.21/helm/templates/controller-configmap-mesh.yaml b/deploy/kubernetes_v1.21/helm/templates/controller-configmap-mesh.yaml index bfb01bf1..e285c48b 100644 --- a/deploy/kubernetes_v1.21/helm/templates/controller-configmap-mesh.yaml +++ b/deploy/kubernetes_v1.21/helm/templates/controller-configmap-mesh.yaml @@ -83,4 +83,5 @@ data: defaultGroup: {{ .Values.polaris.sync.config.groupName }} defaultConfig: proxyMetadata: - serverAddress: {{ .Values.polaris.server.address }} \ No newline at end of file + serverAddress: {{ .Values.polaris.server.address }} + clusterName: "{{ .Values.cluster.name }}" diff --git a/deploy/kubernetes_v1.21/kubernetes/configmap.yaml b/deploy/kubernetes_v1.21/kubernetes/configmap.yaml index 46b3d746..bf45c353 100644 --- a/deploy/kubernetes_v1.21/kubernetes/configmap.yaml +++ b/deploy/kubernetes_v1.21/kubernetes/configmap.yaml @@ -84,4 +84,5 @@ data: defaultGroup: "#CLUSTER_NAME#" defaultConfig: proxyMetadata: - serverAddress: #POLARIS_HOST# \ No newline at end of file + serverAddress: #POLARIS_HOST# + clusterName: #CLUSTER_NAME# diff --git a/deploy/kubernetes_v1.21/kubernetes/injector.yaml b/deploy/kubernetes_v1.21/kubernetes/injector.yaml index b8b463be..fc24eda3 100644 --- a/deploy/kubernetes_v1.21/kubernetes/injector.yaml +++ b/deploy/kubernetes_v1.21/kubernetes/injector.yaml @@ -210,6 +210,8 @@ data: value: 15010 - name: CLUSTER_NAME value: {{.ProxyConfig.ProxyMetadata.clusterName}} + - name: OPEN_DEMAND + value: {{.ProxyConfig.ProxyMetadata.opemDemand}} volumeMounts: - mountPath: /var/lib/data name: envoy-bootstrap diff --git a/deploy/kubernetes_v1.22/helm/templates/_params.tpl b/deploy/kubernetes_v1.22/helm/templates/_params.tpl index aae27c57..ca3aaa5f 100644 --- a/deploy/kubernetes_v1.22/helm/templates/_params.tpl +++ b/deploy/kubernetes_v1.22/helm/templates/_params.tpl @@ -77,6 +77,8 @@ Define the cmd envs for the bootstrap init container. value: 15010 - name: CLUSTER_NAME value: {{ "{{" }}.ProxyConfig.ProxyMetadata.clusterName{{ "}}" }} +- name: OPEN_DEMAND + value: {{ "{{" }}.ProxyConfig.ProxyMetadata.opemDemand{{ "}}" }} {{- end -}} diff --git a/deploy/kubernetes_v1.22/helm/templates/controller-configmap-mesh.yaml b/deploy/kubernetes_v1.22/helm/templates/controller-configmap-mesh.yaml index bfb01bf1..e285c48b 100644 --- a/deploy/kubernetes_v1.22/helm/templates/controller-configmap-mesh.yaml +++ b/deploy/kubernetes_v1.22/helm/templates/controller-configmap-mesh.yaml @@ -83,4 +83,5 @@ data: defaultGroup: {{ .Values.polaris.sync.config.groupName }} defaultConfig: proxyMetadata: - serverAddress: {{ .Values.polaris.server.address }} \ No newline at end of file + serverAddress: {{ .Values.polaris.server.address }} + clusterName: "{{ .Values.cluster.name }}" diff --git a/deploy/kubernetes_v1.22/kubernetes/configmap.yaml b/deploy/kubernetes_v1.22/kubernetes/configmap.yaml index 46b3d746..bf45c353 100644 --- a/deploy/kubernetes_v1.22/kubernetes/configmap.yaml +++ b/deploy/kubernetes_v1.22/kubernetes/configmap.yaml @@ -84,4 +84,5 @@ data: defaultGroup: "#CLUSTER_NAME#" defaultConfig: proxyMetadata: - serverAddress: #POLARIS_HOST# \ No newline at end of file + serverAddress: #POLARIS_HOST# + clusterName: #CLUSTER_NAME# diff --git a/deploy/kubernetes_v1.22/kubernetes/injector.yaml b/deploy/kubernetes_v1.22/kubernetes/injector.yaml index 87f4fbcc..e5af04b5 100644 --- a/deploy/kubernetes_v1.22/kubernetes/injector.yaml +++ b/deploy/kubernetes_v1.22/kubernetes/injector.yaml @@ -193,6 +193,8 @@ data: value: 15010 - name: CLUSTER_NAME value: {{.ProxyConfig.ProxyMetadata.clusterName}} + - name: OPEN_DEMAND + value: {{.ProxyConfig.ProxyMetadata.opemDemand}} volumeMounts: - mountPath: /var/lib/data name: envoy-bootstrap diff --git a/pkg/inject/api/annotation/annotations.gen.go b/pkg/inject/api/annotation/annotations.gen.go index 01f4718f..fb5737a6 100644 --- a/pkg/inject/api/annotation/annotations.gen.go +++ b/pkg/inject/api/annotation/annotations.gen.go @@ -49,178 +49,6 @@ type Instance struct { } var ( - - AlphaCanonicalServiceAccounts = Instance { - Name: "alpha.polarismesh.cn/canonical-serviceaccounts", - Description: "Specifies the non-Kubernetes service accounts that are "+ - "allowed to run this service. NOTE This API is Alpha and "+ - "has no stability guarantees.", - Hidden: true, - Deprecated: false, - Resources: []ResourceTypes{ Service, }, - } - - AlphaIdentity = Instance { - Name: "alpha.polarismesh.cn/identity", - Description: "Identity for the workload. NOTE This API is Alpha and has "+ - "no stability guarantees.", - Hidden: true, - Deprecated: false, - Resources: []ResourceTypes{ Pod, }, - } - - AlphaKubernetesServiceAccounts = Instance { - Name: "alpha.polarismesh.cn/kubernetes-serviceaccounts", - Description: "Specifies the Kubernetes service accounts that are "+ - "allowed to run this service on the VMs. NOTE This API is "+ - "Alpha and has no stability guarantees.", - Hidden: true, - Deprecated: false, - Resources: []ResourceTypes{ Service, }, - } - - GalleyAnalyzeSuppress = Instance { - Name: "galley.polarismesh.cn/analyze-suppress", - Description: "A comma separated list of configuration analysis message "+ - "codes to suppress when Istio analyzers are run. For "+ - "example, to suppress reporting of IST0103 "+ - "(PodMissingProxy) and IST0108 (UnknownAnnotation) on a "+ - "resource, apply the annotation "+ - "'galley.polarismesh.cn/analyze-suppress=IST0108,IST0103'. If "+ - "the value is '*', then all configuration analysis "+ - "messages are suppressed.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Any, }, - } - - OperatorInstallChartOwner = Instance { - Name: "install.operator.polarismesh.cn/chart-owner", - Description: "Represents the name of the chart used to create this "+ - "resource.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Any, }, - } - - OperatorInstallOwnerGeneration = Instance { - Name: "install.operator.polarismesh.cn/owner-generation", - Description: "Represents the generation to which the resource was last "+ - "reconciled.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Any, }, - } - - OperatorInstallVersion = Instance { - Name: "install.operator.polarismesh.cn/version", - Description: "Represents the Istio version associated with the resource", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Any, }, - } - - IoKubernetesIngressClass = Instance { - Name: "kubernetes.io/ingress.class", - Description: "Annotation on an Ingress resources denoting the class of "+ - "controllers responsible for it.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Ingress, }, - } - - AlphaNetworkingEndpointsVersion = Instance { - Name: "networking.alpha.po la ri s me sh/endpointsVersion", - Description: "Added to synthetic ServiceEntry resources to provide the "+ - "raw resource version from the most recent Kubernetes "+ - "endpoints update (if available). NOTE This API is Alpha "+ - "and has no stability guarantees.", - Hidden: true, - Deprecated: false, - Resources: []ResourceTypes{ ServiceEntry, }, - } - - AlphaNetworkingNotReadyEndpoints = Instance { - Name: "networking.alpha.polarismesh.cn/notReadyEndpoints", - Description: "Added to synthetic ServiceEntry resources to provide the "+ - "'NotReadyAddresses' from the Kubernetes Endpoints "+ - "resource. The value is a comma-separated list of IP:port. "+ - "NOTE This API is Alpha and has no stability guarantees.", - Hidden: true, - Deprecated: false, - Resources: []ResourceTypes{ ServiceEntry, }, - } - - AlphaNetworkingServiceVersion = Instance { - Name: "networking.alpha.polarismesh.cn/serviceVersion", - Description: "Added to synthetic ServiceEntry resources to provide the "+ - "raw resource version from the most recent Kubernetes "+ - "service update. This will always be available for "+ - "synthetic service entries. NOTE This API is Alpha and has "+ - "no stability guarantees.", - Hidden: true, - Deprecated: false, - Resources: []ResourceTypes{ ServiceEntry, }, - } - - NetworkingExportTo = Instance { - Name: "networking.polarismesh.cn/exportTo", - Description: "Specifies the namespaces to which this service should be "+ - "exported to. A value of '*' indicates it is reachable "+ - "within the mesh '.' indicates it is reachable within its "+ - "namespace.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Service, }, - } - - PolicyCheck = Instance { - Name: "policy.polarismesh.cn/check", - Description: "Determines the policy for behavior when unable to connect "+ - "to Mixer. If not set, FAIL_CLOSE is set, rejecting "+ - "requests.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Pod, }, - } - - PolicyCheckBaseRetryWaitTime = Instance { - Name: "policy.polarismesh.cn/checkBaseRetryWaitTime", - Description: "Base time to wait between retries, will be adjusted by "+ - "backoff and jitter. In duration format. If not set, this "+ - "will be 80ms.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Pod, }, - } - - PolicyCheckMaxRetryWaitTime = Instance { - Name: "policy.polarismesh.cn/checkMaxRetryWaitTime", - Description: "Maximum time to wait between retries to Mixer. In "+ - "duration format. If not set, this will be 1000ms.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Pod, }, - } - - PolicyCheckRetries = Instance { - Name: "policy.polarismesh.cn/checkRetries", - Description: "The maximum number of retries on transport errors to "+ - "Mixer. If not set, this will be 0, indicating no retries.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Pod, }, - } - - PolicyLang = Instance { - Name: "policy.polarismesh.cn/lang", - Description: "Selects the attribute expression language runtime for "+ - "Mixer.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Pod, }, - } - SidecarStatusReadinessApplicationPorts = Instance { Name: "readiness.status.sidecar.polarismesh.cn/applicationPorts", Description: "Specifies the list of ports exposed by the application "+ @@ -278,25 +106,6 @@ var ( Resources: []ResourceTypes{ Pod, }, } - SidecarComponentLogLevel = Instance { - Name: "sidecar.polarismesh.cn/componentLogLevel", - Description: "Specifies the component log level for Envoy.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Pod, }, - } - - SidecarControlPlaneAuthPolicy = Instance { - Name: "sidecar.polarismesh.cn/controlPlaneAuthPolicy", - Description: "Specifies the auth policy used by the Istio control "+ - "plane. If NONE, traffic will not be encrypted. If "+ - "MUTUAL_TLS, traffic between Envoy sidecar will be wrapped "+ - "into mutual TLS connections.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Pod, }, - } - SidecarDiscoveryAddress = Instance { Name: "sidecar.polarismesh.cn/discoveryAddress", Description: "Specifies the XDS discovery address to be used by the "+ @@ -492,14 +301,4 @@ var ( Deprecated: false, Resources: []ResourceTypes{ Pod, }, } - - SidecarTrafficKubevirtInterfaces = Instance { - Name: "traffic.sidecar.polarismesh.cn/kubevirtInterfaces", - Description: "A comma separated list of virtual interfaces whose "+ - "inbound traffic (from VM) will be treated as outbound.", - Hidden: false, - Deprecated: false, - Resources: []ResourceTypes{ Pod, }, - } - ) diff --git a/pkg/inject/api/mesh/v1alpha1/config.pb.go b/pkg/inject/api/mesh/v1alpha1/config.pb.go deleted file mode 100644 index 8d4b1525..00000000 --- a/pkg/inject/api/mesh/v1alpha1/config.pb.go +++ /dev/null @@ -1,4233 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: mesh/v1alpha1/config.proto - -// Configuration affecting the service mesh as a whole. - -package v1alpha1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - io "io" - v1alpha3 "github.com/polarismesh/polaris-controller/pkg/inject/api/networking/v1alpha3" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Resource describes the source of configuration -type Resource int32 - -const ( - // Set to only receive service entries that are generated by the platform. - // These auto generated service entries are combination of services and endpoints - // that are generated by a specific platform e.g. k8 - Resource_SERVICE_REGISTRY Resource = 0 -) - -var Resource_name = map[int32]string{ - 0: "SERVICE_REGISTRY", -} - -var Resource_value = map[string]int32{ - "SERVICE_REGISTRY": 0, -} - -func (x Resource) String() string { - return proto.EnumName(Resource_name, int32(x)) -} - -func (Resource) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_b5c7ece76d5d5022, []int{0} -} - -type MeshConfig_IngressControllerMode int32 - -const ( - // Disables Istio ingress controller. - MeshConfig_OFF MeshConfig_IngressControllerMode = 0 - // Istio ingress controller will act on ingress resources that do not - // contain any annotation or whose annotations match the value - // specified in the ingress_class parameter described earlier. Use this - // mode if Istio ingress controller will be the default ingress - // controller for the entireKubernetes cluster. - MeshConfig_DEFAULT MeshConfig_IngressControllerMode = 1 - // Istio ingress controller will only act on ingress resources whose - // annotations match the value specified in the ingress_class parameter - // described earlier. Use this mode if Istio ingress controller will be - // a secondary ingress controller (e.g., in addition to a - // cloud-provided ingress controller). - MeshConfig_STRICT MeshConfig_IngressControllerMode = 2 -) - -var MeshConfig_IngressControllerMode_name = map[int32]string{ - 0: "OFF", - 1: "DEFAULT", - 2: "STRICT", -} - -var MeshConfig_IngressControllerMode_value = map[string]int32{ - "OFF": 0, - "DEFAULT": 1, - "STRICT": 2, -} - -func (x MeshConfig_IngressControllerMode) String() string { - return proto.EnumName(MeshConfig_IngressControllerMode_name, int32(x)) -} - -func (MeshConfig_IngressControllerMode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_b5c7ece76d5d5022, []int{0, 0} -} - -// $hide_from_docs -type MeshConfig_AuthPolicy int32 - -const ( - MeshConfig_NONE MeshConfig_AuthPolicy = 0 - MeshConfig_MUTUAL_TLS MeshConfig_AuthPolicy = 1 -) - -var MeshConfig_AuthPolicy_name = map[int32]string{ - 0: "NONE", - 1: "MUTUAL_TLS", -} - -var MeshConfig_AuthPolicy_value = map[string]int32{ - "NONE": 0, - "MUTUAL_TLS": 1, -} - -func (x MeshConfig_AuthPolicy) String() string { - return proto.EnumName(MeshConfig_AuthPolicy_name, int32(x)) -} - -func (MeshConfig_AuthPolicy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_b5c7ece76d5d5022, []int{0, 1} -} - -type MeshConfig_AccessLogEncoding int32 - -const ( - MeshConfig_TEXT MeshConfig_AccessLogEncoding = 0 - MeshConfig_JSON MeshConfig_AccessLogEncoding = 1 -) - -var MeshConfig_AccessLogEncoding_name = map[int32]string{ - 0: "TEXT", - 1: "JSON", -} - -var MeshConfig_AccessLogEncoding_value = map[string]int32{ - "TEXT": 0, - "JSON": 1, -} - -func (x MeshConfig_AccessLogEncoding) String() string { - return proto.EnumName(MeshConfig_AccessLogEncoding_name, int32(x)) -} - -func (MeshConfig_AccessLogEncoding) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_b5c7ece76d5d5022, []int{0, 2} -} - -// Default Policy for upgrading http1.1 connections to http2. -type MeshConfig_H2UpgradePolicy int32 - -const ( - // Do not upgrade connections to http2. - MeshConfig_DO_NOT_UPGRADE MeshConfig_H2UpgradePolicy = 0 - // Upgrade the connections to http2. - MeshConfig_UPGRADE MeshConfig_H2UpgradePolicy = 1 -) - -var MeshConfig_H2UpgradePolicy_name = map[int32]string{ - 0: "DO_NOT_UPGRADE", - 1: "UPGRADE", -} - -var MeshConfig_H2UpgradePolicy_value = map[string]int32{ - "DO_NOT_UPGRADE": 0, - "UPGRADE": 1, -} - -func (x MeshConfig_H2UpgradePolicy) String() string { - return proto.EnumName(MeshConfig_H2UpgradePolicy_name, int32(x)) -} - -func (MeshConfig_H2UpgradePolicy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_b5c7ece76d5d5022, []int{0, 3} -} - -type MeshConfig_OutboundTrafficPolicy_Mode int32 - -const ( - // outbound traffic will be restricted to services defined in the - // service registry as well as those defined through ServiceEntries - MeshConfig_OutboundTrafficPolicy_REGISTRY_ONLY MeshConfig_OutboundTrafficPolicy_Mode = 0 - // outbound traffic to unknown destinations will be allowed, in case - // there are no services or ServiceEntries for the destination port - MeshConfig_OutboundTrafficPolicy_ALLOW_ANY MeshConfig_OutboundTrafficPolicy_Mode = 1 -) - -var MeshConfig_OutboundTrafficPolicy_Mode_name = map[int32]string{ - 0: "REGISTRY_ONLY", - 1: "ALLOW_ANY", -} - -var MeshConfig_OutboundTrafficPolicy_Mode_value = map[string]int32{ - "REGISTRY_ONLY": 0, - "ALLOW_ANY": 1, -} - -func (x MeshConfig_OutboundTrafficPolicy_Mode) String() string { - return proto.EnumName(MeshConfig_OutboundTrafficPolicy_Mode_name, int32(x)) -} - -func (MeshConfig_OutboundTrafficPolicy_Mode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_b5c7ece76d5d5022, []int{0, 0, 0} -} - -// MeshConfig defines mesh-wide variables shared by all Envoy instances in the -// Istio service mesh. -// -// NOTE: This configuration type should be used for the low-level global -// configuration, such as component addresses and port numbers. It should not -// be used for the features of the mesh that can be scoped by service or by -// namespace. Some of the fields in the mesh config are going to be deprecated -// and replaced with several individual configuration types (for example, -// tracing configuration). -type MeshConfig struct { - // Address of the server that will be used by the proxies for policy - // check calls. By using different names for mixerCheckServer and - // mixerReportServer, it is possible to have one set of Mixer servers handle - // policy check calls while another set of Mixer servers handle telemetry - // calls. - // - // NOTE: Omitting mixerCheckServer while specifying mixerReportServer is - // equivalent to setting disablePolicyChecks to true. - MixerCheckServer string `protobuf:"bytes,1,opt,name=mixer_check_server,json=mixerCheckServer,proto3" json:"mixerCheckServer,omitempty"` - // Address of the server that will be used by the proxies for policy report - // calls. - MixerReportServer string `protobuf:"bytes,2,opt,name=mixer_report_server,json=mixerReportServer,proto3" json:"mixerReportServer,omitempty"` - // Disable policy checks by the Mixer service. Default - // is false, i.e. Mixer policy check is enabled by default. - DisablePolicyChecks bool `protobuf:"varint,3,opt,name=disable_policy_checks,json=disablePolicyChecks,proto3" json:"disablePolicyChecks,omitempty"` - // $hide_from_docs - // Disable telemetry reporting by the Mixer service for HTTP traffic. - // Default is false (telemetry reporting via Mixer is enabled). - // This option provides a transition path for Istio extensibility v2. - DisableMixerHttpReports bool `protobuf:"varint,48,opt,name=disable_mixer_http_reports,json=disableMixerHttpReports,proto3" json:"disableMixerHttpReports,omitempty"` - // Allow all traffic in cases when the Mixer policy service cannot be reached. - // Default is false which means the traffic is denied when the client is unable - // to connect to Mixer. - PolicyCheckFailOpen bool `protobuf:"varint,25,opt,name=policy_check_fail_open,json=policyCheckFailOpen,proto3" json:"policyCheckFailOpen,omitempty"` - // Enable session affinity for Envoy Mixer reports so that calls from a proxy will - // always target the same Mixer instance. - SidecarToTelemetrySessionAffinity bool `protobuf:"varint,30,opt,name=sidecar_to_telemetry_session_affinity,json=sidecarToTelemetrySessionAffinity,proto3" json:"sidecarToTelemetrySessionAffinity,omitempty"` - // Port on which Envoy should listen for incoming connections from - // other services. - ProxyListenPort int32 `protobuf:"varint,4,opt,name=proxy_listen_port,json=proxyListenPort,proto3" json:"proxyListenPort,omitempty"` - // Port on which Envoy should listen for HTTP PROXY requests if set. - ProxyHttpPort int32 `protobuf:"varint,5,opt,name=proxy_http_port,json=proxyHttpPort,proto3" json:"proxyHttpPort,omitempty"` - // Connection timeout used by Envoy. (MUST BE >=1ms) - ConnectTimeout *types.Duration `protobuf:"bytes,6,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connectTimeout,omitempty"` - // Automatic protocol detection uses a set of heuristics to - // determine whether the connection is using TLS or not (on the - // server side), as well as the application protocol being used - // (e.g., http vs tcp). These heuristics rely on the client sending - // the first bits of data. For server first protocols like MySQL, - // MongoDB, etc., Envoy will timeout on the protocol detection after - // the specified period, defaulting to non mTLS plain TCP - // traffic. Set this field to tweak the period that Envoy will wait - // for the client to send the first bits of data. (MUST BE >=1ms or - // 0s to disable) - ProtocolDetectionTimeout *types.Duration `protobuf:"bytes,42,opt,name=protocol_detection_timeout,json=protocolDetectionTimeout,proto3" json:"protocolDetectionTimeout,omitempty"` - // If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. - TcpKeepalive *v1alpha3.ConnectionPoolSettings_TCPSettings_TcpKeepalive `protobuf:"bytes,28,opt,name=tcp_keepalive,json=tcpKeepalive,proto3" json:"tcpKeepalive,omitempty"` - // Class of ingress resources to be processed by Istio ingress - // controller. This corresponds to the value of - // "kubernetes.io/ingress.class" annotation. - IngressClass string `protobuf:"bytes,7,opt,name=ingress_class,json=ingressClass,proto3" json:"ingressClass,omitempty"` - // Name of theKubernetes service used for the istio ingress controller. - IngressService string `protobuf:"bytes,8,opt,name=ingress_service,json=ingressService,proto3" json:"ingressService,omitempty"` - // Defines whether to use Istio ingress controller for annotated or all ingress resources. - IngressControllerMode MeshConfig_IngressControllerMode `protobuf:"varint,9,opt,name=ingress_controller_mode,json=ingressControllerMode,proto3,enum=istio.mesh.v1alpha1.MeshConfig_IngressControllerMode" json:"ingressControllerMode,omitempty"` - // $hide_from_docs - AuthPolicy MeshConfig_AuthPolicy `protobuf:"varint,10,opt,name=auth_policy,json=authPolicy,proto3,enum=istio.mesh.v1alpha1.MeshConfig_AuthPolicy" json:"authPolicy,omitempty"` // Deprecated: Do not use. - // $hide_from_docs - RdsRefreshDelay *types.Duration `protobuf:"bytes,11,opt,name=rds_refresh_delay,json=rdsRefreshDelay,proto3" json:"rdsRefreshDelay,omitempty"` // Deprecated: Do not use. - // Flag to control generation of trace spans and request IDs. - // Requires a trace span collector defined in the proxy configuration. - EnableTracing bool `protobuf:"varint,12,opt,name=enable_tracing,json=enableTracing,proto3" json:"enableTracing,omitempty"` - // File address for the proxy access log (e.g. /dev/stdout). - // Empty value disables access logging. - AccessLogFile string `protobuf:"bytes,13,opt,name=access_log_file,json=accessLogFile,proto3" json:"accessLogFile,omitempty"` - // Format for the proxy access log - // Empty value results in proxy's default access log format - AccessLogFormat string `protobuf:"bytes,24,opt,name=access_log_format,json=accessLogFormat,proto3" json:"accessLogFormat,omitempty"` - // Encoding for the proxy access log (text or json). - // Default value is text. - AccessLogEncoding MeshConfig_AccessLogEncoding `protobuf:"varint,27,opt,name=access_log_encoding,json=accessLogEncoding,proto3,enum=istio.mesh.v1alpha1.MeshConfig_AccessLogEncoding" json:"accessLogEncoding,omitempty"` - // This flag enables Envoy's gRPC Access Log Service. - // See [Access Log Service](https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/accesslog/v2/als.proto) - // for details about Envoy's gRPC Access Log Service API. - EnableEnvoyAccessLogService bool `protobuf:"varint,40,opt,name=enable_envoy_access_log_service,json=enableEnvoyAccessLogService,proto3" json:"enableEnvoyAccessLogService,omitempty"` - // Default proxy config used by the proxy injection mechanism operating in the mesh - // (e.g. Kubernetes admission controller) - // In case of Kubernetes, the proxy config is applied once during the injection process, - // and remain constant for the duration of the pod. The rest of the mesh config can be changed - // at runtime and config gets distributed dynamically. - DefaultConfig *ProxyConfig `protobuf:"bytes,14,opt,name=default_config,json=defaultConfig,proto3" json:"defaultConfig,omitempty"` - // $hide_from_docs - MixerAddress string `protobuf:"bytes,16,opt,name=mixer_address,json=mixerAddress,proto3" json:"mixerAddress,omitempty"` // Deprecated: Do not use. - // Set the default behavior of the sidecar for handling outbound traffic - // from the application. If your application uses one or more external - // services that are not known apriori, setting the policy to ALLOW_ANY - // will cause the sidecars to route any unknown traffic originating from - // the application to its requested destination. Users are strongly - // encouraged to use ServiceEntries to explicitly declare any external - // dependencies, instead of using allow_any, so that traffic to these - // services can be monitored. - OutboundTrafficPolicy *MeshConfig_OutboundTrafficPolicy `protobuf:"bytes,17,opt,name=outbound_traffic_policy,json=outboundTrafficPolicy,proto3" json:"outboundTrafficPolicy,omitempty"` - // Enables client side policy checks. - EnableClientSidePolicyCheck bool `protobuf:"varint,19,opt,name=enable_client_side_policy_check,json=enableClientSidePolicyCheck,proto3" json:"enableClientSidePolicyCheck,omitempty"` - // $hide_from_docs - // Unix Domain Socket through which Envoy communicates with NodeAgent SDS to get key/cert for mTLS. - // Use secret-mount files instead of SDS if set to empty. - // @deprecated - istio agent will detect and send the path to envoy. - SdsUdsPath string `protobuf:"bytes,20,opt,name=sds_uds_path,json=sdsUdsPath,proto3" json:"sdsUdsPath,omitempty"` // Deprecated: Do not use. - // $hide_from_docs - SdsRefreshDelay *types.Duration `protobuf:"bytes,21,opt,name=sds_refresh_delay,json=sdsRefreshDelay,proto3" json:"sdsRefreshDelay,omitempty"` // Deprecated: Do not use. - // ConfigSource describes a source of configuration data for networking - // rules, and other Istio configuration artifacts. Multiple data sources - // can be configured for a single control plane. - ConfigSources []*ConfigSource `protobuf:"bytes,22,rep,name=config_sources,json=configSources,proto3" json:"configSources,omitempty"` - // This flag is used to enable mutual TLS automatically for service to service communication - // within the mesh, default false. - // If set to true, and a given service does not have a corresponding DestinationRule configured, - // or its DestinationRule does not have TLSSettings specified, Istio configures client side - // TLS configuration appropriately. More specifically, - // If the upstream authentication policy is in STRICT mode, use Istio provisioned certificate - // for mutual TLS to connect to upstream. - // If upstream service is in plain text mode, use plain text. - // If the upstream authentication policy is in PERMISSIVE mode, Istio configures clients to use - // mutual TLS when server sides are capable of accepting mutual TLS traffic. - // If service DestinationRule exists and has TLSSettings specified, that is always used instead. - EnableAutoMtls *types.BoolValue `protobuf:"bytes,43,opt,name=enable_auto_mtls,json=enableAutoMtls,proto3" json:"enableAutoMtls,omitempty"` - // $hide_from_docs - // This flag is used by secret discovery service(SDS). - // If set to true ([prerequisite](https://kubernetes.io/docs/concepts/storage/volumes/#projected)), Istio will inject volumes mount - // for Kubernetes service account trustworthy JWT(which is available with Kubernetes 1.12 or higher), so that the Kubernetes API server - // mounts Kubernetes service account trustworthy JWT to the Envoy container, which will be used to request key/cert eventually. - // This isn't supported for non-Kubernetes cases. - EnableSdsTokenMount bool `protobuf:"varint,23,opt,name=enable_sds_token_mount,json=enableSdsTokenMount,proto3" json:"enableSdsTokenMount,omitempty"` - // $hide_from_docs - // This flag is used by secret discovery service(SDS). - // If set to true, Envoy will fetch a normal Kubernetes service account JWT from '/var/run/secrets/kubernetes.io/serviceaccount/token' - // (https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod) - // and pass to sds server, which will be used to request key/cert eventually. - // If both enable_sds_token_mount and sds_use_k8s_sa_jwt are set to true, enable_sds_token_mount(trustworthy jwt) takes precedence. - // This isn't supported for non-k8s case. - SdsUseK8SSaJwt bool `protobuf:"varint,29,opt,name=sds_use_k8s_sa_jwt,json=sdsUseK8sSaJwt,proto3" json:"sdsUseK8sSaJwt,omitempty"` - // The trust domain corresponds to the trust root of a system. - // Refer to [SPIFFE-ID](https://github.com/spiffe/spiffe/blob/master/standards/SPIFFE-ID.md#21-trust-domain) - TrustDomain string `protobuf:"bytes,26,opt,name=trust_domain,json=trustDomain,proto3" json:"trustDomain,omitempty"` - // The trust domain aliases represent the aliases of `trust_domain`. - // For example, if we have - // ```yaml - // trustDomain: td1 - // trustDomainAliases: ["td2", "td3"] - // ``` - // Any service with the identity `td1/ns/foo/sa/a-service-account`, `td2/ns/foo/sa/a-service-account`, - // or `td3/ns/foo/sa/a-service-account` will be treated the same in the Istio mesh. - TrustDomainAliases []string `protobuf:"bytes,46,rep,name=trust_domain_aliases,json=trustDomainAliases,proto3" json:"trustDomainAliases,omitempty"` - // The default value for the ServiceEntry.export_to field and services - // imported through container registry integrations, e.g. this applies to - // Kubernetes Service resources. The value is a list of namespace names and - // reserved namespace aliases. The allowed namespace aliases are: - // - // * - All Namespaces - // . - Current Namespace - // ~ - No Namespace - // - // If not set the system will use "*" as the default value which implies that - // services are exported to all namespaces. - // - // 'All namespaces' is a reasonable default for implementations that don't - // need to restrict access or visibility of services across namespace - // boundaries. If that requirement is present it is generally good practice to - // make the default 'Current namespace' so that services are only visible - // within their own namespaces by default. Operators can then expand the - // visibility of services to other namespaces as needed. Use of 'No Namespace' - // is expected to be rare but can have utility for deployments where - // dependency management needs to be precise even within the scope of a single - // namespace. - // - // For further discussion see the reference documentation for ServiceEntry, - // Sidecar, and Gateway. - DefaultServiceExportTo []string `protobuf:"bytes,31,rep,name=default_service_export_to,json=defaultServiceExportTo,proto3" json:"defaultServiceExportTo,omitempty"` - // The default value for the VirtualService.export_to field. Has the same - // syntax as 'default_service_export_to'. - // - // If not set the system will use "*" as the default value which implies that - // virtual services are exported to all namespaces - DefaultVirtualServiceExportTo []string `protobuf:"bytes,32,rep,name=default_virtual_service_export_to,json=defaultVirtualServiceExportTo,proto3" json:"defaultVirtualServiceExportTo,omitempty"` - // The default value for the DestinationRule.export_to field. Has the same - // syntax as 'default_service_export_to'. - // - // If not set the system will use "*" as the default value which implies that - // destination rules are exported to all namespaces - DefaultDestinationRuleExportTo []string `protobuf:"bytes,33,rep,name=default_destination_rule_export_to,json=defaultDestinationRuleExportTo,proto3" json:"defaultDestinationRuleExportTo,omitempty"` - // The namespace to treat as the administrative root namespace for - // Istio configuration. When processing a leaf namespace Istio will search for - // declarations in that namespace first and if none are found it will - // search in the root namespace. Any matching declaration found in the root - // namespace is processed as if it were declared in the leaf namespace. - // - // The precise semantics of this processing are documented on each resource - // type. - RootNamespace string `protobuf:"bytes,34,opt,name=root_namespace,json=rootNamespace,proto3" json:"rootNamespace,omitempty"` - // Locality based load balancing distribution or failover settings. - LocalityLbSetting *v1alpha3.LocalityLoadBalancerSetting `protobuf:"bytes,35,opt,name=locality_lb_setting,json=localityLbSetting,proto3" json:"localityLbSetting,omitempty"` - // Configures DNS refresh rate for Envoy clusters of type STRICT_DNS - DnsRefreshRate *types.Duration `protobuf:"bytes,36,opt,name=dns_refresh_rate,json=dnsRefreshRate,proto3" json:"dnsRefreshRate,omitempty"` - // The flag to disable report batch. - DisableReportBatch bool `protobuf:"varint,37,opt,name=disable_report_batch,json=disableReportBatch,proto3" json:"disableReportBatch,omitempty"` - // When disable_report_batch is false, this value specifies the maximum number - // of requests that are batched in report. If left unspecified, the default value - // of report_batch_max_entries == 0 will use the hardcoded defaults of - // istio::mixerclient::ReportOptions. - ReportBatchMaxEntries uint32 `protobuf:"varint,38,opt,name=report_batch_max_entries,json=reportBatchMaxEntries,proto3" json:"reportBatchMaxEntries,omitempty"` - // When disable_report_batch is false, this value specifies the maximum elapsed - // time a batched report will be sent after a user request is processed. If left - // unspecified, the default report_batch_max_time == 0 will use the hardcoded - // defaults of istio::mixerclient::ReportOptions. - ReportBatchMaxTime *types.Duration `protobuf:"bytes,39,opt,name=report_batch_max_time,json=reportBatchMaxTime,proto3" json:"reportBatchMaxTime,omitempty"` - // Specify if http1.1 connections should be upgraded to http2 by default. - // if sidecar is installed on all pods in the mesh, then this should be set to UPGRADE. - // If one or more services or namespaces do not have sidecar(s), then this should be set to DO_NOT_UPGRADE. - // It can be enabled by destination using the destinationRule.trafficPolicy.connectionPool.http.h2UpgradePolicy override. - H2UpgradePolicy MeshConfig_H2UpgradePolicy `protobuf:"varint,41,opt,name=h2_upgrade_policy,json=h2UpgradePolicy,proto3,enum=istio.mesh.v1alpha1.MeshConfig_H2UpgradePolicy" json:"h2UpgradePolicy,omitempty"` - // Name to be used while emitting statistics for inbound clusters. - // By default, Istio emits statistics with the pattern `inbound|||`. - // For example `inbound|7443|grpc-reviews|reviews.prod.svc.cluster.local`. This can be used to override that pattern. - // - // A Pattern can be composed of various pre-defined variables. The following variables are supported. - // - // - `%SERVICE%` - Will be substituted with name of the service. - // - `%SERVICE_FQDN%` - Will be substituted with FQDN of the service. - // - `%SERVICE_PORT%` - Will be substituted with port of the service. - // - `%SERVICE_PORT_NAME%` - Will be substituted with port name of the service. - // - // Following are some examples of supported patterns for reviews: - // - // - `%SERVICE_FQDN%_%SERVICE_PORT%` will use reviews.prod.svc.cluster.local_7443 as the stats name. - // - `%SERVICE%` will use reviews.prod as the stats name. - InboundClusterStatName string `protobuf:"bytes,44,opt,name=inbound_cluster_stat_name,json=inboundClusterStatName,proto3" json:"inboundClusterStatName,omitempty"` - // Name to be used while emitting statistics for outbound clusters. - // By default, Istio emits statistics with the pattern `outbound|||`. - // For example `outbound|8080|v2|reviews.prod.svc.cluster.local`. This can be used to override that pattern. - // - // A Pattern can be composed of various pre-defined variables. The following variables are supported. - // - // - `%SERVICE%` - Will be substituted with name of the service. - // - `%SERVICE_FQDN%` - Will be substituted with FQDN of the service. - // - `%SERVICE_PORT%` - Will be substituted with port of the service. - // - `%SERVICE_PORT_NAME%` - Will be substituted with port name of the service. - // - `%SUBSET_NAME%` - Will be substituted with subset. - // - // Following are some examples of supported patterns for reviews: - // - // - `%SERVICE_FQDN%_%SERVICE_PORT%` will use reviews.prod.svc.cluster.local_7443 as the stats name. - // - `%SERVICE%` will use reviews.prod as the stats name. - OutboundClusterStatName string `protobuf:"bytes,45,opt,name=outbound_cluster_stat_name,json=outboundClusterStatName,proto3" json:"outboundClusterStatName,omitempty"` - // Configure the provision of certificates. - Certificates []*Certificate `protobuf:"bytes,47,rep,name=certificates,proto3" json:"certificates,omitempty"` - // Set configuration for Thrift protocol - ThriftConfig *MeshConfig_ThriftConfig `protobuf:"bytes,49,opt,name=thrift_config,json=thriftConfig,proto3" json:"thriftConfig,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MeshConfig) Reset() { *m = MeshConfig{} } -func (m *MeshConfig) String() string { return proto.CompactTextString(m) } -func (*MeshConfig) ProtoMessage() {} -func (*MeshConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_b5c7ece76d5d5022, []int{0} -} -func (m *MeshConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MeshConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MeshConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MeshConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_MeshConfig.Merge(m, src) -} -func (m *MeshConfig) XXX_Size() int { - return m.Size() -} -func (m *MeshConfig) XXX_DiscardUnknown() { - xxx_messageInfo_MeshConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_MeshConfig proto.InternalMessageInfo - -func (m *MeshConfig) GetMixerCheckServer() string { - if m != nil { - return m.MixerCheckServer - } - return "" -} - -func (m *MeshConfig) GetMixerReportServer() string { - if m != nil { - return m.MixerReportServer - } - return "" -} - -func (m *MeshConfig) GetDisablePolicyChecks() bool { - if m != nil { - return m.DisablePolicyChecks - } - return false -} - -func (m *MeshConfig) GetDisableMixerHttpReports() bool { - if m != nil { - return m.DisableMixerHttpReports - } - return false -} - -func (m *MeshConfig) GetPolicyCheckFailOpen() bool { - if m != nil { - return m.PolicyCheckFailOpen - } - return false -} - -func (m *MeshConfig) GetSidecarToTelemetrySessionAffinity() bool { - if m != nil { - return m.SidecarToTelemetrySessionAffinity - } - return false -} - -func (m *MeshConfig) GetProxyListenPort() int32 { - if m != nil { - return m.ProxyListenPort - } - return 0 -} - -func (m *MeshConfig) GetProxyHttpPort() int32 { - if m != nil { - return m.ProxyHttpPort - } - return 0 -} - -func (m *MeshConfig) GetConnectTimeout() *types.Duration { - if m != nil { - return m.ConnectTimeout - } - return nil -} - -func (m *MeshConfig) GetProtocolDetectionTimeout() *types.Duration { - if m != nil { - return m.ProtocolDetectionTimeout - } - return nil -} - -func (m *MeshConfig) GetTcpKeepalive() *v1alpha3.ConnectionPoolSettings_TCPSettings_TcpKeepalive { - if m != nil { - return m.TcpKeepalive - } - return nil -} - -func (m *MeshConfig) GetIngressClass() string { - if m != nil { - return m.IngressClass - } - return "" -} - -func (m *MeshConfig) GetIngressService() string { - if m != nil { - return m.IngressService - } - return "" -} - -func (m *MeshConfig) GetIngressControllerMode() MeshConfig_IngressControllerMode { - if m != nil { - return m.IngressControllerMode - } - return MeshConfig_OFF -} - -// Deprecated: Do not use. -func (m *MeshConfig) GetAuthPolicy() MeshConfig_AuthPolicy { - if m != nil { - return m.AuthPolicy - } - return MeshConfig_NONE -} - -// Deprecated: Do not use. -func (m *MeshConfig) GetRdsRefreshDelay() *types.Duration { - if m != nil { - return m.RdsRefreshDelay - } - return nil -} - -func (m *MeshConfig) GetEnableTracing() bool { - if m != nil { - return m.EnableTracing - } - return false -} - -func (m *MeshConfig) GetAccessLogFile() string { - if m != nil { - return m.AccessLogFile - } - return "" -} - -func (m *MeshConfig) GetAccessLogFormat() string { - if m != nil { - return m.AccessLogFormat - } - return "" -} - -func (m *MeshConfig) GetAccessLogEncoding() MeshConfig_AccessLogEncoding { - if m != nil { - return m.AccessLogEncoding - } - return MeshConfig_TEXT -} - -func (m *MeshConfig) GetEnableEnvoyAccessLogService() bool { - if m != nil { - return m.EnableEnvoyAccessLogService - } - return false -} - -func (m *MeshConfig) GetDefaultConfig() *ProxyConfig { - if m != nil { - return m.DefaultConfig - } - return nil -} - -// Deprecated: Do not use. -func (m *MeshConfig) GetMixerAddress() string { - if m != nil { - return m.MixerAddress - } - return "" -} - -func (m *MeshConfig) GetOutboundTrafficPolicy() *MeshConfig_OutboundTrafficPolicy { - if m != nil { - return m.OutboundTrafficPolicy - } - return nil -} - -func (m *MeshConfig) GetEnableClientSidePolicyCheck() bool { - if m != nil { - return m.EnableClientSidePolicyCheck - } - return false -} - -// Deprecated: Do not use. -func (m *MeshConfig) GetSdsUdsPath() string { - if m != nil { - return m.SdsUdsPath - } - return "" -} - -// Deprecated: Do not use. -func (m *MeshConfig) GetSdsRefreshDelay() *types.Duration { - if m != nil { - return m.SdsRefreshDelay - } - return nil -} - -func (m *MeshConfig) GetConfigSources() []*ConfigSource { - if m != nil { - return m.ConfigSources - } - return nil -} - -func (m *MeshConfig) GetEnableAutoMtls() *types.BoolValue { - if m != nil { - return m.EnableAutoMtls - } - return nil -} - -func (m *MeshConfig) GetEnableSdsTokenMount() bool { - if m != nil { - return m.EnableSdsTokenMount - } - return false -} - -func (m *MeshConfig) GetSdsUseK8SSaJwt() bool { - if m != nil { - return m.SdsUseK8SSaJwt - } - return false -} - -func (m *MeshConfig) GetTrustDomain() string { - if m != nil { - return m.TrustDomain - } - return "" -} - -func (m *MeshConfig) GetTrustDomainAliases() []string { - if m != nil { - return m.TrustDomainAliases - } - return nil -} - -func (m *MeshConfig) GetDefaultServiceExportTo() []string { - if m != nil { - return m.DefaultServiceExportTo - } - return nil -} - -func (m *MeshConfig) GetDefaultVirtualServiceExportTo() []string { - if m != nil { - return m.DefaultVirtualServiceExportTo - } - return nil -} - -func (m *MeshConfig) GetDefaultDestinationRuleExportTo() []string { - if m != nil { - return m.DefaultDestinationRuleExportTo - } - return nil -} - -func (m *MeshConfig) GetRootNamespace() string { - if m != nil { - return m.RootNamespace - } - return "" -} - -func (m *MeshConfig) GetLocalityLbSetting() *v1alpha3.LocalityLoadBalancerSetting { - if m != nil { - return m.LocalityLbSetting - } - return nil -} - -func (m *MeshConfig) GetDnsRefreshRate() *types.Duration { - if m != nil { - return m.DnsRefreshRate - } - return nil -} - -func (m *MeshConfig) GetDisableReportBatch() bool { - if m != nil { - return m.DisableReportBatch - } - return false -} - -func (m *MeshConfig) GetReportBatchMaxEntries() uint32 { - if m != nil { - return m.ReportBatchMaxEntries - } - return 0 -} - -func (m *MeshConfig) GetReportBatchMaxTime() *types.Duration { - if m != nil { - return m.ReportBatchMaxTime - } - return nil -} - -func (m *MeshConfig) GetH2UpgradePolicy() MeshConfig_H2UpgradePolicy { - if m != nil { - return m.H2UpgradePolicy - } - return MeshConfig_DO_NOT_UPGRADE -} - -func (m *MeshConfig) GetInboundClusterStatName() string { - if m != nil { - return m.InboundClusterStatName - } - return "" -} - -func (m *MeshConfig) GetOutboundClusterStatName() string { - if m != nil { - return m.OutboundClusterStatName - } - return "" -} - -func (m *MeshConfig) GetCertificates() []*Certificate { - if m != nil { - return m.Certificates - } - return nil -} - -func (m *MeshConfig) GetThriftConfig() *MeshConfig_ThriftConfig { - if m != nil { - return m.ThriftConfig - } - return nil -} - -type MeshConfig_OutboundTrafficPolicy struct { - Mode MeshConfig_OutboundTrafficPolicy_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=istio.mesh.v1alpha1.MeshConfig_OutboundTrafficPolicy_Mode" json:"mode,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MeshConfig_OutboundTrafficPolicy) Reset() { *m = MeshConfig_OutboundTrafficPolicy{} } -func (m *MeshConfig_OutboundTrafficPolicy) String() string { return proto.CompactTextString(m) } -func (*MeshConfig_OutboundTrafficPolicy) ProtoMessage() {} -func (*MeshConfig_OutboundTrafficPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_b5c7ece76d5d5022, []int{0, 0} -} -func (m *MeshConfig_OutboundTrafficPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MeshConfig_OutboundTrafficPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MeshConfig_OutboundTrafficPolicy.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MeshConfig_OutboundTrafficPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_MeshConfig_OutboundTrafficPolicy.Merge(m, src) -} -func (m *MeshConfig_OutboundTrafficPolicy) XXX_Size() int { - return m.Size() -} -func (m *MeshConfig_OutboundTrafficPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_MeshConfig_OutboundTrafficPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_MeshConfig_OutboundTrafficPolicy proto.InternalMessageInfo - -func (m *MeshConfig_OutboundTrafficPolicy) GetMode() MeshConfig_OutboundTrafficPolicy_Mode { - if m != nil { - return m.Mode - } - return MeshConfig_OutboundTrafficPolicy_REGISTRY_ONLY -} - -type MeshConfig_ThriftConfig struct { - // Specify thrift rate limit service URL. If pilot has thrift protocol support enabled, - // this will enable the rate limit service for destinations that have matching rate - // limit configurations. - RateLimitUrl string `protobuf:"bytes,1,opt,name=rate_limit_url,json=rateLimitUrl,proto3" json:"rateLimitUrl,omitempty"` - // Specify thrift rate limit service timeout, in milliseconds. Default is 50ms - RateLimitTimeout *types.Duration `protobuf:"bytes,2,opt,name=rate_limit_timeout,json=rateLimitTimeout,proto3" json:"rateLimitTimeout,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MeshConfig_ThriftConfig) Reset() { *m = MeshConfig_ThriftConfig{} } -func (m *MeshConfig_ThriftConfig) String() string { return proto.CompactTextString(m) } -func (*MeshConfig_ThriftConfig) ProtoMessage() {} -func (*MeshConfig_ThriftConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_b5c7ece76d5d5022, []int{0, 1} -} -func (m *MeshConfig_ThriftConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MeshConfig_ThriftConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MeshConfig_ThriftConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MeshConfig_ThriftConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_MeshConfig_ThriftConfig.Merge(m, src) -} -func (m *MeshConfig_ThriftConfig) XXX_Size() int { - return m.Size() -} -func (m *MeshConfig_ThriftConfig) XXX_DiscardUnknown() { - xxx_messageInfo_MeshConfig_ThriftConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_MeshConfig_ThriftConfig proto.InternalMessageInfo - -func (m *MeshConfig_ThriftConfig) GetRateLimitUrl() string { - if m != nil { - return m.RateLimitUrl - } - return "" -} - -func (m *MeshConfig_ThriftConfig) GetRateLimitTimeout() *types.Duration { - if m != nil { - return m.RateLimitTimeout - } - return nil -} - -// ConfigSource describes information about a configuration store inside a -// mesh. A single control plane instance can interact with one or more data -// sources. -type ConfigSource struct { - // Address of the server implementing the Istio Mesh Configuration - // protocol (MCP). Can be IP address or a fully qualified DNS name. - // Use fs:/// to specify a file-based backend with absolute path to the directory. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // Use the tls_settings to specify the tls mode to use. If the MCP server - // uses Istio mutual TLS and shares the root CA with Pilot, specify the TLS - // mode as ISTIO_MUTUAL. - TlsSettings *v1alpha3.TLSSettings `protobuf:"bytes,2,opt,name=tls_settings,json=tlsSettings,proto3" json:"tlsSettings,omitempty"` - // Describes the source of configuration, if nothing is specified default is MCP - SubscribedResources []Resource `protobuf:"varint,3,rep,packed,name=subscribed_resources,json=subscribedResources,proto3,enum=istio.mesh.v1alpha1.Resource" json:"subscribedResources,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ConfigSource) Reset() { *m = ConfigSource{} } -func (m *ConfigSource) String() string { return proto.CompactTextString(m) } -func (*ConfigSource) ProtoMessage() {} -func (*ConfigSource) Descriptor() ([]byte, []int) { - return fileDescriptor_b5c7ece76d5d5022, []int{1} -} -func (m *ConfigSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConfigSource.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ConfigSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigSource.Merge(m, src) -} -func (m *ConfigSource) XXX_Size() int { - return m.Size() -} -func (m *ConfigSource) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigSource proto.InternalMessageInfo - -func (m *ConfigSource) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *ConfigSource) GetTlsSettings() *v1alpha3.TLSSettings { - if m != nil { - return m.TlsSettings - } - return nil -} - -func (m *ConfigSource) GetSubscribedResources() []Resource { - if m != nil { - return m.SubscribedResources - } - return nil -} - -// Certificate configures the provision of a certificate and its key. -// Example 1: key and cert stored in a secret -// { secretName: galley-cert -// secretNamespace: istio-system -// dnsNames: -// - galley.istio-system.svc -// - galley.mydomain.com -// } -// Example 2: key and cert stored in a directory -// { dnsNames: -// - pilot.istio-system -// - pilot.istio-system.svc -// - pilot.mydomain.com -// } -type Certificate struct { - // Name of the secret the certificate and its key will be stored into. - // If it is empty, it will not be stored into a secret. - // Instead, the certificate and its key will be stored into a hard-coded directory. - SecretName string `protobuf:"bytes,1,opt,name=secret_name,json=secretName,proto3" json:"secretName,omitempty"` - // The DNS names for the certificate. A certificate may contain - // multiple DNS names. - DnsNames []string `protobuf:"bytes,2,rep,name=dns_names,json=dnsNames,proto3" json:"dnsNames,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Certificate) Reset() { *m = Certificate{} } -func (m *Certificate) String() string { return proto.CompactTextString(m) } -func (*Certificate) ProtoMessage() {} -func (*Certificate) Descriptor() ([]byte, []int) { - return fileDescriptor_b5c7ece76d5d5022, []int{2} -} -func (m *Certificate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Certificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Certificate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Certificate) XXX_Merge(src proto.Message) { - xxx_messageInfo_Certificate.Merge(m, src) -} -func (m *Certificate) XXX_Size() int { - return m.Size() -} -func (m *Certificate) XXX_DiscardUnknown() { - xxx_messageInfo_Certificate.DiscardUnknown(m) -} - -var xxx_messageInfo_Certificate proto.InternalMessageInfo - -func (m *Certificate) GetSecretName() string { - if m != nil { - return m.SecretName - } - return "" -} - -func (m *Certificate) GetDnsNames() []string { - if m != nil { - return m.DnsNames - } - return nil -} - -func init() { - proto.RegisterEnum("istio.mesh.v1alpha1.Resource", Resource_name, Resource_value) - proto.RegisterEnum("istio.mesh.v1alpha1.MeshConfig_IngressControllerMode", MeshConfig_IngressControllerMode_name, MeshConfig_IngressControllerMode_value) - proto.RegisterEnum("istio.mesh.v1alpha1.MeshConfig_AuthPolicy", MeshConfig_AuthPolicy_name, MeshConfig_AuthPolicy_value) - proto.RegisterEnum("istio.mesh.v1alpha1.MeshConfig_AccessLogEncoding", MeshConfig_AccessLogEncoding_name, MeshConfig_AccessLogEncoding_value) - proto.RegisterEnum("istio.mesh.v1alpha1.MeshConfig_H2UpgradePolicy", MeshConfig_H2UpgradePolicy_name, MeshConfig_H2UpgradePolicy_value) - proto.RegisterEnum("istio.mesh.v1alpha1.MeshConfig_OutboundTrafficPolicy_Mode", MeshConfig_OutboundTrafficPolicy_Mode_name, MeshConfig_OutboundTrafficPolicy_Mode_value) - proto.RegisterType((*MeshConfig)(nil), "istio.mesh.v1alpha1.MeshConfig") - proto.RegisterType((*MeshConfig_OutboundTrafficPolicy)(nil), "istio.mesh.v1alpha1.MeshConfig.OutboundTrafficPolicy") - proto.RegisterType((*MeshConfig_ThriftConfig)(nil), "istio.mesh.v1alpha1.MeshConfig.ThriftConfig") - proto.RegisterType((*ConfigSource)(nil), "istio.mesh.v1alpha1.ConfigSource") - proto.RegisterType((*Certificate)(nil), "istio.mesh.v1alpha1.Certificate") -} - -func init() { proto.RegisterFile("mesh/v1alpha1/config.proto", fileDescriptor_b5c7ece76d5d5022) } - -var fileDescriptor_b5c7ece76d5d5022 = []byte{ - // 1827 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x52, 0x1b, 0xcb, - 0x11, 0x46, 0xc0, 0xb1, 0x61, 0x90, 0xc4, 0x32, 0x80, 0x3d, 0xc6, 0x31, 0x16, 0x3a, 0xfe, 0x51, - 0x88, 0x23, 0x8e, 0x71, 0x25, 0x39, 0x27, 0xb9, 0x12, 0x92, 0xb0, 0xc1, 0x02, 0x91, 0x95, 0xf0, - 0x89, 0x93, 0x8b, 0xa9, 0x61, 0x77, 0x24, 0x4d, 0x58, 0xed, 0x6c, 0xcd, 0xcc, 0x62, 0xb8, 0xc8, - 0x23, 0xe5, 0x31, 0x52, 0x95, 0xcb, 0x3c, 0x42, 0xca, 0x17, 0x79, 0x8e, 0xd4, 0xfc, 0xac, 0x24, - 0x40, 0x65, 0xa5, 0x72, 0xa7, 0xed, 0xfe, 0xba, 0x7b, 0xa6, 0xe7, 0xeb, 0x1f, 0x81, 0xad, 0x21, - 0x95, 0x83, 0xbd, 0xab, 0xb7, 0x24, 0x4a, 0x06, 0xe4, 0xed, 0x5e, 0xc0, 0xe3, 0x1e, 0xeb, 0x57, - 0x13, 0xc1, 0x15, 0x87, 0xeb, 0x4c, 0x2a, 0xc6, 0xab, 0x1a, 0x51, 0xcd, 0x10, 0x5b, 0xdb, 0x7d, - 0xce, 0xfb, 0x11, 0xdd, 0x33, 0x90, 0x8b, 0xb4, 0xb7, 0x17, 0xa6, 0x82, 0x28, 0xc6, 0x63, 0x6b, - 0x74, 0x5f, 0xff, 0x45, 0x90, 0x24, 0xa1, 0x42, 0x3a, 0xfd, 0x93, 0xdb, 0x01, 0x13, 0xc1, 0xaf, - 0x6f, 0x9c, 0x6a, 0x37, 0xa6, 0xea, 0x0b, 0x17, 0x97, 0x2c, 0xee, 0x67, 0x80, 0x77, 0x7b, 0x21, - 0x95, 0x8a, 0xc5, 0x26, 0x02, 0x16, 0x69, 0x44, 0x2d, 0xb6, 0xfc, 0x9f, 0xa7, 0x00, 0x9c, 0x50, - 0x39, 0xa8, 0x9b, 0x03, 0xc3, 0x37, 0x00, 0x0e, 0xd9, 0x35, 0x15, 0x38, 0x18, 0xd0, 0xe0, 0x12, - 0x4b, 0x2a, 0xae, 0xa8, 0x40, 0xb9, 0x52, 0xae, 0xb2, 0xec, 0x7b, 0x46, 0x53, 0xd7, 0x8a, 0x8e, - 0x91, 0xc3, 0x2a, 0x58, 0xb7, 0x68, 0x41, 0x13, 0x2e, 0x54, 0x06, 0x9f, 0x37, 0xf0, 0x35, 0xa3, - 0xf2, 0x8d, 0xc6, 0xe1, 0xf7, 0xc1, 0x66, 0xc8, 0x24, 0xb9, 0x88, 0x28, 0x4e, 0x78, 0xc4, 0x82, - 0x1b, 0x1b, 0x46, 0xa2, 0x85, 0x52, 0xae, 0xb2, 0xe4, 0xaf, 0x3b, 0xe5, 0x99, 0xd1, 0x99, 0x40, - 0x12, 0xfe, 0x01, 0x6c, 0x65, 0x36, 0x36, 0xd6, 0x40, 0xa9, 0xc4, 0x05, 0x94, 0xe8, 0x07, 0x63, - 0xf8, 0xd8, 0x21, 0x4e, 0x34, 0xe0, 0x83, 0x52, 0x89, 0x8d, 0x2a, 0xe1, 0x3b, 0xf0, 0x68, 0x32, - 0x10, 0xee, 0x11, 0x16, 0x61, 0x9e, 0xd0, 0x18, 0x3d, 0xb1, 0x11, 0x93, 0x71, 0xa8, 0x43, 0xc2, - 0xa2, 0x76, 0x42, 0x63, 0x78, 0x06, 0x5e, 0x4a, 0x16, 0xd2, 0x80, 0x08, 0xac, 0x38, 0x56, 0x34, - 0xa2, 0x43, 0xaa, 0xc4, 0x0d, 0x96, 0x54, 0x4a, 0x9d, 0x3d, 0xd2, 0xeb, 0xb1, 0x98, 0xa9, 0x1b, - 0xb4, 0x6d, 0x7c, 0xec, 0x38, 0x70, 0x97, 0x77, 0x33, 0x68, 0xc7, 0x22, 0x6b, 0x0e, 0x08, 0x77, - 0xc1, 0x9a, 0x79, 0x1f, 0x1c, 0x31, 0xa9, 0x68, 0x8c, 0xf5, 0xe1, 0xd0, 0x62, 0x29, 0x57, 0xf9, - 0xce, 0x5f, 0x35, 0x8a, 0x96, 0x91, 0x9f, 0x71, 0xa1, 0xe0, 0x2b, 0x60, 0x45, 0xf6, 0x9e, 0x06, - 0xf9, 0x9d, 0x41, 0x16, 0x8c, 0x58, 0xdf, 0xce, 0xe0, 0x0e, 0xc0, 0x6a, 0xc0, 0xe3, 0x98, 0x06, - 0x0a, 0x2b, 0x36, 0xa4, 0x3c, 0x55, 0xe8, 0x41, 0x29, 0x57, 0x59, 0xd9, 0x7f, 0x52, 0xb5, 0xcc, - 0xa9, 0x66, 0xcc, 0xa9, 0x36, 0x1c, 0xb3, 0xfc, 0xa2, 0xb3, 0xe8, 0x5a, 0x03, 0xf8, 0x33, 0xd8, - 0x32, 0xa0, 0x80, 0x47, 0x38, 0xa4, 0x8a, 0x06, 0x86, 0x1d, 0x99, 0xbb, 0xdd, 0x59, 0xee, 0x50, - 0x66, 0xdc, 0xc8, 0x6c, 0x33, 0xc7, 0x1c, 0x14, 0x54, 0x90, 0xe0, 0x4b, 0x4a, 0x13, 0x12, 0xb1, - 0x2b, 0x8a, 0x7e, 0x61, 0x7c, 0x1d, 0x57, 0x6d, 0x25, 0x8c, 0xf9, 0x99, 0xd5, 0xc3, 0xbb, 0x6a, - 0xdd, 0x1e, 0x8d, 0xf1, 0xf8, 0x8c, 0xf3, 0xa8, 0x43, 0x95, 0x62, 0x71, 0x5f, 0x56, 0xbb, 0xf5, - 0xb3, 0xf1, 0xef, 0x20, 0xf9, 0x98, 0x79, 0xf4, 0xf3, 0x6a, 0xe2, 0x0b, 0x7e, 0x0f, 0x0a, 0x2c, - 0xee, 0x0b, 0x2a, 0x25, 0x0e, 0x22, 0x22, 0x25, 0x7a, 0x68, 0x38, 0x98, 0x77, 0xc2, 0xba, 0x96, - 0xc1, 0xd7, 0x60, 0x35, 0x03, 0x69, 0xa6, 0xb2, 0x80, 0xa2, 0x25, 0x03, 0x2b, 0x3a, 0x71, 0xc7, - 0x4a, 0xe1, 0x10, 0x3c, 0x1e, 0x79, 0xe3, 0xb1, 0x12, 0x3c, 0x8a, 0xa8, 0xc0, 0x43, 0x1e, 0x52, - 0xb4, 0x5c, 0xca, 0x55, 0x8a, 0xfb, 0xbf, 0xa9, 0x4e, 0x29, 0xe9, 0xea, 0xb8, 0x8e, 0xaa, 0x47, - 0x2e, 0xee, 0xc8, 0xfa, 0x84, 0x87, 0xd4, 0xdf, 0x64, 0xd3, 0xc4, 0xb0, 0x0d, 0x56, 0x48, 0xaa, - 0x06, 0xae, 0x26, 0x10, 0x30, 0x21, 0x76, 0x67, 0x85, 0xa8, 0xa5, 0x6a, 0x60, 0x2b, 0xe5, 0x60, - 0x1e, 0xe5, 0x7c, 0x40, 0x46, 0xdf, 0xf0, 0x08, 0xac, 0x89, 0x50, 0x62, 0x41, 0x7b, 0x82, 0xca, - 0x01, 0x0e, 0x69, 0x44, 0x6e, 0xd0, 0xca, 0x8c, 0xe7, 0x34, 0x5e, 0x56, 0x45, 0x28, 0x7d, 0x6b, - 0xd6, 0xd0, 0x56, 0xf0, 0x25, 0x28, 0xd2, 0xd8, 0x54, 0x9f, 0x12, 0x24, 0x60, 0x71, 0x1f, 0xe5, - 0x0d, 0xeb, 0x0b, 0x56, 0xda, 0xb5, 0x42, 0xcd, 0x5a, 0x12, 0x04, 0x3a, 0x61, 0x11, 0xef, 0xe3, - 0x1e, 0x8b, 0x28, 0x2a, 0x98, 0xd4, 0x16, 0xac, 0xb8, 0xc5, 0xfb, 0x87, 0x2c, 0xa2, 0xba, 0x12, - 0x26, 0x71, 0x5c, 0x0c, 0x89, 0x42, 0xc8, 0x20, 0x57, 0xc7, 0x48, 0x23, 0x86, 0x04, 0xac, 0x4f, - 0x60, 0x69, 0x1c, 0xf0, 0x50, 0xc7, 0x7f, 0x6a, 0xd2, 0xf3, 0x76, 0x66, 0x7a, 0x32, 0x6f, 0x4d, - 0x67, 0xe8, 0xaf, 0x91, 0xbb, 0x22, 0xd8, 0x00, 0xcf, 0xdd, 0xed, 0x68, 0x7c, 0xc5, 0x6f, 0xf0, - 0x44, 0xbc, 0x8c, 0x21, 0x15, 0x73, 0xdd, 0xa7, 0x16, 0xd6, 0xd4, 0xa8, 0x91, 0xe7, 0x8c, 0x2e, - 0xef, 0x41, 0x31, 0xa4, 0x3d, 0x92, 0x46, 0x0a, 0xdb, 0xbe, 0x8f, 0x8a, 0x26, 0xd7, 0xa5, 0xa9, - 0x67, 0x3c, 0xd3, 0x65, 0x6c, 0x0f, 0xe9, 0x17, 0x9c, 0x9d, 0xeb, 0xbe, 0xaf, 0x41, 0xc1, 0xf6, - 0x38, 0x12, 0x86, 0x9a, 0x27, 0xc8, 0xd3, 0x99, 0x31, 0x0f, 0x93, 0x37, 0x8a, 0x9a, 0x95, 0x6b, - 0x82, 0xf2, 0x54, 0x5d, 0xf0, 0x34, 0x0e, 0xf5, 0xbb, 0xf4, 0x7a, 0x2c, 0xc8, 0xd8, 0xb3, 0x66, - 0x42, 0xcf, 0x24, 0x68, 0xdb, 0x99, 0x77, 0xad, 0xb5, 0x25, 0x8e, 0xbf, 0xc9, 0xa7, 0x89, 0x27, - 0xd2, 0x14, 0x44, 0x8c, 0xc6, 0x0a, 0xeb, 0x96, 0x77, 0xab, 0x85, 0xa3, 0xf5, 0xc9, 0x34, 0xd5, - 0x0d, 0xaa, 0xc3, 0xc2, 0xc9, 0x56, 0x0e, 0x5f, 0x80, 0xbc, 0x0c, 0x25, 0x4e, 0x43, 0x89, 0x13, - 0xa2, 0x06, 0x68, 0x63, 0x74, 0x39, 0x20, 0x43, 0x79, 0x1e, 0xca, 0x33, 0xa2, 0x06, 0x9a, 0xbb, - 0xf2, 0x1e, 0x77, 0x37, 0xff, 0x27, 0xee, 0xca, 0x3b, 0xdc, 0xfd, 0x00, 0x8a, 0xf6, 0x3d, 0xb0, - 0xe4, 0xa9, 0x08, 0xa8, 0x44, 0x8f, 0x4a, 0x0b, 0x95, 0x95, 0xfd, 0x9d, 0xa9, 0xc9, 0xb1, 0x89, - 0xe9, 0x18, 0xa4, 0x5f, 0x08, 0x26, 0xbe, 0x24, 0x6c, 0x00, 0xcf, 0x25, 0x80, 0xa4, 0x8a, 0xe3, - 0xa1, 0x8a, 0x24, 0xfa, 0x95, 0x39, 0xd3, 0xd6, 0xbd, 0x33, 0x1d, 0x70, 0x1e, 0x7d, 0x22, 0x51, - 0x4a, 0x7d, 0x57, 0x39, 0xb5, 0x54, 0xf1, 0x13, 0x15, 0x99, 0x69, 0xe4, 0xbc, 0xe8, 0x1b, 0x2a, - 0x7e, 0x49, 0x63, 0x3c, 0xe4, 0x69, 0xac, 0xd0, 0x63, 0x3b, 0x8d, 0xac, 0xb6, 0x13, 0xca, 0xae, - 0xd6, 0x9d, 0x68, 0x15, 0xdc, 0x05, 0xd0, 0x64, 0x4d, 0x52, 0x7c, 0xf9, 0xa3, 0xc4, 0x92, 0xe0, - 0xbf, 0x7e, 0x51, 0xe8, 0x99, 0x31, 0x28, 0xea, 0xbc, 0x49, 0xfa, 0xf1, 0x47, 0xd9, 0x21, 0xc7, - 0x5f, 0x14, 0xdc, 0x01, 0x79, 0x25, 0x52, 0xa9, 0x70, 0xc8, 0x87, 0x84, 0xc5, 0x68, 0xcb, 0x14, - 0xd6, 0x8a, 0x91, 0x35, 0x8c, 0x08, 0xfe, 0x00, 0x36, 0x26, 0x21, 0x98, 0x44, 0x8c, 0x48, 0x2a, - 0x51, 0xb5, 0xb4, 0x50, 0x59, 0xf6, 0xe1, 0x04, 0xb4, 0x66, 0x35, 0xf0, 0x27, 0xf0, 0x24, 0x63, - 0xb7, 0xab, 0x09, 0x4c, 0xaf, 0xcd, 0xb8, 0x57, 0x1c, 0x3d, 0x37, 0x66, 0x8f, 0x1c, 0xc0, 0x15, - 0x44, 0xd3, 0xa8, 0xbb, 0x1c, 0x7e, 0x00, 0x3b, 0x99, 0xe9, 0x15, 0x13, 0x2a, 0x25, 0xd1, 0x14, - 0x17, 0x25, 0xe3, 0xe2, 0x99, 0x03, 0x7e, 0xb2, 0xb8, 0xbb, 0x9e, 0x8e, 0x41, 0x39, 0xf3, 0x74, - 0x77, 0x91, 0x99, 0x70, 0xb5, 0x63, 0x5c, 0x6d, 0x3b, 0x64, 0x63, 0x0c, 0xf4, 0xd3, 0x68, 0xec, - 0xeb, 0x25, 0x28, 0x0a, 0xce, 0x15, 0x8e, 0xc9, 0x90, 0xca, 0x84, 0x04, 0x14, 0x95, 0x6d, 0xab, - 0xd2, 0xd2, 0xd3, 0x4c, 0x08, 0x7b, 0x60, 0x3d, 0xe2, 0x01, 0x89, 0x98, 0xba, 0xc1, 0xd1, 0x05, - 0x96, 0x76, 0x0a, 0xa1, 0xef, 0xcd, 0xb3, 0xff, 0xf6, 0x1b, 0x93, 0xac, 0xe5, 0xac, 0x5a, 0x9c, - 0x84, 0x07, 0x24, 0x22, 0x71, 0x40, 0x85, 0x9b, 0x61, 0xfe, 0x5a, 0xe6, 0xb2, 0x75, 0xe1, 0x44, - 0xb0, 0x0e, 0xbc, 0x30, 0x1e, 0x13, 0x5e, 0x10, 0x45, 0xd1, 0x8b, 0x99, 0x93, 0x3c, 0x8c, 0x33, - 0xae, 0xfb, 0x44, 0x51, 0xfd, 0xac, 0xd9, 0x96, 0xe4, 0x76, 0xb1, 0x0b, 0xa2, 0x82, 0x01, 0x7a, - 0x69, 0x78, 0x02, 0x9d, 0xce, 0xae, 0x45, 0x07, 0x5a, 0x03, 0x7f, 0x07, 0xd0, 0x24, 0x12, 0x0f, - 0xc9, 0x35, 0xa6, 0xb1, 0x12, 0x8c, 0x4a, 0xf4, 0xaa, 0x94, 0xab, 0x14, 0xfc, 0x4d, 0x31, 0x86, - 0x9f, 0x90, 0xeb, 0xa6, 0x55, 0xc2, 0x16, 0xd8, 0xbc, 0x67, 0xa8, 0x57, 0x06, 0xf4, 0x7a, 0xd6, - 0xa1, 0xe1, 0x6d, 0x87, 0x7a, 0x59, 0x80, 0x7f, 0x01, 0x6b, 0x83, 0x7d, 0x9c, 0x26, 0x7d, 0x41, - 0x46, 0x2d, 0x05, 0xfd, 0xd2, 0xb4, 0xf8, 0xbd, 0x59, 0x3d, 0xec, 0xc3, 0xfe, 0xb9, 0xb5, 0x73, - 0xdd, 0x6b, 0x75, 0x70, 0x5b, 0xa0, 0xa9, 0xcb, 0x62, 0xdb, 0x25, 0x83, 0x28, 0x95, 0x8a, 0x0a, - 0x2c, 0x15, 0xb1, 0x2f, 0x8f, 0xde, 0x98, 0x47, 0x7f, 0xe4, 0x00, 0x75, 0xab, 0xef, 0x28, 0x62, - 0x28, 0xa0, 0xd7, 0xce, 0x51, 0x87, 0xbd, 0x6f, 0xfb, 0x6b, 0x63, 0x3b, 0xea, 0xc1, 0x77, 0x8d, - 0x1b, 0x20, 0x1f, 0x50, 0xa1, 0x58, 0x8f, 0x05, 0x44, 0x51, 0x89, 0xf6, 0x4c, 0xdb, 0x99, 0x3e, - 0x0e, 0xea, 0x63, 0xa0, 0x7f, 0xcb, 0x0a, 0xfe, 0x11, 0x14, 0xd4, 0x40, 0xb0, 0xde, 0x68, 0xaa, - 0xbc, 0x35, 0x09, 0x7e, 0x33, 0x2b, 0x2d, 0x5d, 0x63, 0xe4, 0x26, 0x4c, 0x5e, 0x4d, 0x7c, 0x6d, - 0xfd, 0x3d, 0x07, 0x36, 0xa7, 0x76, 0x7e, 0x78, 0x0a, 0x16, 0xcd, 0x7e, 0x93, 0x33, 0xa9, 0xff, - 0xfd, 0xff, 0x35, 0x3e, 0xaa, 0x66, 0xc9, 0x31, 0x7e, 0xca, 0x0d, 0xb0, 0x68, 0x76, 0x9b, 0x35, - 0x50, 0xf0, 0x9b, 0xef, 0x8f, 0x3a, 0x5d, 0xff, 0x33, 0x6e, 0x9f, 0xb6, 0x3e, 0x7b, 0x73, 0xb0, - 0x00, 0x96, 0x6b, 0xad, 0x56, 0xfb, 0x67, 0x5c, 0x3b, 0xfd, 0xec, 0xe5, 0xca, 0x8b, 0x4b, 0xf3, - 0xde, 0xfc, 0xee, 0xc6, 0xa7, 0x23, 0xbf, 0x7b, 0x5e, 0x6b, 0xe1, 0x4e, 0xd3, 0xff, 0x74, 0x54, - 0x6f, 0x1a, 0xf0, 0xd6, 0xdf, 0x40, 0x7e, 0xf2, 0x36, 0xf0, 0x05, 0x28, 0xea, 0xfa, 0xc0, 0x11, - 0x1b, 0x32, 0x85, 0x53, 0x11, 0xb9, 0xbf, 0x26, 0x79, 0x2d, 0x6d, 0x69, 0xe1, 0xb9, 0x88, 0xe0, - 0x7b, 0x00, 0x27, 0x50, 0xd9, 0x3a, 0x3b, 0x3f, 0x8b, 0x9e, 0xde, 0xc8, 0x89, 0x5b, 0x63, 0xcb, - 0x3f, 0x81, 0xcd, 0xa9, 0x8b, 0x1c, 0x7c, 0x08, 0x16, 0xda, 0x87, 0x87, 0xde, 0x1c, 0x5c, 0x01, - 0x0f, 0x1b, 0xcd, 0xc3, 0xda, 0x79, 0xab, 0xeb, 0xe5, 0x20, 0x00, 0x0f, 0x3a, 0x5d, 0xff, 0xa8, - 0xde, 0xf5, 0xe6, 0xcb, 0xaf, 0x00, 0x18, 0x2f, 0x68, 0x70, 0x09, 0x2c, 0x9e, 0xb6, 0x4f, 0x9b, - 0xde, 0x1c, 0x2c, 0x02, 0x70, 0x72, 0x6e, 0x2e, 0xda, 0x6d, 0x75, 0xbc, 0x5c, 0xf9, 0x35, 0x58, - 0xbb, 0xb7, 0xa9, 0x68, 0x78, 0xb7, 0xf9, 0xa7, 0xae, 0x37, 0xa7, 0x7f, 0x1d, 0x77, 0xda, 0xa7, - 0x5e, 0xae, 0xbc, 0x0f, 0x56, 0xef, 0xf0, 0x1d, 0x42, 0x50, 0x6c, 0xb4, 0xf1, 0x69, 0xbb, 0x8b, - 0xcf, 0xcf, 0xde, 0xfb, 0xb5, 0x46, 0xd3, 0x1e, 0x28, 0xfb, 0xc8, 0x1d, 0x2f, 0x2e, 0xad, 0x7a, - 0xde, 0xf1, 0xe2, 0x12, 0xf4, 0xd6, 0xcb, 0xff, 0xc8, 0x81, 0xfc, 0xe4, 0x88, 0x83, 0x08, 0x3c, - 0xcc, 0xd6, 0x0c, 0x9b, 0xc4, 0xec, 0x13, 0x1e, 0x81, 0xbc, 0x8a, 0x64, 0xd6, 0xf1, 0xa4, 0xcb, - 0xdc, 0xab, 0x6f, 0xb4, 0xbc, 0x6e, 0xab, 0x93, 0x6d, 0xe9, 0xfe, 0x8a, 0x8a, 0x64, 0xf6, 0x01, - 0xcf, 0xc0, 0x86, 0x4c, 0x2f, 0x64, 0x20, 0xd8, 0x05, 0x0d, 0xb1, 0xa0, 0xd9, 0x20, 0x5e, 0x28, - 0x2d, 0x54, 0x8a, 0xfb, 0xcf, 0xa6, 0xd2, 0xcc, 0x77, 0x28, 0x7f, 0x7d, 0x6c, 0x9a, 0xc9, 0x64, - 0xf9, 0x23, 0x58, 0x99, 0x28, 0x19, 0xf8, 0x1c, 0xac, 0x48, 0x1a, 0x08, 0xea, 0x0a, 0xd3, 0xde, - 0x04, 0x58, 0x91, 0xa9, 0xc5, 0xa7, 0x60, 0x59, 0xb7, 0x57, 0xd3, 0xec, 0xd1, 0xbc, 0x19, 0x10, - 0x4b, 0x61, 0x2c, 0x4d, 0x9f, 0xdf, 0x2d, 0x81, 0xa5, 0xcc, 0x33, 0xdc, 0x00, 0x5e, 0xc6, 0xbd, - 0x8c, 0xb1, 0xde, 0xdc, 0x41, 0xe5, 0x9f, 0x5f, 0xb7, 0x73, 0xff, 0xfa, 0xba, 0x9d, 0xfb, 0xf7, - 0xd7, 0xed, 0xdc, 0x9f, 0xb7, 0xec, 0x79, 0x19, 0xdf, 0x23, 0x09, 0xdb, 0xbb, 0xf5, 0x0f, 0xfc, - 0xe2, 0x81, 0x61, 0xd4, 0xbb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x62, 0xd4, 0xa4, 0x39, 0x0a, - 0x10, 0x00, 0x00, -} - -func (m *MeshConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MeshConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MeshConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ThriftConfig != nil { - { - size, err := m.ThriftConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0x8a - } - if m.DisableMixerHttpReports { - i-- - if m.DisableMixerHttpReports { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0x80 - } - if len(m.Certificates) > 0 { - for iNdEx := len(m.Certificates) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Certificates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xfa - } - } - if len(m.TrustDomainAliases) > 0 { - for iNdEx := len(m.TrustDomainAliases) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.TrustDomainAliases[iNdEx]) - copy(dAtA[i:], m.TrustDomainAliases[iNdEx]) - i = encodeVarintConfig(dAtA, i, uint64(len(m.TrustDomainAliases[iNdEx]))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xf2 - } - } - if len(m.OutboundClusterStatName) > 0 { - i -= len(m.OutboundClusterStatName) - copy(dAtA[i:], m.OutboundClusterStatName) - i = encodeVarintConfig(dAtA, i, uint64(len(m.OutboundClusterStatName))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xea - } - if len(m.InboundClusterStatName) > 0 { - i -= len(m.InboundClusterStatName) - copy(dAtA[i:], m.InboundClusterStatName) - i = encodeVarintConfig(dAtA, i, uint64(len(m.InboundClusterStatName))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xe2 - } - if m.EnableAutoMtls != nil { - { - size, err := m.EnableAutoMtls.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xda - } - if m.ProtocolDetectionTimeout != nil { - { - size, err := m.ProtocolDetectionTimeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xd2 - } - if m.H2UpgradePolicy != 0 { - i = encodeVarintConfig(dAtA, i, uint64(m.H2UpgradePolicy)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xc8 - } - if m.EnableEnvoyAccessLogService { - i-- - if m.EnableEnvoyAccessLogService { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xc0 - } - if m.ReportBatchMaxTime != nil { - { - size, err := m.ReportBatchMaxTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xba - } - if m.ReportBatchMaxEntries != 0 { - i = encodeVarintConfig(dAtA, i, uint64(m.ReportBatchMaxEntries)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xb0 - } - if m.DisableReportBatch { - i-- - if m.DisableReportBatch { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xa8 - } - if m.DnsRefreshRate != nil { - { - size, err := m.DnsRefreshRate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xa2 - } - if m.LocalityLbSetting != nil { - { - size, err := m.LocalityLbSetting.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x9a - } - if len(m.RootNamespace) > 0 { - i -= len(m.RootNamespace) - copy(dAtA[i:], m.RootNamespace) - i = encodeVarintConfig(dAtA, i, uint64(len(m.RootNamespace))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x92 - } - if len(m.DefaultDestinationRuleExportTo) > 0 { - for iNdEx := len(m.DefaultDestinationRuleExportTo) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DefaultDestinationRuleExportTo[iNdEx]) - copy(dAtA[i:], m.DefaultDestinationRuleExportTo[iNdEx]) - i = encodeVarintConfig(dAtA, i, uint64(len(m.DefaultDestinationRuleExportTo[iNdEx]))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x8a - } - } - if len(m.DefaultVirtualServiceExportTo) > 0 { - for iNdEx := len(m.DefaultVirtualServiceExportTo) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DefaultVirtualServiceExportTo[iNdEx]) - copy(dAtA[i:], m.DefaultVirtualServiceExportTo[iNdEx]) - i = encodeVarintConfig(dAtA, i, uint64(len(m.DefaultVirtualServiceExportTo[iNdEx]))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x82 - } - } - if len(m.DefaultServiceExportTo) > 0 { - for iNdEx := len(m.DefaultServiceExportTo) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DefaultServiceExportTo[iNdEx]) - copy(dAtA[i:], m.DefaultServiceExportTo[iNdEx]) - i = encodeVarintConfig(dAtA, i, uint64(len(m.DefaultServiceExportTo[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - } - if m.SidecarToTelemetrySessionAffinity { - i-- - if m.SidecarToTelemetrySessionAffinity { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf0 - } - if m.SdsUseK8SSaJwt { - i-- - if m.SdsUseK8SSaJwt { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe8 - } - if m.TcpKeepalive != nil { - { - size, err := m.TcpKeepalive.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe2 - } - if m.AccessLogEncoding != 0 { - i = encodeVarintConfig(dAtA, i, uint64(m.AccessLogEncoding)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd8 - } - if len(m.TrustDomain) > 0 { - i -= len(m.TrustDomain) - copy(dAtA[i:], m.TrustDomain) - i = encodeVarintConfig(dAtA, i, uint64(len(m.TrustDomain))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd2 - } - if m.PolicyCheckFailOpen { - i-- - if m.PolicyCheckFailOpen { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc8 - } - if len(m.AccessLogFormat) > 0 { - i -= len(m.AccessLogFormat) - copy(dAtA[i:], m.AccessLogFormat) - i = encodeVarintConfig(dAtA, i, uint64(len(m.AccessLogFormat))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - if m.EnableSdsTokenMount { - i-- - if m.EnableSdsTokenMount { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb8 - } - if len(m.ConfigSources) > 0 { - for iNdEx := len(m.ConfigSources) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ConfigSources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - } - if m.SdsRefreshDelay != nil { - { - size, err := m.SdsRefreshDelay.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - if len(m.SdsUdsPath) > 0 { - i -= len(m.SdsUdsPath) - copy(dAtA[i:], m.SdsUdsPath) - i = encodeVarintConfig(dAtA, i, uint64(len(m.SdsUdsPath))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if m.EnableClientSidePolicyCheck { - i-- - if m.EnableClientSidePolicyCheck { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if m.OutboundTrafficPolicy != nil { - { - size, err := m.OutboundTrafficPolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if len(m.MixerAddress) > 0 { - i -= len(m.MixerAddress) - copy(dAtA[i:], m.MixerAddress) - i = encodeVarintConfig(dAtA, i, uint64(len(m.MixerAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if m.DefaultConfig != nil { - { - size, err := m.DefaultConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - if len(m.AccessLogFile) > 0 { - i -= len(m.AccessLogFile) - copy(dAtA[i:], m.AccessLogFile) - i = encodeVarintConfig(dAtA, i, uint64(len(m.AccessLogFile))) - i-- - dAtA[i] = 0x6a - } - if m.EnableTracing { - i-- - if m.EnableTracing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - } - if m.RdsRefreshDelay != nil { - { - size, err := m.RdsRefreshDelay.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - if m.AuthPolicy != 0 { - i = encodeVarintConfig(dAtA, i, uint64(m.AuthPolicy)) - i-- - dAtA[i] = 0x50 - } - if m.IngressControllerMode != 0 { - i = encodeVarintConfig(dAtA, i, uint64(m.IngressControllerMode)) - i-- - dAtA[i] = 0x48 - } - if len(m.IngressService) > 0 { - i -= len(m.IngressService) - copy(dAtA[i:], m.IngressService) - i = encodeVarintConfig(dAtA, i, uint64(len(m.IngressService))) - i-- - dAtA[i] = 0x42 - } - if len(m.IngressClass) > 0 { - i -= len(m.IngressClass) - copy(dAtA[i:], m.IngressClass) - i = encodeVarintConfig(dAtA, i, uint64(len(m.IngressClass))) - i-- - dAtA[i] = 0x3a - } - if m.ConnectTimeout != nil { - { - size, err := m.ConnectTimeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.ProxyHttpPort != 0 { - i = encodeVarintConfig(dAtA, i, uint64(m.ProxyHttpPort)) - i-- - dAtA[i] = 0x28 - } - if m.ProxyListenPort != 0 { - i = encodeVarintConfig(dAtA, i, uint64(m.ProxyListenPort)) - i-- - dAtA[i] = 0x20 - } - if m.DisablePolicyChecks { - i-- - if m.DisablePolicyChecks { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.MixerReportServer) > 0 { - i -= len(m.MixerReportServer) - copy(dAtA[i:], m.MixerReportServer) - i = encodeVarintConfig(dAtA, i, uint64(len(m.MixerReportServer))) - i-- - dAtA[i] = 0x12 - } - if len(m.MixerCheckServer) > 0 { - i -= len(m.MixerCheckServer) - copy(dAtA[i:], m.MixerCheckServer) - i = encodeVarintConfig(dAtA, i, uint64(len(m.MixerCheckServer))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MeshConfig_OutboundTrafficPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MeshConfig_OutboundTrafficPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MeshConfig_OutboundTrafficPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Mode != 0 { - i = encodeVarintConfig(dAtA, i, uint64(m.Mode)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MeshConfig_ThriftConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MeshConfig_ThriftConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MeshConfig_ThriftConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.RateLimitTimeout != nil { - { - size, err := m.RateLimitTimeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.RateLimitUrl) > 0 { - i -= len(m.RateLimitUrl) - copy(dAtA[i:], m.RateLimitUrl) - i = encodeVarintConfig(dAtA, i, uint64(len(m.RateLimitUrl))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ConfigSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConfigSource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConfigSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.SubscribedResources) > 0 { - dAtA15 := make([]byte, len(m.SubscribedResources)*10) - var j14 int - for _, num := range m.SubscribedResources { - for num >= 1<<7 { - dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j14++ - } - dAtA15[j14] = uint8(num) - j14++ - } - i -= j14 - copy(dAtA[i:], dAtA15[:j14]) - i = encodeVarintConfig(dAtA, i, uint64(j14)) - i-- - dAtA[i] = 0x1a - } - if m.TlsSettings != nil { - { - size, err := m.TlsSettings.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintConfig(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Certificate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Certificate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Certificate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.DnsNames) > 0 { - for iNdEx := len(m.DnsNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DnsNames[iNdEx]) - copy(dAtA[i:], m.DnsNames[iNdEx]) - i = encodeVarintConfig(dAtA, i, uint64(len(m.DnsNames[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.SecretName) > 0 { - i -= len(m.SecretName) - copy(dAtA[i:], m.SecretName) - i = encodeVarintConfig(dAtA, i, uint64(len(m.SecretName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintConfig(dAtA []byte, offset int, v uint64) int { - offset -= sovConfig(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MeshConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.MixerCheckServer) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.MixerReportServer) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if m.DisablePolicyChecks { - n += 2 - } - if m.ProxyListenPort != 0 { - n += 1 + sovConfig(uint64(m.ProxyListenPort)) - } - if m.ProxyHttpPort != 0 { - n += 1 + sovConfig(uint64(m.ProxyHttpPort)) - } - if m.ConnectTimeout != nil { - l = m.ConnectTimeout.Size() - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.IngressClass) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.IngressService) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if m.IngressControllerMode != 0 { - n += 1 + sovConfig(uint64(m.IngressControllerMode)) - } - if m.AuthPolicy != 0 { - n += 1 + sovConfig(uint64(m.AuthPolicy)) - } - if m.RdsRefreshDelay != nil { - l = m.RdsRefreshDelay.Size() - n += 1 + l + sovConfig(uint64(l)) - } - if m.EnableTracing { - n += 2 - } - l = len(m.AccessLogFile) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if m.DefaultConfig != nil { - l = m.DefaultConfig.Size() - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.MixerAddress) - if l > 0 { - n += 2 + l + sovConfig(uint64(l)) - } - if m.OutboundTrafficPolicy != nil { - l = m.OutboundTrafficPolicy.Size() - n += 2 + l + sovConfig(uint64(l)) - } - if m.EnableClientSidePolicyCheck { - n += 3 - } - l = len(m.SdsUdsPath) - if l > 0 { - n += 2 + l + sovConfig(uint64(l)) - } - if m.SdsRefreshDelay != nil { - l = m.SdsRefreshDelay.Size() - n += 2 + l + sovConfig(uint64(l)) - } - if len(m.ConfigSources) > 0 { - for _, e := range m.ConfigSources { - l = e.Size() - n += 2 + l + sovConfig(uint64(l)) - } - } - if m.EnableSdsTokenMount { - n += 3 - } - l = len(m.AccessLogFormat) - if l > 0 { - n += 2 + l + sovConfig(uint64(l)) - } - if m.PolicyCheckFailOpen { - n += 3 - } - l = len(m.TrustDomain) - if l > 0 { - n += 2 + l + sovConfig(uint64(l)) - } - if m.AccessLogEncoding != 0 { - n += 2 + sovConfig(uint64(m.AccessLogEncoding)) - } - if m.TcpKeepalive != nil { - l = m.TcpKeepalive.Size() - n += 2 + l + sovConfig(uint64(l)) - } - if m.SdsUseK8SSaJwt { - n += 3 - } - if m.SidecarToTelemetrySessionAffinity { - n += 3 - } - if len(m.DefaultServiceExportTo) > 0 { - for _, s := range m.DefaultServiceExportTo { - l = len(s) - n += 2 + l + sovConfig(uint64(l)) - } - } - if len(m.DefaultVirtualServiceExportTo) > 0 { - for _, s := range m.DefaultVirtualServiceExportTo { - l = len(s) - n += 2 + l + sovConfig(uint64(l)) - } - } - if len(m.DefaultDestinationRuleExportTo) > 0 { - for _, s := range m.DefaultDestinationRuleExportTo { - l = len(s) - n += 2 + l + sovConfig(uint64(l)) - } - } - l = len(m.RootNamespace) - if l > 0 { - n += 2 + l + sovConfig(uint64(l)) - } - if m.LocalityLbSetting != nil { - l = m.LocalityLbSetting.Size() - n += 2 + l + sovConfig(uint64(l)) - } - if m.DnsRefreshRate != nil { - l = m.DnsRefreshRate.Size() - n += 2 + l + sovConfig(uint64(l)) - } - if m.DisableReportBatch { - n += 3 - } - if m.ReportBatchMaxEntries != 0 { - n += 2 + sovConfig(uint64(m.ReportBatchMaxEntries)) - } - if m.ReportBatchMaxTime != nil { - l = m.ReportBatchMaxTime.Size() - n += 2 + l + sovConfig(uint64(l)) - } - if m.EnableEnvoyAccessLogService { - n += 3 - } - if m.H2UpgradePolicy != 0 { - n += 2 + sovConfig(uint64(m.H2UpgradePolicy)) - } - if m.ProtocolDetectionTimeout != nil { - l = m.ProtocolDetectionTimeout.Size() - n += 2 + l + sovConfig(uint64(l)) - } - if m.EnableAutoMtls != nil { - l = m.EnableAutoMtls.Size() - n += 2 + l + sovConfig(uint64(l)) - } - l = len(m.InboundClusterStatName) - if l > 0 { - n += 2 + l + sovConfig(uint64(l)) - } - l = len(m.OutboundClusterStatName) - if l > 0 { - n += 2 + l + sovConfig(uint64(l)) - } - if len(m.TrustDomainAliases) > 0 { - for _, s := range m.TrustDomainAliases { - l = len(s) - n += 2 + l + sovConfig(uint64(l)) - } - } - if len(m.Certificates) > 0 { - for _, e := range m.Certificates { - l = e.Size() - n += 2 + l + sovConfig(uint64(l)) - } - } - if m.DisableMixerHttpReports { - n += 3 - } - if m.ThriftConfig != nil { - l = m.ThriftConfig.Size() - n += 2 + l + sovConfig(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MeshConfig_OutboundTrafficPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Mode != 0 { - n += 1 + sovConfig(uint64(m.Mode)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MeshConfig_ThriftConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RateLimitUrl) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if m.RateLimitTimeout != nil { - l = m.RateLimitTimeout.Size() - n += 1 + l + sovConfig(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ConfigSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if m.TlsSettings != nil { - l = m.TlsSettings.Size() - n += 1 + l + sovConfig(uint64(l)) - } - if len(m.SubscribedResources) > 0 { - l = 0 - for _, e := range m.SubscribedResources { - l += sovConfig(uint64(e)) - } - n += 1 + sovConfig(uint64(l)) + l - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Certificate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SecretName) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if len(m.DnsNames) > 0 { - for _, s := range m.DnsNames { - l = len(s) - n += 1 + l + sovConfig(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovConfig(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozConfig(x uint64) (n int) { - return sovConfig(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MeshConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MeshConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MeshConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MixerCheckServer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MixerCheckServer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MixerReportServer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MixerReportServer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisablePolicyChecks", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisablePolicyChecks = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyListenPort", wireType) - } - m.ProxyListenPort = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProxyListenPort |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyHttpPort", wireType) - } - m.ProxyHttpPort = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProxyHttpPort |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConnectTimeout == nil { - m.ConnectTimeout = &types.Duration{} - } - if err := m.ConnectTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IngressClass", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IngressClass = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IngressService", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IngressService = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IngressControllerMode", wireType) - } - m.IngressControllerMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IngressControllerMode |= MeshConfig_IngressControllerMode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthPolicy", wireType) - } - m.AuthPolicy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AuthPolicy |= MeshConfig_AuthPolicy(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RdsRefreshDelay", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RdsRefreshDelay == nil { - m.RdsRefreshDelay = &types.Duration{} - } - if err := m.RdsRefreshDelay.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableTracing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableTracing = bool(v != 0) - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessLogFile", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccessLogFile = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DefaultConfig == nil { - m.DefaultConfig = &ProxyConfig{} - } - if err := m.DefaultConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MixerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MixerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutboundTrafficPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OutboundTrafficPolicy == nil { - m.OutboundTrafficPolicy = &MeshConfig_OutboundTrafficPolicy{} - } - if err := m.OutboundTrafficPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableClientSidePolicyCheck", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableClientSidePolicyCheck = bool(v != 0) - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SdsUdsPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SdsUdsPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SdsRefreshDelay", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SdsRefreshDelay == nil { - m.SdsRefreshDelay = &types.Duration{} - } - if err := m.SdsRefreshDelay.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConfigSources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConfigSources = append(m.ConfigSources, &ConfigSource{}) - if err := m.ConfigSources[len(m.ConfigSources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 23: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableSdsTokenMount", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableSdsTokenMount = bool(v != 0) - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessLogFormat", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccessLogFormat = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 25: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PolicyCheckFailOpen", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PolicyCheckFailOpen = bool(v != 0) - case 26: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrustDomain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TrustDomain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 27: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessLogEncoding", wireType) - } - m.AccessLogEncoding = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AccessLogEncoding |= MeshConfig_AccessLogEncoding(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 28: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TcpKeepalive", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TcpKeepalive == nil { - m.TcpKeepalive = &v1alpha3.ConnectionPoolSettings_TCPSettings_TcpKeepalive{} - } - if err := m.TcpKeepalive.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 29: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SdsUseK8SSaJwt", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SdsUseK8SSaJwt = bool(v != 0) - case 30: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SidecarToTelemetrySessionAffinity", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SidecarToTelemetrySessionAffinity = bool(v != 0) - case 31: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultServiceExportTo", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DefaultServiceExportTo = append(m.DefaultServiceExportTo, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 32: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultVirtualServiceExportTo", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DefaultVirtualServiceExportTo = append(m.DefaultVirtualServiceExportTo, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 33: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultDestinationRuleExportTo", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DefaultDestinationRuleExportTo = append(m.DefaultDestinationRuleExportTo, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootNamespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RootNamespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalityLbSetting", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LocalityLbSetting == nil { - m.LocalityLbSetting = &v1alpha3.LocalityLoadBalancerSetting{} - } - if err := m.LocalityLbSetting.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DnsRefreshRate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DnsRefreshRate == nil { - m.DnsRefreshRate = &types.Duration{} - } - if err := m.DnsRefreshRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 37: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisableReportBatch", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisableReportBatch = bool(v != 0) - case 38: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReportBatchMaxEntries", wireType) - } - m.ReportBatchMaxEntries = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ReportBatchMaxEntries |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 39: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReportBatchMaxTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ReportBatchMaxTime == nil { - m.ReportBatchMaxTime = &types.Duration{} - } - if err := m.ReportBatchMaxTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 40: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableEnvoyAccessLogService", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableEnvoyAccessLogService = bool(v != 0) - case 41: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field H2UpgradePolicy", wireType) - } - m.H2UpgradePolicy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.H2UpgradePolicy |= MeshConfig_H2UpgradePolicy(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 42: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProtocolDetectionTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ProtocolDetectionTimeout == nil { - m.ProtocolDetectionTimeout = &types.Duration{} - } - if err := m.ProtocolDetectionTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 43: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableAutoMtls", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EnableAutoMtls == nil { - m.EnableAutoMtls = &types.BoolValue{} - } - if err := m.EnableAutoMtls.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 44: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InboundClusterStatName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InboundClusterStatName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 45: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutboundClusterStatName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutboundClusterStatName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 46: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrustDomainAliases", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TrustDomainAliases = append(m.TrustDomainAliases, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 47: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Certificates", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Certificates = append(m.Certificates, &Certificate{}) - if err := m.Certificates[len(m.Certificates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 48: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisableMixerHttpReports", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisableMixerHttpReports = bool(v != 0) - case 49: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ThriftConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ThriftConfig == nil { - m.ThriftConfig = &MeshConfig_ThriftConfig{} - } - if err := m.ThriftConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthConfig - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthConfig - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MeshConfig_OutboundTrafficPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OutboundTrafficPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OutboundTrafficPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - m.Mode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Mode |= MeshConfig_OutboundTrafficPolicy_Mode(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthConfig - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthConfig - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MeshConfig_ThriftConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ThriftConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ThriftConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RateLimitUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RateLimitUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RateLimitTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RateLimitTimeout == nil { - m.RateLimitTimeout = &types.Duration{} - } - if err := m.RateLimitTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthConfig - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthConfig - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConfigSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConfigSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TlsSettings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TlsSettings == nil { - m.TlsSettings = &v1alpha3.TLSSettings{} - } - if err := m.TlsSettings.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType == 0 { - var v Resource - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= Resource(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SubscribedResources = append(m.SubscribedResources, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.SubscribedResources) == 0 { - m.SubscribedResources = make([]Resource, 0, elementCount) - } - for iNdEx < postIndex { - var v Resource - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= Resource(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SubscribedResources = append(m.SubscribedResources, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field SubscribedResources", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthConfig - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthConfig - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Certificate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Certificate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Certificate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SecretName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DnsNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DnsNames = append(m.DnsNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthConfig - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthConfig - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipConfig(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConfig - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConfig - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConfig - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthConfig - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthConfig - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConfig - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipConfig(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthConfig - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow") -) diff --git a/pkg/inject/api/mesh/v1alpha1/network.pb.go b/pkg/inject/api/mesh/v1alpha1/network.pb.go deleted file mode 100644 index 6ac9e97e..00000000 --- a/pkg/inject/api/mesh/v1alpha1/network.pb.go +++ /dev/null @@ -1,1506 +0,0 @@ -//// Code generated by protoc-gen-gogo. DO NOT EDIT. -//// source: mesh/v1alpha1/network.proto -// -package v1alpha1 -// -//import ( -// fmt "fmt" -// proto "github.com/gogo/protobuf/proto" -// io "io" -// _ "github.com/polarismesh/polaris-controller/pkg/inject/gogo-genproto/googleapis/google/api" -// math "math" -// math_bits "math/bits" -//) -// -//// Reference imports to suppress errors if they are not otherwise used. -//var _ = proto.Marshal -//var _ = fmt.Errorf -//var _ = math.Inf -// -//// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// -//// Network provides information about the endpoints in a routable L3 -//// network. A single routable L3 network can have one or more service -//// registries. Note that the network has no relation to the locality of the -//// endpoint. The endpoint locality will be obtained from the service -//// registry. -//type Network struct { -// // The list of endpoints in the network (obtained through the -// // constituent service registries or from CIDR ranges). All endpoints in -// // the network are directly accessible to one another. -// Endpoints []*Network_NetworkEndpoints `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"` -// // Set of gateways associated with the network. -// Gateways []*Network_IstioNetworkGateway `protobuf:"bytes,3,rep,name=gateways,proto3" json:"gateways,omitempty"` -// XXX_NoUnkeyedLiteral struct{} `json:"-"` -// XXX_unrecognized []byte `json:"-"` -// XXX_sizecache int32 `json:"-"` -//} -// -//func (m *Network) Reset() { *m = Network{} } -//func (m *Network) String() string { return proto.CompactTextString(m) } -//func (*Network) ProtoMessage() {} -//func (*Network) Descriptor() ([]byte, []int) { -// return fileDescriptor_a15df2a96e10cd86, []int{0} -//} -//func (m *Network) XXX_Unmarshal(b []byte) error { -// return m.Unmarshal(b) -//} -//func (m *Network) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { -// if deterministic { -// return xxx_messageInfo_Network.Marshal(b, m, deterministic) -// } else { -// b = b[:cap(b)] -// n, err := m.MarshalToSizedBuffer(b) -// if err != nil { -// return nil, err -// } -// return b[:n], nil -// } -//} -//func (m *Network) XXX_Merge(src proto.Message) { -// xxx_messageInfo_Network.Merge(m, src) -//} -//func (m *Network) XXX_Size() int { -// return m.Size() -//} -//func (m *Network) XXX_DiscardUnknown() { -// xxx_messageInfo_Network.DiscardUnknown(m) -//} -// -//var xxx_messageInfo_Network proto.InternalMessageInfo -// -//func (m *Network) GetEndpoints() []*Network_NetworkEndpoints { -// if m != nil { -// return m.Endpoints -// } -// return nil -//} -// -//func (m *Network) GetGateways() []*Network_IstioNetworkGateway { -// if m != nil { -// return m.Gateways -// } -// return nil -//} -// -//// NetworkEndpoints describes how the network associated with an endpoint -//// should be inferred. An endpoint will be assigned to a network based on -//// the following rules: -//// -//// 1. Implicitly: If the registry explicitly provides information about -//// the network to which the endpoint belongs to. In some cases, its -//// possible to indicate the network associated with the endpoint by -//// adding the `ISTIO_META_NETWORK` environment variable to the sidecar. -//// -//// 2. Explicitly: -//// -//// a. By matching the registry name with one of the "fromRegistry" -//// in the mesh config. A "from_registry" can only be assigned to a -//// single network. -//// -//// b. By matching the IP against one of the CIDR ranges in a mesh -//// config network. The CIDR ranges must not overlap and be assigned to -//// a single network. -//// -//// (2) will override (1) if both are present. -//type Network_NetworkEndpoints struct { -// // Types that are valid to be assigned to Ne: -// // *Network_NetworkEndpoints_FromCidr -// // *Network_NetworkEndpoints_FromRegistry -// Ne isNetwork_NetworkEndpoints_Ne `protobuf_oneof:"ne"` -// XXX_NoUnkeyedLiteral struct{} `json:"-"` -// XXX_unrecognized []byte `json:"-"` -// XXX_sizecache int32 `json:"-"` -//} -// -//func (m *Network_NetworkEndpoints) Reset() { *m = Network_NetworkEndpoints{} } -//func (m *Network_NetworkEndpoints) String() string { return proto.CompactTextString(m) } -//func (*Network_NetworkEndpoints) ProtoMessage() {} -//func (*Network_NetworkEndpoints) Descriptor() ([]byte, []int) { -// return fileDescriptor_a15df2a96e10cd86, []int{0, 0} -//} -//func (m *Network_NetworkEndpoints) XXX_Unmarshal(b []byte) error { -// return m.Unmarshal(b) -//} -//func (m *Network_NetworkEndpoints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { -// if deterministic { -// return xxx_messageInfo_Network_NetworkEndpoints.Marshal(b, m, deterministic) -// } else { -// b = b[:cap(b)] -// n, err := m.MarshalToSizedBuffer(b) -// if err != nil { -// return nil, err -// } -// return b[:n], nil -// } -//} -//func (m *Network_NetworkEndpoints) XXX_Merge(src proto.Message) { -// xxx_messageInfo_Network_NetworkEndpoints.Merge(m, src) -//} -//func (m *Network_NetworkEndpoints) XXX_Size() int { -// return m.Size() -//} -//func (m *Network_NetworkEndpoints) XXX_DiscardUnknown() { -// xxx_messageInfo_Network_NetworkEndpoints.DiscardUnknown(m) -//} -// -//var xxx_messageInfo_Network_NetworkEndpoints proto.InternalMessageInfo -// -//type isNetwork_NetworkEndpoints_Ne interface { -// isNetwork_NetworkEndpoints_Ne() -// MarshalTo([]byte) (int, error) -// Size() int -//} -// -//type Network_NetworkEndpoints_FromCidr struct { -// FromCidr string `protobuf:"bytes,1,opt,name=from_cidr,json=fromCidr,proto3,oneof"` -//} -//type Network_NetworkEndpoints_FromRegistry struct { -// FromRegistry string `protobuf:"bytes,2,opt,name=from_registry,json=fromRegistry,proto3,oneof"` -//} -// -//func (*Network_NetworkEndpoints_FromCidr) isNetwork_NetworkEndpoints_Ne() {} -//func (*Network_NetworkEndpoints_FromRegistry) isNetwork_NetworkEndpoints_Ne() {} -// -//func (m *Network_NetworkEndpoints) GetNe() isNetwork_NetworkEndpoints_Ne { -// if m != nil { -// return m.Ne -// } -// return nil -//} -// -//func (m *Network_NetworkEndpoints) GetFromCidr() string { -// if x, ok := m.GetNe().(*Network_NetworkEndpoints_FromCidr); ok { -// return x.FromCidr -// } -// return "" -//} -// -//func (m *Network_NetworkEndpoints) GetFromRegistry() string { -// if x, ok := m.GetNe().(*Network_NetworkEndpoints_FromRegistry); ok { -// return x.FromRegistry -// } -// return "" -//} -// -//// XXX_OneofWrappers is for the internal use of the proto package. -//func (*Network_NetworkEndpoints) XXX_OneofWrappers() []interface{} { -// return []interface{}{ -// (*Network_NetworkEndpoints_FromCidr)(nil), -// (*Network_NetworkEndpoints_FromRegistry)(nil), -// } -//} -// -//// The gateway associated with this network. Traffic from remote networks -//// will arrive at the specified gateway:port. All incoming traffic must -//// use mTLS. -//type Network_IstioNetworkGateway struct { -// // Types that are valid to be assigned to Gw: -// // *Network_IstioNetworkGateway_RegistryServiceName -// // *Network_IstioNetworkGateway_Address -// Gw isNetwork_IstioNetworkGateway_Gw `protobuf_oneof:"gw"` -// // The port associated with the gateway. -// Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` -// // The locality associated with an explicitly specified gateway (i.e. ip) -// Locality string `protobuf:"bytes,4,opt,name=locality,proto3" json:"locality,omitempty"` -// XXX_NoUnkeyedLiteral struct{} `json:"-"` -// XXX_unrecognized []byte `json:"-"` -// XXX_sizecache int32 `json:"-"` -//} -// -//func (m *Network_IstioNetworkGateway) Reset() { *m = Network_IstioNetworkGateway{} } -//func (m *Network_IstioNetworkGateway) String() string { return proto.CompactTextString(m) } -//func (*Network_IstioNetworkGateway) ProtoMessage() {} -//func (*Network_IstioNetworkGateway) Descriptor() ([]byte, []int) { -// return fileDescriptor_a15df2a96e10cd86, []int{0, 1} -//} -//func (m *Network_IstioNetworkGateway) XXX_Unmarshal(b []byte) error { -// return m.Unmarshal(b) -//} -//func (m *Network_IstioNetworkGateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { -// if deterministic { -// return xxx_messageInfo_Network_IstioNetworkGateway.Marshal(b, m, deterministic) -// } else { -// b = b[:cap(b)] -// n, err := m.MarshalToSizedBuffer(b) -// if err != nil { -// return nil, err -// } -// return b[:n], nil -// } -//} -//func (m *Network_IstioNetworkGateway) XXX_Merge(src proto.Message) { -// xxx_messageInfo_Network_IstioNetworkGateway.Merge(m, src) -//} -//func (m *Network_IstioNetworkGateway) XXX_Size() int { -// return m.Size() -//} -//func (m *Network_IstioNetworkGateway) XXX_DiscardUnknown() { -// xxx_messageInfo_Network_IstioNetworkGateway.DiscardUnknown(m) -//} -// -//var xxx_messageInfo_Network_IstioNetworkGateway proto.InternalMessageInfo -// -//type isNetwork_IstioNetworkGateway_Gw interface { -// isNetwork_IstioNetworkGateway_Gw() -// MarshalTo([]byte) (int, error) -// Size() int -//} -// -//type Network_IstioNetworkGateway_RegistryServiceName struct { -// RegistryServiceName string `protobuf:"bytes,1,opt,name=registry_service_name,json=registryServiceName,proto3,oneof"` -//} -//type Network_IstioNetworkGateway_Address struct { -// Address string `protobuf:"bytes,2,opt,name=address,proto3,oneof"` -//} -// -//func (*Network_IstioNetworkGateway_RegistryServiceName) isNetwork_IstioNetworkGateway_Gw() {} -//func (*Network_IstioNetworkGateway_Address) isNetwork_IstioNetworkGateway_Gw() {} -// -//func (m *Network_IstioNetworkGateway) GetGw() isNetwork_IstioNetworkGateway_Gw { -// if m != nil { -// return m.Gw -// } -// return nil -//} -// -//func (m *Network_IstioNetworkGateway) GetRegistryServiceName() string { -// if x, ok := m.GetGw().(*Network_IstioNetworkGateway_RegistryServiceName); ok { -// return x.RegistryServiceName -// } -// return "" -//} -// -//func (m *Network_IstioNetworkGateway) GetAddress() string { -// if x, ok := m.GetGw().(*Network_IstioNetworkGateway_Address); ok { -// return x.Address -// } -// return "" -//} -// -//func (m *Network_IstioNetworkGateway) GetPort() uint32 { -// if m != nil { -// return m.Port -// } -// return 0 -//} -// -//func (m *Network_IstioNetworkGateway) GetLocality() string { -// if m != nil { -// return m.Locality -// } -// return "" -//} -// -//// XXX_OneofWrappers is for the internal use of the proto package. -//func (*Network_IstioNetworkGateway) XXX_OneofWrappers() []interface{} { -// return []interface{}{ -// (*Network_IstioNetworkGateway_RegistryServiceName)(nil), -// (*Network_IstioNetworkGateway_Address)(nil), -// } -//} -// -//// MeshNetworks (config map) provides information about the set of networks -//// inside a mesh and how to route to endpoints in each network. For example -//// -//// MeshNetworks(file/config map): -//// -//// ```yaml -//// networks: -//// network1: -//// - endpoints: -//// - fromRegistry: registry1 #must match kubeconfig name in Kubernetes secret -//// - fromCidr: 192.168.100.0/22 #a VM network for example -//// gateways: -//// - registryServiceName: istio-ingressgateway.istio-system.svc.cluster.local -//// port: 15443 -//// locality: us-east-1a -//// - address: 192.168.100.1 -//// port: 15443 -//// locality: us-east-1a -//// ``` -//// -//type MeshNetworks struct { -// // The set of networks inside this mesh. Each network should -// // have a unique name and information about how to infer the endpoints in -// // the network as well as the gateways associated with the network. -// Networks map[string]*Network `protobuf:"bytes,1,rep,name=networks,proto3" json:"networks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -// XXX_NoUnkeyedLiteral struct{} `json:"-"` -// XXX_unrecognized []byte `json:"-"` -// XXX_sizecache int32 `json:"-"` -//} -// -//func (m *MeshNetworks) Reset() { *m = MeshNetworks{} } -//func (m *MeshNetworks) String() string { return proto.CompactTextString(m) } -//func (*MeshNetworks) ProtoMessage() {} -//func (*MeshNetworks) Descriptor() ([]byte, []int) { -// return fileDescriptor_a15df2a96e10cd86, []int{1} -//} -//func (m *MeshNetworks) XXX_Unmarshal(b []byte) error { -// return m.Unmarshal(b) -//} -//func (m *MeshNetworks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { -// if deterministic { -// return xxx_messageInfo_MeshNetworks.Marshal(b, m, deterministic) -// } else { -// b = b[:cap(b)] -// n, err := m.MarshalToSizedBuffer(b) -// if err != nil { -// return nil, err -// } -// return b[:n], nil -// } -//} -//func (m *MeshNetworks) XXX_Merge(src proto.Message) { -// xxx_messageInfo_MeshNetworks.Merge(m, src) -//} -//func (m *MeshNetworks) XXX_Size() int { -// return m.Size() -//} -//func (m *MeshNetworks) XXX_DiscardUnknown() { -// xxx_messageInfo_MeshNetworks.DiscardUnknown(m) -//} -// -//var xxx_messageInfo_MeshNetworks proto.InternalMessageInfo -// -//func (m *MeshNetworks) GetNetworks() map[string]*Network { -// if m != nil { -// return m.Networks -// } -// return nil -//} -// -//func init() { -// proto.RegisterType((*Network)(nil), "istio.mesh.v1alpha1.Network") -// proto.RegisterType((*Network_NetworkEndpoints)(nil), "istio.mesh.v1alpha1.Network.NetworkEndpoints") -// proto.RegisterType((*Network_IstioNetworkGateway)(nil), "istio.mesh.v1alpha1.Network.IstioNetworkGateway") -// proto.RegisterType((*MeshNetworks)(nil), "istio.mesh.v1alpha1.MeshNetworks") -// proto.RegisterMapType((map[string]*Network)(nil), "istio.mesh.v1alpha1.MeshNetworks.NetworksEntry") -//} -// -//func init() { proto.RegisterFile("mesh/v1alpha1/network.proto", fileDescriptor_a15df2a96e10cd86) } -// -//var fileDescriptor_a15df2a96e10cd86 = []byte{ -// // 432 bytes of a gzipped FileDescriptorProto -// 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xcd, 0x6e, 0xd3, 0x40, -// 0x10, 0x66, 0xed, 0x40, 0x93, 0x69, 0x23, 0x55, 0x1b, 0x21, 0x2c, 0x03, 0x21, 0xaa, 0x84, 0x94, -// 0x0b, 0x36, 0x0d, 0x1c, 0x10, 0x37, 0x82, 0x2a, 0xe0, 0x40, 0x55, 0xcc, 0x09, 0x0e, 0x44, 0xdb, -// 0x78, 0xea, 0xac, 0xea, 0x78, 0xad, 0xdd, 0xc5, 0x91, 0x5f, 0x87, 0x57, 0xe0, 0xc8, 0x0b, 0x70, -// 0xe4, 0x11, 0xaa, 0x3c, 0x09, 0x5a, 0xaf, 0xd7, 0xd0, 0x2a, 0xea, 0xc9, 0x9e, 0xef, 0x9b, 0xef, -// 0x9b, 0x9f, 0x1d, 0x78, 0xb8, 0x46, 0xb5, 0x8a, 0xab, 0x63, 0x96, 0x97, 0x2b, 0x76, 0x1c, 0x17, -// 0xa8, 0x37, 0x42, 0x5e, 0x46, 0xa5, 0x14, 0x5a, 0xd0, 0x11, 0x57, 0x9a, 0x8b, 0xc8, 0xa4, 0x44, -// 0x2e, 0x25, 0x7c, 0x92, 0x09, 0x91, 0xe5, 0x18, 0xb3, 0x92, 0xc7, 0x17, 0x1c, 0xf3, 0x74, 0x71, -// 0x8e, 0x2b, 0x56, 0x71, 0x21, 0xad, 0xea, 0xe8, 0xa7, 0x0f, 0x7b, 0xa7, 0xd6, 0x87, 0x9e, 0xc1, -// 0x00, 0x8b, 0xb4, 0x14, 0xbc, 0xd0, 0x2a, 0xf0, 0x26, 0xfe, 0x74, 0x7f, 0xf6, 0x2c, 0xda, 0xe1, -// 0x1a, 0xb5, 0x02, 0xf7, 0x3d, 0x71, 0xa2, 0xb9, 0x7f, 0xf5, 0xc6, 0x4b, 0xfe, 0x99, 0xd0, 0x4f, -// 0xd0, 0xcf, 0x98, 0xc6, 0x0d, 0xab, 0x55, 0xe0, 0x37, 0x86, 0xcf, 0x6f, 0x35, 0xfc, 0x60, 0xb8, -// 0x36, 0x78, 0x67, 0x85, 0xd6, 0xb3, 0xb3, 0x09, 0xbf, 0xc1, 0xe1, 0xcd, 0xb2, 0xf4, 0x31, 0x0c, -// 0x2e, 0xa4, 0x58, 0x2f, 0x96, 0x3c, 0x95, 0x01, 0x99, 0x90, 0xe9, 0xe0, 0xfd, 0x9d, 0xa4, 0x6f, -// 0xa0, 0xb7, 0x3c, 0x95, 0xf4, 0x29, 0x0c, 0x1b, 0x5a, 0x62, 0xc6, 0x95, 0x96, 0x75, 0xe0, 0xb5, -// 0x29, 0x07, 0x06, 0x4e, 0x5a, 0x74, 0xde, 0x03, 0xaf, 0xc0, 0xf0, 0x07, 0x81, 0xd1, 0x8e, 0x36, -// 0xe8, 0x4b, 0xb8, 0xef, 0xf4, 0x0b, 0x85, 0xb2, 0xe2, 0x4b, 0x5c, 0x14, 0x6c, 0x8d, 0x5d, 0xbd, -// 0x91, 0xa3, 0x3f, 0x5b, 0xf6, 0x94, 0xad, 0x91, 0x86, 0xb0, 0xc7, 0xd2, 0x54, 0xa2, 0x52, 0x5d, -// 0x51, 0x07, 0xd0, 0x07, 0xd0, 0x2b, 0x85, 0xd4, 0x81, 0x3f, 0x21, 0xd3, 0xa1, 0x1d, 0xb3, 0x01, -// 0x68, 0x08, 0xfd, 0x5c, 0x2c, 0x59, 0xce, 0x75, 0x1d, 0xf4, 0x8c, 0x2a, 0xe9, 0x62, 0xd3, 0x64, -// 0xb6, 0x39, 0xfa, 0x45, 0xe0, 0xe0, 0x23, 0xaa, 0x55, 0xdb, 0xa3, 0xa2, 0x67, 0xd0, 0x6f, 0xaf, -// 0x41, 0x05, 0xa4, 0x59, 0x74, 0xbc, 0x73, 0xd1, 0xff, 0x8b, 0xdc, 0xd6, 0xd5, 0x49, 0x61, 0xc6, -// 0xb7, 0x7b, 0x76, 0x2e, 0xe1, 0x17, 0x18, 0x5e, 0xe3, 0xe9, 0x21, 0xf8, 0x97, 0x58, 0xdb, 0x71, -// 0x13, 0xf3, 0x4b, 0x67, 0x70, 0xb7, 0x62, 0xf9, 0x77, 0x6c, 0x46, 0xdb, 0x9f, 0x3d, 0xba, 0xed, -// 0x69, 0x13, 0x9b, 0xfa, 0xda, 0x7b, 0x45, 0xe6, 0xd3, 0xdf, 0xdb, 0x31, 0xf9, 0xb3, 0x1d, 0x93, -// 0xab, 0xed, 0x98, 0x7c, 0x0d, 0xad, 0x8a, 0x8b, 0xe6, 0x48, 0xaf, 0x5d, 0xf8, 0xf9, 0xbd, 0xe6, -// 0x48, 0x5f, 0xfc, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x17, 0xcd, 0x07, 0x4e, 0xf9, 0x02, 0x00, 0x00, -//} -// -//func (m *Network) Marshal() (dAtA []byte, err error) { -// size := m.Size() -// dAtA = make([]byte, size) -// n, err := m.MarshalToSizedBuffer(dAtA[:size]) -// if err != nil { -// return nil, err -// } -// return dAtA[:n], nil -//} -// -//func (m *Network) MarshalTo(dAtA []byte) (int, error) { -// size := m.Size() -// return m.MarshalToSizedBuffer(dAtA[:size]) -//} -// -//func (m *Network) MarshalToSizedBuffer(dAtA []byte) (int, error) { -// i := len(dAtA) -// _ = i -// var l int -// _ = l -// if m.XXX_unrecognized != nil { -// i -= len(m.XXX_unrecognized) -// copy(dAtA[i:], m.XXX_unrecognized) -// } -// if len(m.Gateways) > 0 { -// for iNdEx := len(m.Gateways) - 1; iNdEx >= 0; iNdEx-- { -// { -// size, err := m.Gateways[iNdEx].MarshalToSizedBuffer(dAtA[:i]) -// if err != nil { -// return 0, err -// } -// i -= size -// i = encodeVarintNetwork(dAtA, i, uint64(size)) -// } -// i-- -// dAtA[i] = 0x1a -// } -// } -// if len(m.Endpoints) > 0 { -// for iNdEx := len(m.Endpoints) - 1; iNdEx >= 0; iNdEx-- { -// { -// size, err := m.Endpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) -// if err != nil { -// return 0, err -// } -// i -= size -// i = encodeVarintNetwork(dAtA, i, uint64(size)) -// } -// i-- -// dAtA[i] = 0x12 -// } -// } -// return len(dAtA) - i, nil -//} -// -//func (m *Network_NetworkEndpoints) Marshal() (dAtA []byte, err error) { -// size := m.Size() -// dAtA = make([]byte, size) -// n, err := m.MarshalToSizedBuffer(dAtA[:size]) -// if err != nil { -// return nil, err -// } -// return dAtA[:n], nil -//} -// -//func (m *Network_NetworkEndpoints) MarshalTo(dAtA []byte) (int, error) { -// size := m.Size() -// return m.MarshalToSizedBuffer(dAtA[:size]) -//} -// -//func (m *Network_NetworkEndpoints) MarshalToSizedBuffer(dAtA []byte) (int, error) { -// i := len(dAtA) -// _ = i -// var l int -// _ = l -// if m.XXX_unrecognized != nil { -// i -= len(m.XXX_unrecognized) -// copy(dAtA[i:], m.XXX_unrecognized) -// } -// if m.Ne != nil { -// { -// size := m.Ne.Size() -// i -= size -// if _, err := m.Ne.MarshalTo(dAtA[i:]); err != nil { -// return 0, err -// } -// } -// } -// return len(dAtA) - i, nil -//} -// -//func (m *Network_NetworkEndpoints_FromCidr) MarshalTo(dAtA []byte) (int, error) { -// return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -//} -// -//func (m *Network_NetworkEndpoints_FromCidr) MarshalToSizedBuffer(dAtA []byte) (int, error) { -// i := len(dAtA) -// i -= len(m.FromCidr) -// copy(dAtA[i:], m.FromCidr) -// i = encodeVarintNetwork(dAtA, i, uint64(len(m.FromCidr))) -// i-- -// dAtA[i] = 0xa -// return len(dAtA) - i, nil -//} -//func (m *Network_NetworkEndpoints_FromRegistry) MarshalTo(dAtA []byte) (int, error) { -// return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -//} -// -//func (m *Network_NetworkEndpoints_FromRegistry) MarshalToSizedBuffer(dAtA []byte) (int, error) { -// i := len(dAtA) -// i -= len(m.FromRegistry) -// copy(dAtA[i:], m.FromRegistry) -// i = encodeVarintNetwork(dAtA, i, uint64(len(m.FromRegistry))) -// i-- -// dAtA[i] = 0x12 -// return len(dAtA) - i, nil -//} -//func (m *Network_IstioNetworkGateway) Marshal() (dAtA []byte, err error) { -// size := m.Size() -// dAtA = make([]byte, size) -// n, err := m.MarshalToSizedBuffer(dAtA[:size]) -// if err != nil { -// return nil, err -// } -// return dAtA[:n], nil -//} -// -//func (m *Network_IstioNetworkGateway) MarshalTo(dAtA []byte) (int, error) { -// size := m.Size() -// return m.MarshalToSizedBuffer(dAtA[:size]) -//} -// -//func (m *Network_IstioNetworkGateway) MarshalToSizedBuffer(dAtA []byte) (int, error) { -// i := len(dAtA) -// _ = i -// var l int -// _ = l -// if m.XXX_unrecognized != nil { -// i -= len(m.XXX_unrecognized) -// copy(dAtA[i:], m.XXX_unrecognized) -// } -// if len(m.Locality) > 0 { -// i -= len(m.Locality) -// copy(dAtA[i:], m.Locality) -// i = encodeVarintNetwork(dAtA, i, uint64(len(m.Locality))) -// i-- -// dAtA[i] = 0x22 -// } -// if m.Port != 0 { -// i = encodeVarintNetwork(dAtA, i, uint64(m.Port)) -// i-- -// dAtA[i] = 0x18 -// } -// if m.Gw != nil { -// { -// size := m.Gw.Size() -// i -= size -// if _, err := m.Gw.MarshalTo(dAtA[i:]); err != nil { -// return 0, err -// } -// } -// } -// return len(dAtA) - i, nil -//} -// -//func (m *Network_IstioNetworkGateway_RegistryServiceName) MarshalTo(dAtA []byte) (int, error) { -// return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -//} -// -//func (m *Network_IstioNetworkGateway_RegistryServiceName) MarshalToSizedBuffer(dAtA []byte) (int, error) { -// i := len(dAtA) -// i -= len(m.RegistryServiceName) -// copy(dAtA[i:], m.RegistryServiceName) -// i = encodeVarintNetwork(dAtA, i, uint64(len(m.RegistryServiceName))) -// i-- -// dAtA[i] = 0xa -// return len(dAtA) - i, nil -//} -//func (m *Network_IstioNetworkGateway_Address) MarshalTo(dAtA []byte) (int, error) { -// return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -//} -// -//func (m *Network_IstioNetworkGateway_Address) MarshalToSizedBuffer(dAtA []byte) (int, error) { -// i := len(dAtA) -// i -= len(m.Address) -// copy(dAtA[i:], m.Address) -// i = encodeVarintNetwork(dAtA, i, uint64(len(m.Address))) -// i-- -// dAtA[i] = 0x12 -// return len(dAtA) - i, nil -//} -//func (m *MeshNetworks) Marshal() (dAtA []byte, err error) { -// size := m.Size() -// dAtA = make([]byte, size) -// n, err := m.MarshalToSizedBuffer(dAtA[:size]) -// if err != nil { -// return nil, err -// } -// return dAtA[:n], nil -//} -// -//func (m *MeshNetworks) MarshalTo(dAtA []byte) (int, error) { -// size := m.Size() -// return m.MarshalToSizedBuffer(dAtA[:size]) -//} -// -//func (m *MeshNetworks) MarshalToSizedBuffer(dAtA []byte) (int, error) { -// i := len(dAtA) -// _ = i -// var l int -// _ = l -// if m.XXX_unrecognized != nil { -// i -= len(m.XXX_unrecognized) -// copy(dAtA[i:], m.XXX_unrecognized) -// } -// if len(m.Networks) > 0 { -// for k := range m.Networks { -// v := m.Networks[k] -// baseI := i -// if v != nil { -// { -// size, err := v.MarshalToSizedBuffer(dAtA[:i]) -// if err != nil { -// return 0, err -// } -// i -= size -// i = encodeVarintNetwork(dAtA, i, uint64(size)) -// } -// i-- -// dAtA[i] = 0x12 -// } -// i -= len(k) -// copy(dAtA[i:], k) -// i = encodeVarintNetwork(dAtA, i, uint64(len(k))) -// i-- -// dAtA[i] = 0xa -// i = encodeVarintNetwork(dAtA, i, uint64(baseI-i)) -// i-- -// dAtA[i] = 0xa -// } -// } -// return len(dAtA) - i, nil -//} -// -//func encodeVarintNetwork(dAtA []byte, offset int, v uint64) int { -// offset -= sovNetwork(v) -// base := offset -// for v >= 1<<7 { -// dAtA[offset] = uint8(v&0x7f | 0x80) -// v >>= 7 -// offset++ -// } -// dAtA[offset] = uint8(v) -// return base -//} -//func (m *Network) Size() (n int) { -// if m == nil { -// return 0 -// } -// var l int -// _ = l -// if len(m.Endpoints) > 0 { -// for _, e := range m.Endpoints { -// l = e.Size() -// n += 1 + l + sovNetwork(uint64(l)) -// } -// } -// if len(m.Gateways) > 0 { -// for _, e := range m.Gateways { -// l = e.Size() -// n += 1 + l + sovNetwork(uint64(l)) -// } -// } -// if m.XXX_unrecognized != nil { -// n += len(m.XXX_unrecognized) -// } -// return n -//} -// -//func (m *Network_NetworkEndpoints) Size() (n int) { -// if m == nil { -// return 0 -// } -// var l int -// _ = l -// if m.Ne != nil { -// n += m.Ne.Size() -// } -// if m.XXX_unrecognized != nil { -// n += len(m.XXX_unrecognized) -// } -// return n -//} -// -//func (m *Network_NetworkEndpoints_FromCidr) Size() (n int) { -// if m == nil { -// return 0 -// } -// var l int -// _ = l -// l = len(m.FromCidr) -// n += 1 + l + sovNetwork(uint64(l)) -// return n -//} -//func (m *Network_NetworkEndpoints_FromRegistry) Size() (n int) { -// if m == nil { -// return 0 -// } -// var l int -// _ = l -// l = len(m.FromRegistry) -// n += 1 + l + sovNetwork(uint64(l)) -// return n -//} -//func (m *Network_IstioNetworkGateway) Size() (n int) { -// if m == nil { -// return 0 -// } -// var l int -// _ = l -// if m.Gw != nil { -// n += m.Gw.Size() -// } -// if m.Port != 0 { -// n += 1 + sovNetwork(uint64(m.Port)) -// } -// l = len(m.Locality) -// if l > 0 { -// n += 1 + l + sovNetwork(uint64(l)) -// } -// if m.XXX_unrecognized != nil { -// n += len(m.XXX_unrecognized) -// } -// return n -//} -// -//func (m *Network_IstioNetworkGateway_RegistryServiceName) Size() (n int) { -// if m == nil { -// return 0 -// } -// var l int -// _ = l -// l = len(m.RegistryServiceName) -// n += 1 + l + sovNetwork(uint64(l)) -// return n -//} -//func (m *Network_IstioNetworkGateway_Address) Size() (n int) { -// if m == nil { -// return 0 -// } -// var l int -// _ = l -// l = len(m.Address) -// n += 1 + l + sovNetwork(uint64(l)) -// return n -//} -//func (m *MeshNetworks) Size() (n int) { -// if m == nil { -// return 0 -// } -// var l int -// _ = l -// if len(m.Networks) > 0 { -// for k, v := range m.Networks { -// _ = k -// _ = v -// l = 0 -// if v != nil { -// l = v.Size() -// l += 1 + sovNetwork(uint64(l)) -// } -// mapEntrySize := 1 + len(k) + sovNetwork(uint64(len(k))) + l -// n += mapEntrySize + 1 + sovNetwork(uint64(mapEntrySize)) -// } -// } -// if m.XXX_unrecognized != nil { -// n += len(m.XXX_unrecognized) -// } -// return n -//} -// -//func sovNetwork(x uint64) (n int) { -// return (math_bits.Len64(x|1) + 6) / 7 -//} -//func sozNetwork(x uint64) (n int) { -// return sovNetwork(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -//} -//func (m *Network) Unmarshal(dAtA []byte) error { -// l := len(dAtA) -// iNdEx := 0 -// for iNdEx < l { -// preIndex := iNdEx -// var wire uint64 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// wire |= uint64(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// fieldNum := int32(wire >> 3) -// wireType := int(wire & 0x7) -// if wireType == 4 { -// return fmt.Errorf("proto: Network: wiretype end group for non-group") -// } -// if fieldNum <= 0 { -// return fmt.Errorf("proto: Network: illegal tag %d (wire type %d)", fieldNum, wire) -// } -// switch fieldNum { -// case 2: -// if wireType != 2 { -// return fmt.Errorf("proto: wrong wireType = %d for field Endpoints", wireType) -// } -// var msglen int -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// msglen |= int(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// if msglen < 0 { -// return ErrInvalidLengthNetwork -// } -// postIndex := iNdEx + msglen -// if postIndex < 0 { -// return ErrInvalidLengthNetwork -// } -// if postIndex > l { -// return io.ErrUnexpectedEOF -// } -// m.Endpoints = append(m.Endpoints, &Network_NetworkEndpoints{}) -// if err := m.Endpoints[len(m.Endpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { -// return err -// } -// iNdEx = postIndex -// case 3: -// if wireType != 2 { -// return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) -// } -// var msglen int -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// msglen |= int(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// if msglen < 0 { -// return ErrInvalidLengthNetwork -// } -// postIndex := iNdEx + msglen -// if postIndex < 0 { -// return ErrInvalidLengthNetwork -// } -// if postIndex > l { -// return io.ErrUnexpectedEOF -// } -// m.Gateways = append(m.Gateways, &Network_IstioNetworkGateway{}) -// if err := m.Gateways[len(m.Gateways)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { -// return err -// } -// iNdEx = postIndex -// default: -// iNdEx = preIndex -// skippy, err := skipNetwork(dAtA[iNdEx:]) -// if err != nil { -// return err -// } -// if skippy < 0 { -// return ErrInvalidLengthNetwork -// } -// if (iNdEx + skippy) < 0 { -// return ErrInvalidLengthNetwork -// } -// if (iNdEx + skippy) > l { -// return io.ErrUnexpectedEOF -// } -// m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) -// iNdEx += skippy -// } -// } -// -// if iNdEx > l { -// return io.ErrUnexpectedEOF -// } -// return nil -//} -//func (m *Network_NetworkEndpoints) Unmarshal(dAtA []byte) error { -// l := len(dAtA) -// iNdEx := 0 -// for iNdEx < l { -// preIndex := iNdEx -// var wire uint64 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// wire |= uint64(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// fieldNum := int32(wire >> 3) -// wireType := int(wire & 0x7) -// if wireType == 4 { -// return fmt.Errorf("proto: NetworkEndpoints: wiretype end group for non-group") -// } -// if fieldNum <= 0 { -// return fmt.Errorf("proto: NetworkEndpoints: illegal tag %d (wire type %d)", fieldNum, wire) -// } -// switch fieldNum { -// case 1: -// if wireType != 2 { -// return fmt.Errorf("proto: wrong wireType = %d for field FromCidr", wireType) -// } -// var stringLen uint64 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// stringLen |= uint64(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// intStringLen := int(stringLen) -// if intStringLen < 0 { -// return ErrInvalidLengthNetwork -// } -// postIndex := iNdEx + intStringLen -// if postIndex < 0 { -// return ErrInvalidLengthNetwork -// } -// if postIndex > l { -// return io.ErrUnexpectedEOF -// } -// m.Ne = &Network_NetworkEndpoints_FromCidr{string(dAtA[iNdEx:postIndex])} -// iNdEx = postIndex -// case 2: -// if wireType != 2 { -// return fmt.Errorf("proto: wrong wireType = %d for field FromRegistry", wireType) -// } -// var stringLen uint64 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// stringLen |= uint64(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// intStringLen := int(stringLen) -// if intStringLen < 0 { -// return ErrInvalidLengthNetwork -// } -// postIndex := iNdEx + intStringLen -// if postIndex < 0 { -// return ErrInvalidLengthNetwork -// } -// if postIndex > l { -// return io.ErrUnexpectedEOF -// } -// m.Ne = &Network_NetworkEndpoints_FromRegistry{string(dAtA[iNdEx:postIndex])} -// iNdEx = postIndex -// default: -// iNdEx = preIndex -// skippy, err := skipNetwork(dAtA[iNdEx:]) -// if err != nil { -// return err -// } -// if skippy < 0 { -// return ErrInvalidLengthNetwork -// } -// if (iNdEx + skippy) < 0 { -// return ErrInvalidLengthNetwork -// } -// if (iNdEx + skippy) > l { -// return io.ErrUnexpectedEOF -// } -// m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) -// iNdEx += skippy -// } -// } -// -// if iNdEx > l { -// return io.ErrUnexpectedEOF -// } -// return nil -//} -//func (m *Network_IstioNetworkGateway) Unmarshal(dAtA []byte) error { -// l := len(dAtA) -// iNdEx := 0 -// for iNdEx < l { -// preIndex := iNdEx -// var wire uint64 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// wire |= uint64(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// fieldNum := int32(wire >> 3) -// wireType := int(wire & 0x7) -// if wireType == 4 { -// return fmt.Errorf("proto: IstioNetworkGateway: wiretype end group for non-group") -// } -// if fieldNum <= 0 { -// return fmt.Errorf("proto: IstioNetworkGateway: illegal tag %d (wire type %d)", fieldNum, wire) -// } -// switch fieldNum { -// case 1: -// if wireType != 2 { -// return fmt.Errorf("proto: wrong wireType = %d for field RegistryServiceName", wireType) -// } -// var stringLen uint64 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// stringLen |= uint64(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// intStringLen := int(stringLen) -// if intStringLen < 0 { -// return ErrInvalidLengthNetwork -// } -// postIndex := iNdEx + intStringLen -// if postIndex < 0 { -// return ErrInvalidLengthNetwork -// } -// if postIndex > l { -// return io.ErrUnexpectedEOF -// } -// m.Gw = &Network_IstioNetworkGateway_RegistryServiceName{string(dAtA[iNdEx:postIndex])} -// iNdEx = postIndex -// case 2: -// if wireType != 2 { -// return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) -// } -// var stringLen uint64 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// stringLen |= uint64(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// intStringLen := int(stringLen) -// if intStringLen < 0 { -// return ErrInvalidLengthNetwork -// } -// postIndex := iNdEx + intStringLen -// if postIndex < 0 { -// return ErrInvalidLengthNetwork -// } -// if postIndex > l { -// return io.ErrUnexpectedEOF -// } -// m.Gw = &Network_IstioNetworkGateway_Address{string(dAtA[iNdEx:postIndex])} -// iNdEx = postIndex -// case 3: -// if wireType != 0 { -// return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) -// } -// m.Port = 0 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// m.Port |= uint32(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// case 4: -// if wireType != 2 { -// return fmt.Errorf("proto: wrong wireType = %d for field Locality", wireType) -// } -// var stringLen uint64 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// stringLen |= uint64(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// intStringLen := int(stringLen) -// if intStringLen < 0 { -// return ErrInvalidLengthNetwork -// } -// postIndex := iNdEx + intStringLen -// if postIndex < 0 { -// return ErrInvalidLengthNetwork -// } -// if postIndex > l { -// return io.ErrUnexpectedEOF -// } -// m.Locality = string(dAtA[iNdEx:postIndex]) -// iNdEx = postIndex -// default: -// iNdEx = preIndex -// skippy, err := skipNetwork(dAtA[iNdEx:]) -// if err != nil { -// return err -// } -// if skippy < 0 { -// return ErrInvalidLengthNetwork -// } -// if (iNdEx + skippy) < 0 { -// return ErrInvalidLengthNetwork -// } -// if (iNdEx + skippy) > l { -// return io.ErrUnexpectedEOF -// } -// m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) -// iNdEx += skippy -// } -// } -// -// if iNdEx > l { -// return io.ErrUnexpectedEOF -// } -// return nil -//} -//func (m *MeshNetworks) Unmarshal(dAtA []byte) error { -// l := len(dAtA) -// iNdEx := 0 -// for iNdEx < l { -// preIndex := iNdEx -// var wire uint64 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// wire |= uint64(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// fieldNum := int32(wire >> 3) -// wireType := int(wire & 0x7) -// if wireType == 4 { -// return fmt.Errorf("proto: MeshNetworks: wiretype end group for non-group") -// } -// if fieldNum <= 0 { -// return fmt.Errorf("proto: MeshNetworks: illegal tag %d (wire type %d)", fieldNum, wire) -// } -// switch fieldNum { -// case 1: -// if wireType != 2 { -// return fmt.Errorf("proto: wrong wireType = %d for field Networks", wireType) -// } -// var msglen int -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// msglen |= int(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// if msglen < 0 { -// return ErrInvalidLengthNetwork -// } -// postIndex := iNdEx + msglen -// if postIndex < 0 { -// return ErrInvalidLengthNetwork -// } -// if postIndex > l { -// return io.ErrUnexpectedEOF -// } -// if m.Networks == nil { -// m.Networks = make(map[string]*Network) -// } -// var mapkey string -// var mapvalue *Network -// for iNdEx < postIndex { -// entryPreIndex := iNdEx -// var wire uint64 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// wire |= uint64(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// fieldNum := int32(wire >> 3) -// if fieldNum == 1 { -// var stringLenmapkey uint64 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// stringLenmapkey |= uint64(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// intStringLenmapkey := int(stringLenmapkey) -// if intStringLenmapkey < 0 { -// return ErrInvalidLengthNetwork -// } -// postStringIndexmapkey := iNdEx + intStringLenmapkey -// if postStringIndexmapkey < 0 { -// return ErrInvalidLengthNetwork -// } -// if postStringIndexmapkey > l { -// return io.ErrUnexpectedEOF -// } -// mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) -// iNdEx = postStringIndexmapkey -// } else if fieldNum == 2 { -// var mapmsglen int -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// mapmsglen |= int(b&0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// if mapmsglen < 0 { -// return ErrInvalidLengthNetwork -// } -// postmsgIndex := iNdEx + mapmsglen -// if postmsgIndex < 0 { -// return ErrInvalidLengthNetwork -// } -// if postmsgIndex > l { -// return io.ErrUnexpectedEOF -// } -// mapvalue = &Network{} -// if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { -// return err -// } -// iNdEx = postmsgIndex -// } else { -// iNdEx = entryPreIndex -// skippy, err := skipNetwork(dAtA[iNdEx:]) -// if err != nil { -// return err -// } -// if skippy < 0 { -// return ErrInvalidLengthNetwork -// } -// if (iNdEx + skippy) > postIndex { -// return io.ErrUnexpectedEOF -// } -// iNdEx += skippy -// } -// } -// m.Networks[mapkey] = mapvalue -// iNdEx = postIndex -// default: -// iNdEx = preIndex -// skippy, err := skipNetwork(dAtA[iNdEx:]) -// if err != nil { -// return err -// } -// if skippy < 0 { -// return ErrInvalidLengthNetwork -// } -// if (iNdEx + skippy) < 0 { -// return ErrInvalidLengthNetwork -// } -// if (iNdEx + skippy) > l { -// return io.ErrUnexpectedEOF -// } -// m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) -// iNdEx += skippy -// } -// } -// -// if iNdEx > l { -// return io.ErrUnexpectedEOF -// } -// return nil -//} -//func skipNetwork(dAtA []byte) (n int, err error) { -// l := len(dAtA) -// iNdEx := 0 -// for iNdEx < l { -// var wire uint64 -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return 0, ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return 0, io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// wire |= (uint64(b) & 0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// wireType := int(wire & 0x7) -// switch wireType { -// case 0: -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return 0, ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return 0, io.ErrUnexpectedEOF -// } -// iNdEx++ -// if dAtA[iNdEx-1] < 0x80 { -// break -// } -// } -// return iNdEx, nil -// case 1: -// iNdEx += 8 -// return iNdEx, nil -// case 2: -// var length int -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return 0, ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return 0, io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// length |= (int(b) & 0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// if length < 0 { -// return 0, ErrInvalidLengthNetwork -// } -// iNdEx += length -// if iNdEx < 0 { -// return 0, ErrInvalidLengthNetwork -// } -// return iNdEx, nil -// case 3: -// for { -// var innerWire uint64 -// var start int = iNdEx -// for shift := uint(0); ; shift += 7 { -// if shift >= 64 { -// return 0, ErrIntOverflowNetwork -// } -// if iNdEx >= l { -// return 0, io.ErrUnexpectedEOF -// } -// b := dAtA[iNdEx] -// iNdEx++ -// innerWire |= (uint64(b) & 0x7F) << shift -// if b < 0x80 { -// break -// } -// } -// innerWireType := int(innerWire & 0x7) -// if innerWireType == 4 { -// break -// } -// next, err := skipNetwork(dAtA[start:]) -// if err != nil { -// return 0, err -// } -// iNdEx = start + next -// if iNdEx < 0 { -// return 0, ErrInvalidLengthNetwork -// } -// } -// return iNdEx, nil -// case 4: -// return iNdEx, nil -// case 5: -// iNdEx += 4 -// return iNdEx, nil -// default: -// return 0, fmt.Errorf("proto: illegal wireType %d", wireType) -// } -// } -// panic("unreachable") -//} -// -//var ( -// ErrInvalidLengthNetwork = fmt.Errorf("proto: negative length found during unmarshaling") -// ErrIntOverflowNetwork = fmt.Errorf("proto: integer overflow") -//) diff --git a/pkg/inject/api/mesh/v1alpha1/proxy.pb.go b/pkg/inject/api/mesh/v1alpha1/proxy.pb.go deleted file mode 100644 index a1e8421a..00000000 --- a/pkg/inject/api/mesh/v1alpha1/proxy.pb.go +++ /dev/null @@ -1,3961 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: mesh/v1alpha1/proxy.proto - -package v1alpha1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - io "io" - v1alpha3 "github.com/polarismesh/polaris-controller/pkg/inject/api/networking/v1alpha3" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// AuthenticationPolicy defines authentication policy. It can be set for -// different scopes (mesh, service …), and the most narrow scope with -// non-INHERIT value will be used. -// Mesh policy cannot be INHERIT. -type AuthenticationPolicy int32 - -const ( - // Do not encrypt Envoy to Envoy traffic. - AuthenticationPolicy_NONE AuthenticationPolicy = 0 - // Envoy to Envoy traffic is wrapped into mutual TLS connections. - AuthenticationPolicy_MUTUAL_TLS AuthenticationPolicy = 1 - // Use the policy defined by the parent scope. Should not be used for mesh - // policy. - AuthenticationPolicy_INHERIT AuthenticationPolicy = 1000 -) - -var AuthenticationPolicy_name = map[int32]string{ - 0: "NONE", - 1: "MUTUAL_TLS", - 1000: "INHERIT", -} - -var AuthenticationPolicy_value = map[string]int32{ - "NONE": 0, - "MUTUAL_TLS": 1, - "INHERIT": 1000, -} - -func (x AuthenticationPolicy) String() string { - return proto.EnumName(AuthenticationPolicy_name, int32(x)) -} - -func (AuthenticationPolicy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5efecd978cf3d28d, []int{0} -} - -// The mode used to redirect inbound traffic to Envoy. -// This setting has no effect on outbound traffic: iptables REDIRECT is always used for -// outbound connections. -type ProxyConfig_InboundInterceptionMode int32 - -const ( - // The REDIRECT mode uses iptables REDIRECT to NAT and redirect to Envoy. This mode loses - // source IP addresses during redirection. - ProxyConfig_REDIRECT ProxyConfig_InboundInterceptionMode = 0 - // The TPROXY mode uses iptables TPROXY to redirect to Envoy. This mode preserves both the - // source and destination IP addresses and ports, so that they can be used for advanced - // filtering and manipulation. This mode also configures the sidecar to run with the - // CAP_NET_ADMIN capability, which is required to use TPROXY. - ProxyConfig_TPROXY ProxyConfig_InboundInterceptionMode = 1 -) - -var ProxyConfig_InboundInterceptionMode_name = map[int32]string{ - 0: "REDIRECT", - 1: "TPROXY", -} - -var ProxyConfig_InboundInterceptionMode_value = map[string]int32{ - "REDIRECT": 0, - "TPROXY": 1, -} - -func (x ProxyConfig_InboundInterceptionMode) String() string { - return proto.EnumName(ProxyConfig_InboundInterceptionMode_name, int32(x)) -} - -func (ProxyConfig_InboundInterceptionMode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5efecd978cf3d28d, []int{2, 0} -} - -// Tracing defines configuration for the tracing performed by Envoy instances. -type Tracing struct { - // The tracer implementation to be used by Envoy. - // - // Types that are valid to be assigned to Tracer: - // *Tracing_Zipkin_ - // *Tracing_Lightstep_ - // *Tracing_Datadog_ - // *Tracing_Stackdriver_ - Tracer isTracing_Tracer `protobuf_oneof:"tracer"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Tracing) Reset() { *m = Tracing{} } -func (m *Tracing) String() string { return proto.CompactTextString(m) } -func (*Tracing) ProtoMessage() {} -func (*Tracing) Descriptor() ([]byte, []int) { - return fileDescriptor_5efecd978cf3d28d, []int{0} -} -func (m *Tracing) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Tracing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Tracing.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Tracing) XXX_Merge(src proto.Message) { - xxx_messageInfo_Tracing.Merge(m, src) -} -func (m *Tracing) XXX_Size() int { - return m.Size() -} -func (m *Tracing) XXX_DiscardUnknown() { - xxx_messageInfo_Tracing.DiscardUnknown(m) -} - -var xxx_messageInfo_Tracing proto.InternalMessageInfo - -type isTracing_Tracer interface { - isTracing_Tracer() - MarshalTo([]byte) (int, error) - Size() int -} - -type Tracing_Zipkin_ struct { - Zipkin *Tracing_Zipkin `protobuf:"bytes,1,opt,name=zipkin,proto3,oneof"` -} -type Tracing_Lightstep_ struct { - Lightstep *Tracing_Lightstep `protobuf:"bytes,2,opt,name=lightstep,proto3,oneof"` -} -type Tracing_Datadog_ struct { - Datadog *Tracing_Datadog `protobuf:"bytes,3,opt,name=datadog,proto3,oneof"` -} -type Tracing_Stackdriver_ struct { - Stackdriver *Tracing_Stackdriver `protobuf:"bytes,4,opt,name=stackdriver,proto3,oneof"` -} - -func (*Tracing_Zipkin_) isTracing_Tracer() {} -func (*Tracing_Lightstep_) isTracing_Tracer() {} -func (*Tracing_Datadog_) isTracing_Tracer() {} -func (*Tracing_Stackdriver_) isTracing_Tracer() {} - -func (m *Tracing) GetTracer() isTracing_Tracer { - if m != nil { - return m.Tracer - } - return nil -} - -func (m *Tracing) GetZipkin() *Tracing_Zipkin { - if x, ok := m.GetTracer().(*Tracing_Zipkin_); ok { - return x.Zipkin - } - return nil -} - -func (m *Tracing) GetLightstep() *Tracing_Lightstep { - if x, ok := m.GetTracer().(*Tracing_Lightstep_); ok { - return x.Lightstep - } - return nil -} - -func (m *Tracing) GetDatadog() *Tracing_Datadog { - if x, ok := m.GetTracer().(*Tracing_Datadog_); ok { - return x.Datadog - } - return nil -} - -func (m *Tracing) GetStackdriver() *Tracing_Stackdriver { - if x, ok := m.GetTracer().(*Tracing_Stackdriver_); ok { - return x.Stackdriver - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Tracing) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Tracing_Zipkin_)(nil), - (*Tracing_Lightstep_)(nil), - (*Tracing_Datadog_)(nil), - (*Tracing_Stackdriver_)(nil), - } -} - -// Zipkin defines configuration for a Zipkin tracer. -type Tracing_Zipkin struct { - // Address of the Zipkin service (e.g. _zipkin:9411_). - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Tracing_Zipkin) Reset() { *m = Tracing_Zipkin{} } -func (m *Tracing_Zipkin) String() string { return proto.CompactTextString(m) } -func (*Tracing_Zipkin) ProtoMessage() {} -func (*Tracing_Zipkin) Descriptor() ([]byte, []int) { - return fileDescriptor_5efecd978cf3d28d, []int{0, 0} -} -func (m *Tracing_Zipkin) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Tracing_Zipkin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Tracing_Zipkin.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Tracing_Zipkin) XXX_Merge(src proto.Message) { - xxx_messageInfo_Tracing_Zipkin.Merge(m, src) -} -func (m *Tracing_Zipkin) XXX_Size() int { - return m.Size() -} -func (m *Tracing_Zipkin) XXX_DiscardUnknown() { - xxx_messageInfo_Tracing_Zipkin.DiscardUnknown(m) -} - -var xxx_messageInfo_Tracing_Zipkin proto.InternalMessageInfo - -func (m *Tracing_Zipkin) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -// Defines configuration for a LightStep tracer. -type Tracing_Lightstep struct { - // Address of the LightStep Satellite pool. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The LightStep access token. - AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"accessToken,omitempty"` - // True if a secure connection should be used when communicating with the pool. - Secure bool `protobuf:"varint,3,opt,name=secure,proto3" json:"secure,omitempty"` - // Path to the trusted cacert used to authenticate the pool. - CacertPath string `protobuf:"bytes,4,opt,name=cacert_path,json=cacertPath,proto3" json:"cacertPath,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Tracing_Lightstep) Reset() { *m = Tracing_Lightstep{} } -func (m *Tracing_Lightstep) String() string { return proto.CompactTextString(m) } -func (*Tracing_Lightstep) ProtoMessage() {} -func (*Tracing_Lightstep) Descriptor() ([]byte, []int) { - return fileDescriptor_5efecd978cf3d28d, []int{0, 1} -} -func (m *Tracing_Lightstep) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Tracing_Lightstep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Tracing_Lightstep.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Tracing_Lightstep) XXX_Merge(src proto.Message) { - xxx_messageInfo_Tracing_Lightstep.Merge(m, src) -} -func (m *Tracing_Lightstep) XXX_Size() int { - return m.Size() -} -func (m *Tracing_Lightstep) XXX_DiscardUnknown() { - xxx_messageInfo_Tracing_Lightstep.DiscardUnknown(m) -} - -var xxx_messageInfo_Tracing_Lightstep proto.InternalMessageInfo - -func (m *Tracing_Lightstep) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *Tracing_Lightstep) GetAccessToken() string { - if m != nil { - return m.AccessToken - } - return "" -} - -func (m *Tracing_Lightstep) GetSecure() bool { - if m != nil { - return m.Secure - } - return false -} - -func (m *Tracing_Lightstep) GetCacertPath() string { - if m != nil { - return m.CacertPath - } - return "" -} - -// Datadog defines configuration for a Datadog tracer. -type Tracing_Datadog struct { - // Address of the Datadog Agent. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Tracing_Datadog) Reset() { *m = Tracing_Datadog{} } -func (m *Tracing_Datadog) String() string { return proto.CompactTextString(m) } -func (*Tracing_Datadog) ProtoMessage() {} -func (*Tracing_Datadog) Descriptor() ([]byte, []int) { - return fileDescriptor_5efecd978cf3d28d, []int{0, 2} -} -func (m *Tracing_Datadog) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Tracing_Datadog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Tracing_Datadog.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Tracing_Datadog) XXX_Merge(src proto.Message) { - xxx_messageInfo_Tracing_Datadog.Merge(m, src) -} -func (m *Tracing_Datadog) XXX_Size() int { - return m.Size() -} -func (m *Tracing_Datadog) XXX_DiscardUnknown() { - xxx_messageInfo_Tracing_Datadog.DiscardUnknown(m) -} - -var xxx_messageInfo_Tracing_Datadog proto.InternalMessageInfo - -func (m *Tracing_Datadog) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -// Stackdriver defines configuration for a Stackdriver tracer. -// See [Opencensus trace config](https://github.com/census-instrumentation/opencensus-proto/blob/master/src/opencensus/proto/trace/v1/trace_config.proto) for details. -type Tracing_Stackdriver struct { - // debug enables trace output to stdout. - // $hide_from_docs - Debug bool `protobuf:"varint,1,opt,name=debug,proto3" json:"debug,omitempty"` - // The global default max number of attributes per span. - // default is 200. - // $hide_from_docs - MaxNumberOfAttributes *types.Int64Value `protobuf:"bytes,2,opt,name=max_number_of_attributes,json=maxNumberOfAttributes,proto3" json:"maxNumberOfAttributes,omitempty"` - // The global default max number of annotation events per span. - // default is 200. - // $hide_from_docs - MaxNumberOfAnnotations *types.Int64Value `protobuf:"bytes,3,opt,name=max_number_of_annotations,json=maxNumberOfAnnotations,proto3" json:"maxNumberOfAnnotations,omitempty"` - // The global default max number of message events per span. - // default is 200. - // $hide_from_docs - MaxNumberOfMessageEvents *types.Int64Value `protobuf:"bytes,4,opt,name=max_number_of_message_events,json=maxNumberOfMessageEvents,proto3" json:"maxNumberOfMessageEvents,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Tracing_Stackdriver) Reset() { *m = Tracing_Stackdriver{} } -func (m *Tracing_Stackdriver) String() string { return proto.CompactTextString(m) } -func (*Tracing_Stackdriver) ProtoMessage() {} -func (*Tracing_Stackdriver) Descriptor() ([]byte, []int) { - return fileDescriptor_5efecd978cf3d28d, []int{0, 3} -} -func (m *Tracing_Stackdriver) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Tracing_Stackdriver) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Tracing_Stackdriver.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Tracing_Stackdriver) XXX_Merge(src proto.Message) { - xxx_messageInfo_Tracing_Stackdriver.Merge(m, src) -} -func (m *Tracing_Stackdriver) XXX_Size() int { - return m.Size() -} -func (m *Tracing_Stackdriver) XXX_DiscardUnknown() { - xxx_messageInfo_Tracing_Stackdriver.DiscardUnknown(m) -} - -var xxx_messageInfo_Tracing_Stackdriver proto.InternalMessageInfo - -func (m *Tracing_Stackdriver) GetDebug() bool { - if m != nil { - return m.Debug - } - return false -} - -func (m *Tracing_Stackdriver) GetMaxNumberOfAttributes() *types.Int64Value { - if m != nil { - return m.MaxNumberOfAttributes - } - return nil -} - -func (m *Tracing_Stackdriver) GetMaxNumberOfAnnotations() *types.Int64Value { - if m != nil { - return m.MaxNumberOfAnnotations - } - return nil -} - -func (m *Tracing_Stackdriver) GetMaxNumberOfMessageEvents() *types.Int64Value { - if m != nil { - return m.MaxNumberOfMessageEvents - } - return nil -} - -// SDS defines secret discovery service(SDS) configuration to be used by the proxy. -// For workload, its values are set in sidecar injector(passed as arguments to istio-proxy container). -// For pilot/mixer, it's passed as arguments to istio-proxy container in pilot/mixer deployment yaml files directly. -type SDS struct { - // True if SDS is enabled. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // Path of k8s service account JWT path. - K8SSaJwtPath string `protobuf:"bytes,2,opt,name=k8s_sa_jwt_path,json=k8sSaJwtPath,proto3" json:"k8sSaJwtPath,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SDS) Reset() { *m = SDS{} } -func (m *SDS) String() string { return proto.CompactTextString(m) } -func (*SDS) ProtoMessage() {} -func (*SDS) Descriptor() ([]byte, []int) { - return fileDescriptor_5efecd978cf3d28d, []int{1} -} -func (m *SDS) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SDS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SDS.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SDS) XXX_Merge(src proto.Message) { - xxx_messageInfo_SDS.Merge(m, src) -} -func (m *SDS) XXX_Size() int { - return m.Size() -} -func (m *SDS) XXX_DiscardUnknown() { - xxx_messageInfo_SDS.DiscardUnknown(m) -} - -var xxx_messageInfo_SDS proto.InternalMessageInfo - -func (m *SDS) GetEnabled() bool { - if m != nil { - return m.Enabled - } - return false -} - -func (m *SDS) GetK8SSaJwtPath() string { - if m != nil { - return m.K8SSaJwtPath - } - return "" -} - -// ProxyConfig defines variables for individual Envoy instances. -type ProxyConfig struct { - // Path to the generated configuration file directory. - // Proxy agent generates the actual configuration and stores it in this directory. - ConfigPath string `protobuf:"bytes,1,opt,name=config_path,json=configPath,proto3" json:"configPath,omitempty"` - // Path to the proxy binary - BinaryPath string `protobuf:"bytes,2,opt,name=binary_path,json=binaryPath,proto3" json:"binaryPath,omitempty"` - // Service cluster defines the name for the service_cluster that is - // shared by all Envoy instances. This setting corresponds to - // _--service-cluster_ flag in Envoy. In a typical Envoy deployment, the - // _service-cluster_ flag is used to identify the caller, for - // source-based routing scenarios. - // - // Since Istio does not assign a local service/service version to each - // Envoy instance, the name is same for all of them. However, the - // source/caller's identity (e.g., IP address) is encoded in the - // _--service-node_ flag when launching Envoy. When the RDS service - // receives API calls from Envoy, it uses the value of the _service-node_ - // flag to compute routes that are relative to the service instances - // located at that IP address. - ServiceCluster string `protobuf:"bytes,3,opt,name=service_cluster,json=serviceCluster,proto3" json:"serviceCluster,omitempty"` - // The time in seconds that Envoy will drain connections during a hot - // restart. MUST be >=1s (e.g., _1s/1m/1h_) - DrainDuration *types.Duration `protobuf:"bytes,4,opt,name=drain_duration,json=drainDuration,proto3" json:"drainDuration,omitempty"` - // The time in seconds that Envoy will wait before shutting down the - // parent process during a hot restart. MUST be >=1s (e.g., _1s/1m/1h_). - // MUST BE greater than _drain_duration_ parameter. - ParentShutdownDuration *types.Duration `protobuf:"bytes,5,opt,name=parent_shutdown_duration,json=parentShutdownDuration,proto3" json:"parentShutdownDuration,omitempty"` - // Address of the discovery service exposing xDS with mTLS connection. - // The inject configuration may override this value. - DiscoveryAddress string `protobuf:"bytes,6,opt,name=discovery_address,json=discoveryAddress,proto3" json:"discoveryAddress,omitempty"` - // $hide_from_docs - DiscoveryRefreshDelay *types.Duration `protobuf:"bytes,7,opt,name=discovery_refresh_delay,json=discoveryRefreshDelay,proto3" json:"discoveryRefreshDelay,omitempty"` // Deprecated: Do not use. - // Address of the Zipkin service (e.g. _zipkin:9411_). - // DEPRECATED: Use [tracing][istio.mesh.v1alpha1.ProxyConfig.tracing] instead. - ZipkinAddress string `protobuf:"bytes,8,opt,name=zipkin_address,json=zipkinAddress,proto3" json:"zipkinAddress,omitempty"` // Deprecated: Do not use. - // Connection timeout used by Envoy for supporting services. (MUST BE >=1ms) - ConnectTimeout *types.Duration `protobuf:"bytes,9,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connectTimeout,omitempty"` - // IP Address and Port of a statsd UDP listener (e.g. _10.75.241.127:9125_). - StatsdUdpAddress string `protobuf:"bytes,10,opt,name=statsd_udp_address,json=statsdUdpAddress,proto3" json:"statsdUdpAddress,omitempty"` - // $hide_from_docs - EnvoyMetricsServiceAddress string `protobuf:"bytes,20,opt,name=envoy_metrics_service_address,json=envoyMetricsServiceAddress,proto3" json:"envoyMetricsServiceAddress,omitempty"` // Deprecated: Do not use. - // Port on which Envoy should listen for administrative commands. - ProxyAdminPort int32 `protobuf:"varint,11,opt,name=proxy_admin_port,json=proxyAdminPort,proto3" json:"proxyAdminPort,omitempty"` - // $hide_from_docs - AvailabilityZone string `protobuf:"bytes,12,opt,name=availability_zone,json=availabilityZone,proto3" json:"availabilityZone,omitempty"` // Deprecated: Do not use. - // Authentication policy defines the global switch to control authentication - // for Envoy-to-Envoy communication for istio components Mixer and Pilot. - ControlPlaneAuthPolicy AuthenticationPolicy `protobuf:"varint,13,opt,name=control_plane_auth_policy,json=controlPlaneAuthPolicy,proto3,enum=istio.mesh.v1alpha1.AuthenticationPolicy" json:"controlPlaneAuthPolicy,omitempty"` - // File path of custom proxy configuration, currently used by proxies - // in front of Mixer and Pilot. - CustomConfigFile string `protobuf:"bytes,14,opt,name=custom_config_file,json=customConfigFile,proto3" json:"customConfigFile,omitempty"` - // Maximum length of name field in Envoy's metrics. The length of the name field - // is determined by the length of a name field in a service and the set of labels that - // comprise a particular version of the service. The default value is set to 189 characters. - // Envoy's internal metrics take up 67 characters, for a total of 256 character name per metric. - // Increase the value of this field if you find that the metrics from Envoys are truncated. - StatNameLength int32 `protobuf:"varint,15,opt,name=stat_name_length,json=statNameLength,proto3" json:"statNameLength,omitempty"` - // The number of worker threads to run. Default value is number of cores on the machine. - Concurrency int32 `protobuf:"varint,16,opt,name=concurrency,proto3" json:"concurrency,omitempty"` - // Path to the proxy bootstrap template file - ProxyBootstrapTemplatePath string `protobuf:"bytes,17,opt,name=proxy_bootstrap_template_path,json=proxyBootstrapTemplatePath,proto3" json:"proxyBootstrapTemplatePath,omitempty"` - // The mode used to redirect inbound traffic to Envoy. - InterceptionMode ProxyConfig_InboundInterceptionMode `protobuf:"varint,18,opt,name=interception_mode,json=interceptionMode,proto3,enum=istio.mesh.v1alpha1.ProxyConfig_InboundInterceptionMode" json:"interceptionMode,omitempty"` - // Tracing configuration to be used by the proxy. - Tracing *Tracing `protobuf:"bytes,19,opt,name=tracing,proto3" json:"tracing,omitempty"` - // secret discovery service(SDS) configuration to be used by the proxy. - Sds *SDS `protobuf:"bytes,21,opt,name=sds,proto3" json:"sds,omitempty"` - // Address of the service to which access logs from Envoys should be - // sent. (e.g. accesslog-service:15000). See [Access Log - // Service](https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/accesslog/v2/als.proto) - // for details about Envoy's gRPC Access Log Service API. - EnvoyAccessLogService *RemoteService `protobuf:"bytes,22,opt,name=envoy_access_log_service,json=envoyAccessLogService,proto3" json:"envoyAccessLogService,omitempty"` - // Address of the Envoy Metrics Service implementation (e.g. metrics-service:15000). - // See [Metric Service](https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/metrics/v2/metrics_service.proto) - // for details about Envoy's Metrics Service API. - EnvoyMetricsService *RemoteService `protobuf:"bytes,23,opt,name=envoy_metrics_service,json=envoyMetricsService,proto3" json:"envoyMetricsService,omitempty"` - // $hide_from_docs - // Additional env variables for the proxy. - // Names starting with ISTIO_META_ will be included in the generated bootstrap and sent to the XDS server. - ProxyMetadata map[string]string `protobuf:"bytes,24,rep,name=proxy_metadata,json=proxyMetadata,proto3" json:"proxyMetadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ProxyConfig) Reset() { *m = ProxyConfig{} } -func (m *ProxyConfig) String() string { return proto.CompactTextString(m) } -func (*ProxyConfig) ProtoMessage() {} -func (*ProxyConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_5efecd978cf3d28d, []int{2} -} -func (m *ProxyConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProxyConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProxyConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ProxyConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProxyConfig.Merge(m, src) -} -func (m *ProxyConfig) XXX_Size() int { - return m.Size() -} -func (m *ProxyConfig) XXX_DiscardUnknown() { - xxx_messageInfo_ProxyConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_ProxyConfig proto.InternalMessageInfo - -func (m *ProxyConfig) GetConfigPath() string { - if m != nil { - return m.ConfigPath - } - return "" -} - -func (m *ProxyConfig) GetBinaryPath() string { - if m != nil { - return m.BinaryPath - } - return "" -} - -func (m *ProxyConfig) GetServiceCluster() string { - if m != nil { - return m.ServiceCluster - } - return "" -} - -func (m *ProxyConfig) GetDrainDuration() *types.Duration { - if m != nil { - return m.DrainDuration - } - return nil -} - -func (m *ProxyConfig) GetParentShutdownDuration() *types.Duration { - if m != nil { - return m.ParentShutdownDuration - } - return nil -} - -func (m *ProxyConfig) GetDiscoveryAddress() string { - if m != nil { - return m.DiscoveryAddress - } - return "" -} - -// Deprecated: Do not use. -func (m *ProxyConfig) GetDiscoveryRefreshDelay() *types.Duration { - if m != nil { - return m.DiscoveryRefreshDelay - } - return nil -} - -// Deprecated: Do not use. -func (m *ProxyConfig) GetZipkinAddress() string { - if m != nil { - return m.ZipkinAddress - } - return "" -} - -func (m *ProxyConfig) GetConnectTimeout() *types.Duration { - if m != nil { - return m.ConnectTimeout - } - return nil -} - -func (m *ProxyConfig) GetStatsdUdpAddress() string { - if m != nil { - return m.StatsdUdpAddress - } - return "" -} - -// Deprecated: Do not use. -func (m *ProxyConfig) GetEnvoyMetricsServiceAddress() string { - if m != nil { - return m.EnvoyMetricsServiceAddress - } - return "" -} - -func (m *ProxyConfig) GetProxyAdminPort() int32 { - if m != nil { - return m.ProxyAdminPort - } - return 0 -} - -// Deprecated: Do not use. -func (m *ProxyConfig) GetAvailabilityZone() string { - if m != nil { - return m.AvailabilityZone - } - return "" -} - -func (m *ProxyConfig) GetControlPlaneAuthPolicy() AuthenticationPolicy { - if m != nil { - return m.ControlPlaneAuthPolicy - } - return AuthenticationPolicy_NONE -} - -func (m *ProxyConfig) GetCustomConfigFile() string { - if m != nil { - return m.CustomConfigFile - } - return "" -} - -func (m *ProxyConfig) GetStatNameLength() int32 { - if m != nil { - return m.StatNameLength - } - return 0 -} - -func (m *ProxyConfig) GetConcurrency() int32 { - if m != nil { - return m.Concurrency - } - return 0 -} - -func (m *ProxyConfig) GetProxyBootstrapTemplatePath() string { - if m != nil { - return m.ProxyBootstrapTemplatePath - } - return "" -} - -func (m *ProxyConfig) GetInterceptionMode() ProxyConfig_InboundInterceptionMode { - if m != nil { - return m.InterceptionMode - } - return ProxyConfig_REDIRECT -} - -func (m *ProxyConfig) GetTracing() *Tracing { - if m != nil { - return m.Tracing - } - return nil -} - -func (m *ProxyConfig) GetSds() *SDS { - if m != nil { - return m.Sds - } - return nil -} - -func (m *ProxyConfig) GetEnvoyAccessLogService() *RemoteService { - if m != nil { - return m.EnvoyAccessLogService - } - return nil -} - -func (m *ProxyConfig) GetEnvoyMetricsService() *RemoteService { - if m != nil { - return m.EnvoyMetricsService - } - return nil -} - -func (m *ProxyConfig) GetProxyMetadata() map[string]string { - if m != nil { - return m.ProxyMetadata - } - return nil -} - -type RemoteService struct { - // Address of a remove service used for various purposes (access log - // receiver, metrics receiver, etc.). Can be IP address or a fully - // qualified DNS name. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // Use the tls_settings to specify the tls mode to use. If the remote service - // uses Istio mutual TLS and shares the root CA with Pilot, specify the TLS - // mode as `ISTIO_MUTUAL`. - TlsSettings *v1alpha3.TLSSettings `protobuf:"bytes,2,opt,name=tls_settings,json=tlsSettings,proto3" json:"tlsSettings,omitempty"` - // If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. - TcpKeepalive *v1alpha3.ConnectionPoolSettings_TCPSettings_TcpKeepalive `protobuf:"bytes,3,opt,name=tcp_keepalive,json=tcpKeepalive,proto3" json:"tcpKeepalive,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RemoteService) Reset() { *m = RemoteService{} } -func (m *RemoteService) String() string { return proto.CompactTextString(m) } -func (*RemoteService) ProtoMessage() {} -func (*RemoteService) Descriptor() ([]byte, []int) { - return fileDescriptor_5efecd978cf3d28d, []int{3} -} -func (m *RemoteService) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RemoteService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RemoteService.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RemoteService) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoteService.Merge(m, src) -} -func (m *RemoteService) XXX_Size() int { - return m.Size() -} -func (m *RemoteService) XXX_DiscardUnknown() { - xxx_messageInfo_RemoteService.DiscardUnknown(m) -} - -var xxx_messageInfo_RemoteService proto.InternalMessageInfo - -func (m *RemoteService) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *RemoteService) GetTlsSettings() *v1alpha3.TLSSettings { - if m != nil { - return m.TlsSettings - } - return nil -} - -func (m *RemoteService) GetTcpKeepalive() *v1alpha3.ConnectionPoolSettings_TCPSettings_TcpKeepalive { - if m != nil { - return m.TcpKeepalive - } - return nil -} - -func init() { - proto.RegisterEnum("istio.mesh.v1alpha1.AuthenticationPolicy", AuthenticationPolicy_name, AuthenticationPolicy_value) - proto.RegisterEnum("istio.mesh.v1alpha1.ProxyConfig_InboundInterceptionMode", ProxyConfig_InboundInterceptionMode_name, ProxyConfig_InboundInterceptionMode_value) - proto.RegisterType((*Tracing)(nil), "istio.mesh.v1alpha1.Tracing") - proto.RegisterType((*Tracing_Zipkin)(nil), "istio.mesh.v1alpha1.Tracing.Zipkin") - proto.RegisterType((*Tracing_Lightstep)(nil), "istio.mesh.v1alpha1.Tracing.Lightstep") - proto.RegisterType((*Tracing_Datadog)(nil), "istio.mesh.v1alpha1.Tracing.Datadog") - proto.RegisterType((*Tracing_Stackdriver)(nil), "istio.mesh.v1alpha1.Tracing.Stackdriver") - proto.RegisterType((*SDS)(nil), "istio.mesh.v1alpha1.SDS") - proto.RegisterType((*ProxyConfig)(nil), "istio.mesh.v1alpha1.ProxyConfig") - proto.RegisterMapType((map[string]string)(nil), "istio.mesh.v1alpha1.ProxyConfig.ProxyMetadataEntry") - proto.RegisterType((*RemoteService)(nil), "istio.mesh.v1alpha1.RemoteService") -} - -func init() { proto.RegisterFile("mesh/v1alpha1/proxy.proto", fileDescriptor_5efecd978cf3d28d) } - -var fileDescriptor_5efecd978cf3d28d = []byte{ - // 1346 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xdd, 0x4e, 0x1b, 0x47, - 0x14, 0xc6, 0x90, 0xd8, 0x70, 0x6c, 0x8c, 0x99, 0x04, 0xb2, 0xb8, 0x09, 0xa5, 0xa4, 0x3f, 0x24, - 0xad, 0x6c, 0x25, 0x54, 0x11, 0xaa, 0xd4, 0x2a, 0xfc, 0x45, 0x90, 0x02, 0x41, 0x6b, 0x13, 0xb5, - 0xe4, 0x62, 0x35, 0xde, 0x3d, 0xd8, 0x53, 0xaf, 0x67, 0x56, 0x33, 0xb3, 0x26, 0xce, 0x5d, 0xdf, - 0xa6, 0x57, 0x7d, 0x8e, 0x5c, 0xf6, 0x11, 0xaa, 0x48, 0x95, 0xfa, 0x18, 0xd5, 0xce, 0xec, 0x1a, - 0x27, 0x71, 0x4c, 0xef, 0x76, 0xce, 0x7c, 0xdf, 0xb7, 0x73, 0xbe, 0x39, 0x73, 0x66, 0x60, 0xa5, - 0x87, 0xaa, 0x53, 0xef, 0x3f, 0xa2, 0x61, 0xd4, 0xa1, 0x8f, 0xea, 0x91, 0x14, 0xaf, 0x07, 0xb5, - 0x48, 0x0a, 0x2d, 0xc8, 0x2d, 0xa6, 0x34, 0x13, 0xb5, 0x04, 0x50, 0xcb, 0x00, 0xd5, 0xd5, 0xb6, - 0x10, 0xed, 0x10, 0xeb, 0x06, 0xd2, 0x8a, 0x2f, 0xea, 0x41, 0x2c, 0xa9, 0x66, 0x82, 0x5b, 0xd2, - 0xc7, 0xf3, 0x97, 0x92, 0x46, 0x11, 0x4a, 0x95, 0xce, 0x3f, 0xe4, 0xa8, 0x2f, 0x85, 0xec, 0x32, - 0xde, 0xce, 0xfe, 0xba, 0x59, 0x0f, 0x50, 0x69, 0xc6, 0x8d, 0x8c, 0x27, 0xe3, 0x10, 0x2d, 0x76, - 0xfd, 0x8f, 0x3c, 0x14, 0x9a, 0x92, 0xfa, 0x8c, 0xb7, 0xc9, 0x8f, 0x90, 0x7f, 0xc3, 0xa2, 0x2e, - 0xe3, 0x4e, 0x6e, 0x2d, 0xb7, 0x51, 0x7c, 0x7c, 0xbf, 0x36, 0x66, 0x75, 0xb5, 0x14, 0x5d, 0x3b, - 0x37, 0xd0, 0x83, 0x29, 0x37, 0x25, 0x91, 0x67, 0x30, 0x17, 0xb2, 0x76, 0x47, 0x2b, 0x8d, 0x91, - 0x33, 0x6d, 0x14, 0xbe, 0x9e, 0xa8, 0x70, 0x94, 0xa1, 0x0f, 0xa6, 0xdc, 0x2b, 0x2a, 0x79, 0x0a, - 0x85, 0x80, 0x6a, 0x1a, 0x88, 0xb6, 0x33, 0x63, 0x54, 0xbe, 0x9c, 0xa8, 0xb2, 0x67, 0xb1, 0x07, - 0x53, 0x6e, 0x46, 0x23, 0x47, 0x50, 0x54, 0x9a, 0xfa, 0xdd, 0x40, 0xb2, 0x3e, 0x4a, 0xe7, 0x86, - 0x51, 0xd9, 0x98, 0xa8, 0xd2, 0xb8, 0xc2, 0x1f, 0x4c, 0xb9, 0xa3, 0xf4, 0xea, 0x3a, 0xe4, 0x6d, - 0xae, 0xc4, 0x81, 0x02, 0x0d, 0x02, 0x89, 0x4a, 0x19, 0x87, 0xe6, 0xdc, 0x6c, 0x58, 0xfd, 0x3d, - 0x07, 0x73, 0xc3, 0x74, 0x3e, 0x8d, 0x23, 0x5f, 0x40, 0x89, 0xfa, 0x3e, 0x2a, 0xe5, 0x69, 0xd1, - 0x45, 0x6e, 0x6c, 0x9a, 0x73, 0x8b, 0x36, 0xd6, 0x4c, 0x42, 0x64, 0x19, 0xf2, 0x0a, 0xfd, 0x58, - 0xa2, 0xc9, 0x7e, 0xd6, 0x4d, 0x47, 0xe4, 0x73, 0x28, 0xfa, 0xd4, 0x47, 0xa9, 0xbd, 0x88, 0xea, - 0x8e, 0x49, 0x6a, 0xce, 0x05, 0x1b, 0x3a, 0xa5, 0xba, 0x53, 0xbd, 0x0f, 0x85, 0xd4, 0x8b, 0x09, - 0x0b, 0xfd, 0x73, 0x1a, 0x8a, 0x23, 0xb9, 0x92, 0xdb, 0x70, 0x33, 0xc0, 0x56, 0xdc, 0x36, 0xb8, - 0x59, 0xd7, 0x0e, 0x48, 0x13, 0x9c, 0x1e, 0x7d, 0xed, 0xf1, 0xb8, 0xd7, 0x42, 0xe9, 0x89, 0x0b, - 0x8f, 0x6a, 0x2d, 0x59, 0x2b, 0xd6, 0xa8, 0xd2, 0x9d, 0xfd, 0xac, 0x66, 0x8b, 0xb0, 0x96, 0x15, - 0x61, 0xed, 0x90, 0xeb, 0x27, 0xdf, 0xbf, 0xa4, 0x61, 0x8c, 0xee, 0x52, 0x8f, 0xbe, 0x3e, 0x31, - 0xdc, 0x17, 0x17, 0xdb, 0x43, 0x26, 0x79, 0x09, 0x2b, 0x1f, 0xa8, 0x72, 0x2e, 0xb4, 0x29, 0x49, - 0x95, 0x6e, 0xf5, 0x44, 0xd9, 0xe5, 0x51, 0xd9, 0x2b, 0x2a, 0x79, 0x05, 0x77, 0xdf, 0xd7, 0xed, - 0xa1, 0x52, 0xb4, 0x8d, 0x1e, 0xf6, 0x91, 0x6b, 0x95, 0xee, 0xff, 0x44, 0x69, 0x67, 0x44, 0xfa, - 0xd8, 0xb2, 0xf7, 0x0d, 0x79, 0x67, 0x16, 0xf2, 0x5a, 0x26, 0x26, 0xaf, 0x3f, 0x83, 0x99, 0xc6, - 0x5e, 0x23, 0xf1, 0x16, 0x39, 0x6d, 0x85, 0x18, 0xa4, 0x9e, 0x65, 0x43, 0xf2, 0x15, 0x2c, 0x74, - 0xb7, 0x94, 0xa7, 0xa8, 0xf7, 0xdb, 0x65, 0xba, 0x4b, 0x76, 0x7f, 0x4b, 0xdd, 0x2d, 0xd5, 0xa0, - 0xcf, 0x2f, 0xcd, 0x3e, 0xad, 0xbf, 0x2d, 0x41, 0xf1, 0x34, 0xe9, 0x01, 0xbb, 0x82, 0x5f, 0xb0, - 0xb6, 0xd9, 0x58, 0xf3, 0x65, 0x29, 0xb9, 0x74, 0x63, 0x4d, 0x28, 0x21, 0x24, 0x80, 0x16, 0xe3, - 0x54, 0x0e, 0x46, 0x35, 0xc1, 0x86, 0x0c, 0xe0, 0x1b, 0x58, 0x50, 0x28, 0xfb, 0xcc, 0x47, 0xcf, - 0x0f, 0x63, 0xa5, 0x51, 0x1a, 0x3b, 0xe7, 0xdc, 0x72, 0x1a, 0xde, 0xb5, 0x51, 0xf2, 0x14, 0xca, - 0x81, 0xa4, 0x8c, 0x7b, 0x59, 0x47, 0x49, 0xbd, 0x59, 0xf9, 0xc8, 0x9b, 0xbd, 0x14, 0xe0, 0xce, - 0x1b, 0x42, 0x36, 0x24, 0x0d, 0x70, 0x22, 0x2a, 0x91, 0x6b, 0x4f, 0x75, 0x62, 0x1d, 0x88, 0xcb, - 0x11, 0xad, 0x9b, 0xd7, 0x69, 0x2d, 0x5b, 0x6a, 0x23, 0x65, 0x0e, 0x45, 0xbf, 0x85, 0xc5, 0x80, - 0x29, 0x5f, 0xf4, 0x51, 0x0e, 0xbc, 0xac, 0x70, 0xf3, 0x26, 0x83, 0xca, 0x70, 0x62, 0x3b, 0x3d, - 0x42, 0x67, 0x70, 0xe7, 0x0a, 0x2c, 0xf1, 0x42, 0xa2, 0xea, 0x78, 0x01, 0x86, 0x74, 0xe0, 0x14, - 0xae, 0x59, 0xc0, 0xce, 0xb4, 0x93, 0x73, 0x97, 0x86, 0x6c, 0xd7, 0x92, 0xf7, 0x12, 0x2e, 0x79, - 0x00, 0x65, 0xdb, 0xc7, 0x86, 0x0b, 0x98, 0x4d, 0x16, 0x60, 0x28, 0xf3, 0x76, 0x26, 0x5b, 0xc1, - 0x0e, 0x2c, 0xf8, 0x82, 0x73, 0xf4, 0xb5, 0xa7, 0x59, 0x0f, 0x45, 0xac, 0x9d, 0xb9, 0xeb, 0x52, - 0x2f, 0xa7, 0x8c, 0xa6, 0x25, 0x90, 0xef, 0x80, 0x28, 0x4d, 0xb5, 0x0a, 0xbc, 0x38, 0x88, 0x86, - 0xbf, 0x04, 0x9b, 0xb3, 0x9d, 0x39, 0x0b, 0xa2, 0xec, 0x8f, 0xfb, 0x70, 0x0f, 0x79, 0x5f, 0x0c, - 0xbc, 0x1e, 0x6a, 0xc9, 0x7c, 0xe5, 0x65, 0xdb, 0x9d, 0x11, 0x6f, 0x0f, 0xd7, 0x5a, 0x35, 0xc0, - 0x63, 0x8b, 0x6b, 0x58, 0x58, 0x26, 0xb3, 0x01, 0x15, 0x73, 0xf9, 0x78, 0x34, 0xe8, 0x31, 0xee, - 0x45, 0x42, 0x6a, 0xa7, 0xb8, 0x96, 0xdb, 0xb8, 0xe9, 0x96, 0x4d, 0x7c, 0x3b, 0x09, 0x9f, 0x0a, - 0xa9, 0x49, 0x1d, 0x16, 0x69, 0x9f, 0xb2, 0x90, 0xb6, 0x58, 0xc8, 0xf4, 0xc0, 0x7b, 0x23, 0x38, - 0x3a, 0xa5, 0xe1, 0x4f, 0x2a, 0xa3, 0x93, 0xe7, 0x82, 0x23, 0x09, 0x60, 0xc5, 0x17, 0x5c, 0x4b, - 0x11, 0x7a, 0x51, 0x48, 0x39, 0x7a, 0x34, 0xd6, 0x1d, 0x2f, 0x12, 0x21, 0xf3, 0x07, 0xce, 0xfc, - 0x5a, 0x6e, 0xa3, 0xfc, 0xf8, 0xc1, 0xd8, 0x06, 0xbc, 0x1d, 0xeb, 0x0e, 0x72, 0xcd, 0x7c, 0xe3, - 0xd3, 0xa9, 0x21, 0xb8, 0xcb, 0xa9, 0xd6, 0x69, 0x22, 0x95, 0x20, 0x6c, 0x3c, 0x71, 0xcd, 0x8f, - 0x95, 0x16, 0x3d, 0x2f, 0x3d, 0x31, 0x17, 0x2c, 0x44, 0xa7, 0x6c, 0x5d, 0xb3, 0x33, 0xf6, 0x50, - 0x3d, 0x63, 0x21, 0x26, 0xe9, 0x26, 0x4e, 0x7a, 0x9c, 0xf6, 0xd0, 0x0b, 0x91, 0xb7, 0x75, 0xc7, - 0x59, 0xb0, 0xe9, 0x26, 0xf1, 0x13, 0xda, 0xc3, 0x23, 0x13, 0x25, 0x6b, 0xe6, 0x08, 0xfa, 0xb1, - 0x94, 0xc8, 0xfd, 0x81, 0x53, 0x31, 0xa0, 0xd1, 0x10, 0xd9, 0x86, 0x7b, 0xd6, 0xba, 0x96, 0x10, - 0x5a, 0x69, 0x49, 0x23, 0x4f, 0x63, 0x2f, 0x0a, 0xa9, 0x46, 0x7b, 0x2a, 0x17, 0xcd, 0x22, 0xaa, - 0x06, 0xb4, 0x93, 0x61, 0x9a, 0x29, 0xc4, 0x9c, 0x52, 0x84, 0x45, 0xc6, 0x35, 0x4a, 0x1f, 0x23, - 0x73, 0x0b, 0xf7, 0x44, 0x80, 0x0e, 0x31, 0xd6, 0x6c, 0x8d, 0xb5, 0x66, 0xa4, 0x49, 0xd4, 0x0e, - 0x79, 0x4b, 0xc4, 0x3c, 0x38, 0x1c, 0x11, 0x38, 0x16, 0x01, 0xba, 0x15, 0xf6, 0x41, 0x84, 0x3c, - 0x81, 0x82, 0xb6, 0x97, 0x9a, 0x73, 0xcb, 0x54, 0xe5, 0xdd, 0x49, 0x17, 0x9f, 0x9b, 0x81, 0xc9, - 0x43, 0x98, 0x51, 0x81, 0x72, 0x96, 0x0c, 0xc7, 0x19, 0xcb, 0x69, 0xec, 0x35, 0xdc, 0x04, 0x44, - 0x5e, 0x81, 0x63, 0xeb, 0x31, 0xbd, 0xcc, 0x42, 0xd1, 0xce, 0x4a, 0xd2, 0x59, 0x36, 0x02, 0xeb, - 0x63, 0x05, 0x5c, 0xec, 0x09, 0x8d, 0x69, 0x55, 0xba, 0x4b, 0x46, 0x63, 0xdb, 0x48, 0x1c, 0x89, - 0x76, 0x1a, 0x26, 0x2f, 0x61, 0x69, 0x6c, 0xb1, 0x3b, 0x77, 0xfe, 0xb7, 0xf2, 0xad, 0x31, 0x87, - 0x80, 0x9c, 0x83, 0xad, 0xf2, 0x44, 0x97, 0x26, 0x4f, 0x05, 0xc7, 0x59, 0x9b, 0xd9, 0x28, 0x3e, - 0xde, 0xbc, 0xd6, 0x7c, 0xf3, 0x7d, 0x9c, 0xb2, 0xf6, 0xb9, 0x96, 0x03, 0x77, 0x3e, 0x1a, 0x8d, - 0x55, 0x9f, 0x02, 0xf9, 0x18, 0x44, 0x2a, 0x30, 0xd3, 0xc5, 0x41, 0xda, 0xd1, 0x93, 0xcf, 0xe4, - 0xba, 0xed, 0x27, 0x17, 0x4e, 0xda, 0xc4, 0xed, 0xe0, 0x87, 0xe9, 0xad, 0xdc, 0xfa, 0x26, 0xdc, - 0xf9, 0xc4, 0x1e, 0x93, 0x12, 0xcc, 0xba, 0xfb, 0x7b, 0x87, 0xee, 0xfe, 0x6e, 0xb3, 0x32, 0x45, - 0x00, 0xf2, 0xcd, 0x53, 0xf7, 0xc5, 0x2f, 0xbf, 0x56, 0x72, 0xeb, 0xff, 0xe4, 0x60, 0xfe, 0xbd, - 0xcc, 0x27, 0x3c, 0x3d, 0x0e, 0xa1, 0xa4, 0xc3, 0xc4, 0x4c, 0xad, 0x19, 0x6f, 0xab, 0x0f, 0x5e, - 0x68, 0x57, 0x4f, 0xc6, 0xcc, 0x82, 0xcd, 0x5a, 0xf3, 0xa8, 0xd1, 0x48, 0xd1, 0x6e, 0x51, 0x87, - 0x2a, 0x1b, 0x10, 0x01, 0xf3, 0xda, 0x8f, 0xbc, 0x2e, 0x62, 0x44, 0x43, 0xd6, 0xc7, 0xf4, 0xf2, - 0x7e, 0x3e, 0x41, 0x6b, 0xd7, 0xb6, 0x3f, 0x73, 0xc4, 0x45, 0x98, 0x29, 0xd5, 0x9a, 0xbb, 0xa7, - 0x57, 0xdf, 0x7e, 0xf4, 0x73, 0xa6, 0xe8, 0x96, 0xf4, 0xc8, 0xe8, 0xe1, 0x4f, 0x70, 0x7b, 0x5c, - 0x9f, 0x20, 0xb3, 0x70, 0xe3, 0xe4, 0xc5, 0xc9, 0x7e, 0x65, 0x8a, 0x94, 0x01, 0x8e, 0xcf, 0x9a, - 0x67, 0xdb, 0x47, 0x5e, 0xf3, 0xa8, 0x51, 0xc9, 0x91, 0x12, 0x14, 0x0e, 0x4f, 0x0e, 0xf6, 0xdd, - 0xc3, 0x66, 0xe5, 0xdf, 0xc2, 0xce, 0xc6, 0xdb, 0x77, 0xab, 0xb9, 0xbf, 0xde, 0xad, 0xe6, 0xfe, - 0x7e, 0xb7, 0x9a, 0x3b, 0xaf, 0xda, 0x65, 0x32, 0x51, 0xa7, 0x11, 0xab, 0xbf, 0xf7, 0x38, 0x6f, - 0xe5, 0x4d, 0xeb, 0xde, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xc4, 0xe3, 0x6b, 0xb4, 0x0b, - 0x00, 0x00, -} - -func (m *Tracing) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Tracing) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Tracing) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Tracer != nil { - { - size := m.Tracer.Size() - i -= size - if _, err := m.Tracer.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Tracing_Zipkin_) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *Tracing_Zipkin_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Zipkin != nil { - { - size, err := m.Zipkin.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *Tracing_Lightstep_) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *Tracing_Lightstep_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Lightstep != nil { - { - size, err := m.Lightstep.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *Tracing_Datadog_) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *Tracing_Datadog_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Datadog != nil { - { - size, err := m.Datadog.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *Tracing_Stackdriver_) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *Tracing_Stackdriver_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Stackdriver != nil { - { - size, err := m.Stackdriver.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *Tracing_Zipkin) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Tracing_Zipkin) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Tracing_Zipkin) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintProxy(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Tracing_Lightstep) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Tracing_Lightstep) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Tracing_Lightstep) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.CacertPath) > 0 { - i -= len(m.CacertPath) - copy(dAtA[i:], m.CacertPath) - i = encodeVarintProxy(dAtA, i, uint64(len(m.CacertPath))) - i-- - dAtA[i] = 0x22 - } - if m.Secure { - i-- - if m.Secure { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.AccessToken) > 0 { - i -= len(m.AccessToken) - copy(dAtA[i:], m.AccessToken) - i = encodeVarintProxy(dAtA, i, uint64(len(m.AccessToken))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintProxy(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Tracing_Datadog) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Tracing_Datadog) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Tracing_Datadog) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintProxy(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Tracing_Stackdriver) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Tracing_Stackdriver) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Tracing_Stackdriver) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.MaxNumberOfMessageEvents != nil { - { - size, err := m.MaxNumberOfMessageEvents.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.MaxNumberOfAnnotations != nil { - { - size, err := m.MaxNumberOfAnnotations.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.MaxNumberOfAttributes != nil { - { - size, err := m.MaxNumberOfAttributes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Debug { - i-- - if m.Debug { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SDS) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SDS) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SDS) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.K8SSaJwtPath) > 0 { - i -= len(m.K8SSaJwtPath) - copy(dAtA[i:], m.K8SSaJwtPath) - i = encodeVarintProxy(dAtA, i, uint64(len(m.K8SSaJwtPath))) - i-- - dAtA[i] = 0x12 - } - if m.Enabled { - i-- - if m.Enabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ProxyConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProxyConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProxyConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ProxyMetadata) > 0 { - for k := range m.ProxyMetadata { - v := m.ProxyMetadata[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintProxy(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintProxy(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintProxy(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - } - if m.EnvoyMetricsService != nil { - { - size, err := m.EnvoyMetricsService.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xba - } - if m.EnvoyAccessLogService != nil { - { - size, err := m.EnvoyAccessLogService.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - if m.Sds != nil { - { - size, err := m.Sds.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - if len(m.EnvoyMetricsServiceAddress) > 0 { - i -= len(m.EnvoyMetricsServiceAddress) - copy(dAtA[i:], m.EnvoyMetricsServiceAddress) - i = encodeVarintProxy(dAtA, i, uint64(len(m.EnvoyMetricsServiceAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if m.Tracing != nil { - { - size, err := m.Tracing.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - if m.InterceptionMode != 0 { - i = encodeVarintProxy(dAtA, i, uint64(m.InterceptionMode)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if len(m.ProxyBootstrapTemplatePath) > 0 { - i -= len(m.ProxyBootstrapTemplatePath) - copy(dAtA[i:], m.ProxyBootstrapTemplatePath) - i = encodeVarintProxy(dAtA, i, uint64(len(m.ProxyBootstrapTemplatePath))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if m.Concurrency != 0 { - i = encodeVarintProxy(dAtA, i, uint64(m.Concurrency)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if m.StatNameLength != 0 { - i = encodeVarintProxy(dAtA, i, uint64(m.StatNameLength)) - i-- - dAtA[i] = 0x78 - } - if len(m.CustomConfigFile) > 0 { - i -= len(m.CustomConfigFile) - copy(dAtA[i:], m.CustomConfigFile) - i = encodeVarintProxy(dAtA, i, uint64(len(m.CustomConfigFile))) - i-- - dAtA[i] = 0x72 - } - if m.ControlPlaneAuthPolicy != 0 { - i = encodeVarintProxy(dAtA, i, uint64(m.ControlPlaneAuthPolicy)) - i-- - dAtA[i] = 0x68 - } - if len(m.AvailabilityZone) > 0 { - i -= len(m.AvailabilityZone) - copy(dAtA[i:], m.AvailabilityZone) - i = encodeVarintProxy(dAtA, i, uint64(len(m.AvailabilityZone))) - i-- - dAtA[i] = 0x62 - } - if m.ProxyAdminPort != 0 { - i = encodeVarintProxy(dAtA, i, uint64(m.ProxyAdminPort)) - i-- - dAtA[i] = 0x58 - } - if len(m.StatsdUdpAddress) > 0 { - i -= len(m.StatsdUdpAddress) - copy(dAtA[i:], m.StatsdUdpAddress) - i = encodeVarintProxy(dAtA, i, uint64(len(m.StatsdUdpAddress))) - i-- - dAtA[i] = 0x52 - } - if m.ConnectTimeout != nil { - { - size, err := m.ConnectTimeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if len(m.ZipkinAddress) > 0 { - i -= len(m.ZipkinAddress) - copy(dAtA[i:], m.ZipkinAddress) - i = encodeVarintProxy(dAtA, i, uint64(len(m.ZipkinAddress))) - i-- - dAtA[i] = 0x42 - } - if m.DiscoveryRefreshDelay != nil { - { - size, err := m.DiscoveryRefreshDelay.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if len(m.DiscoveryAddress) > 0 { - i -= len(m.DiscoveryAddress) - copy(dAtA[i:], m.DiscoveryAddress) - i = encodeVarintProxy(dAtA, i, uint64(len(m.DiscoveryAddress))) - i-- - dAtA[i] = 0x32 - } - if m.ParentShutdownDuration != nil { - { - size, err := m.ParentShutdownDuration.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.DrainDuration != nil { - { - size, err := m.DrainDuration.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.ServiceCluster) > 0 { - i -= len(m.ServiceCluster) - copy(dAtA[i:], m.ServiceCluster) - i = encodeVarintProxy(dAtA, i, uint64(len(m.ServiceCluster))) - i-- - dAtA[i] = 0x1a - } - if len(m.BinaryPath) > 0 { - i -= len(m.BinaryPath) - copy(dAtA[i:], m.BinaryPath) - i = encodeVarintProxy(dAtA, i, uint64(len(m.BinaryPath))) - i-- - dAtA[i] = 0x12 - } - if len(m.ConfigPath) > 0 { - i -= len(m.ConfigPath) - copy(dAtA[i:], m.ConfigPath) - i = encodeVarintProxy(dAtA, i, uint64(len(m.ConfigPath))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RemoteService) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RemoteService) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemoteService) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.TcpKeepalive != nil { - { - size, err := m.TcpKeepalive.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.TlsSettings != nil { - { - size, err := m.TlsSettings.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintProxy(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintProxy(dAtA []byte, offset int, v uint64) int { - offset -= sovProxy(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Tracing) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Tracer != nil { - n += m.Tracer.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Tracing_Zipkin_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Zipkin != nil { - l = m.Zipkin.Size() - n += 1 + l + sovProxy(uint64(l)) - } - return n -} -func (m *Tracing_Lightstep_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Lightstep != nil { - l = m.Lightstep.Size() - n += 1 + l + sovProxy(uint64(l)) - } - return n -} -func (m *Tracing_Datadog_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Datadog != nil { - l = m.Datadog.Size() - n += 1 + l + sovProxy(uint64(l)) - } - return n -} -func (m *Tracing_Stackdriver_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Stackdriver != nil { - l = m.Stackdriver.Size() - n += 1 + l + sovProxy(uint64(l)) - } - return n -} -func (m *Tracing_Zipkin) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Tracing_Lightstep) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - l = len(m.AccessToken) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - if m.Secure { - n += 2 - } - l = len(m.CacertPath) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Tracing_Datadog) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Tracing_Stackdriver) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Debug { - n += 2 - } - if m.MaxNumberOfAttributes != nil { - l = m.MaxNumberOfAttributes.Size() - n += 1 + l + sovProxy(uint64(l)) - } - if m.MaxNumberOfAnnotations != nil { - l = m.MaxNumberOfAnnotations.Size() - n += 1 + l + sovProxy(uint64(l)) - } - if m.MaxNumberOfMessageEvents != nil { - l = m.MaxNumberOfMessageEvents.Size() - n += 1 + l + sovProxy(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SDS) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Enabled { - n += 2 - } - l = len(m.K8SSaJwtPath) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ProxyConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ConfigPath) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - l = len(m.BinaryPath) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - l = len(m.ServiceCluster) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - if m.DrainDuration != nil { - l = m.DrainDuration.Size() - n += 1 + l + sovProxy(uint64(l)) - } - if m.ParentShutdownDuration != nil { - l = m.ParentShutdownDuration.Size() - n += 1 + l + sovProxy(uint64(l)) - } - l = len(m.DiscoveryAddress) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - if m.DiscoveryRefreshDelay != nil { - l = m.DiscoveryRefreshDelay.Size() - n += 1 + l + sovProxy(uint64(l)) - } - l = len(m.ZipkinAddress) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - if m.ConnectTimeout != nil { - l = m.ConnectTimeout.Size() - n += 1 + l + sovProxy(uint64(l)) - } - l = len(m.StatsdUdpAddress) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - if m.ProxyAdminPort != 0 { - n += 1 + sovProxy(uint64(m.ProxyAdminPort)) - } - l = len(m.AvailabilityZone) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - if m.ControlPlaneAuthPolicy != 0 { - n += 1 + sovProxy(uint64(m.ControlPlaneAuthPolicy)) - } - l = len(m.CustomConfigFile) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - if m.StatNameLength != 0 { - n += 1 + sovProxy(uint64(m.StatNameLength)) - } - if m.Concurrency != 0 { - n += 2 + sovProxy(uint64(m.Concurrency)) - } - l = len(m.ProxyBootstrapTemplatePath) - if l > 0 { - n += 2 + l + sovProxy(uint64(l)) - } - if m.InterceptionMode != 0 { - n += 2 + sovProxy(uint64(m.InterceptionMode)) - } - if m.Tracing != nil { - l = m.Tracing.Size() - n += 2 + l + sovProxy(uint64(l)) - } - l = len(m.EnvoyMetricsServiceAddress) - if l > 0 { - n += 2 + l + sovProxy(uint64(l)) - } - if m.Sds != nil { - l = m.Sds.Size() - n += 2 + l + sovProxy(uint64(l)) - } - if m.EnvoyAccessLogService != nil { - l = m.EnvoyAccessLogService.Size() - n += 2 + l + sovProxy(uint64(l)) - } - if m.EnvoyMetricsService != nil { - l = m.EnvoyMetricsService.Size() - n += 2 + l + sovProxy(uint64(l)) - } - if len(m.ProxyMetadata) > 0 { - for k, v := range m.ProxyMetadata { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovProxy(uint64(len(k))) + 1 + len(v) + sovProxy(uint64(len(v))) - n += mapEntrySize + 2 + sovProxy(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RemoteService) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovProxy(uint64(l)) - } - if m.TlsSettings != nil { - l = m.TlsSettings.Size() - n += 1 + l + sovProxy(uint64(l)) - } - if m.TcpKeepalive != nil { - l = m.TcpKeepalive.Size() - n += 1 + l + sovProxy(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovProxy(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozProxy(x uint64) (n int) { - return sovProxy(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Tracing) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Tracing: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tracing: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Zipkin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Tracing_Zipkin{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Tracer = &Tracing_Zipkin_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Lightstep", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Tracing_Lightstep{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Tracer = &Tracing_Lightstep_{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Datadog", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Tracing_Datadog{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Tracer = &Tracing_Datadog_{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stackdriver", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Tracing_Stackdriver{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Tracer = &Tracing_Stackdriver_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tracing_Zipkin) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Zipkin: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Zipkin: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tracing_Lightstep) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Lightstep: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Lightstep: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccessToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Secure", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Secure = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CacertPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CacertPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tracing_Datadog) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Datadog: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Datadog: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tracing_Stackdriver) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Stackdriver: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Stackdriver: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Debug", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Debug = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxNumberOfAttributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxNumberOfAttributes == nil { - m.MaxNumberOfAttributes = &types.Int64Value{} - } - if err := m.MaxNumberOfAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxNumberOfAnnotations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxNumberOfAnnotations == nil { - m.MaxNumberOfAnnotations = &types.Int64Value{} - } - if err := m.MaxNumberOfAnnotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxNumberOfMessageEvents", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxNumberOfMessageEvents == nil { - m.MaxNumberOfMessageEvents = &types.Int64Value{} - } - if err := m.MaxNumberOfMessageEvents.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SDS) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SDS: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SDS: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Enabled = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field K8SSaJwtPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.K8SSaJwtPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProxyConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProxyConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProxyConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConfigPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConfigPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BinaryPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BinaryPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceCluster", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceCluster = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DrainDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DrainDuration == nil { - m.DrainDuration = &types.Duration{} - } - if err := m.DrainDuration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentShutdownDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentShutdownDuration == nil { - m.ParentShutdownDuration = &types.Duration{} - } - if err := m.ParentShutdownDuration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DiscoveryAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryRefreshDelay", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DiscoveryRefreshDelay == nil { - m.DiscoveryRefreshDelay = &types.Duration{} - } - if err := m.DiscoveryRefreshDelay.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ZipkinAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ZipkinAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConnectTimeout == nil { - m.ConnectTimeout = &types.Duration{} - } - if err := m.ConnectTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StatsdUdpAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StatsdUdpAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyAdminPort", wireType) - } - m.ProxyAdminPort = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProxyAdminPort |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AvailabilityZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AvailabilityZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ControlPlaneAuthPolicy", wireType) - } - m.ControlPlaneAuthPolicy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ControlPlaneAuthPolicy |= AuthenticationPolicy(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomConfigFile", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CustomConfigFile = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StatNameLength", wireType) - } - m.StatNameLength = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StatNameLength |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Concurrency", wireType) - } - m.Concurrency = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Concurrency |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyBootstrapTemplatePath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProxyBootstrapTemplatePath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InterceptionMode", wireType) - } - m.InterceptionMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InterceptionMode |= ProxyConfig_InboundInterceptionMode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tracing", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tracing == nil { - m.Tracing = &Tracing{} - } - if err := m.Tracing.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnvoyMetricsServiceAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EnvoyMetricsServiceAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Sds == nil { - m.Sds = &SDS{} - } - if err := m.Sds.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnvoyAccessLogService", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EnvoyAccessLogService == nil { - m.EnvoyAccessLogService = &RemoteService{} - } - if err := m.EnvoyAccessLogService.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 23: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnvoyMetricsService", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EnvoyMetricsService == nil { - m.EnvoyMetricsService = &RemoteService{} - } - if err := m.EnvoyMetricsService.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ProxyMetadata == nil { - m.ProxyMetadata = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthProxy - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthProxy - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthProxy - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthProxy - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ProxyMetadata[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RemoteService) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RemoteService: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RemoteService: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TlsSettings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TlsSettings == nil { - m.TlsSettings = &v1alpha3.TLSSettings{} - } - if err := m.TlsSettings.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TcpKeepalive", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TcpKeepalive == nil { - m.TcpKeepalive = &v1alpha3.ConnectionPoolSettings_TCPSettings_TcpKeepalive{} - } - if err := m.TcpKeepalive.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProxy(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProxy - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProxy - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProxy - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthProxy - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthProxy - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProxy - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProxy(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthProxy - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthProxy = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProxy = fmt.Errorf("proto: integer overflow") -) diff --git a/pkg/inject/api/networking/v1alpha3/destination_rule.pb.go b/pkg/inject/api/networking/v1alpha3/destination_rule.pb.go deleted file mode 100644 index d25e5944..00000000 --- a/pkg/inject/api/networking/v1alpha3/destination_rule.pb.go +++ /dev/null @@ -1,6881 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networking/v1alpha3/destination_rule.proto - -// `DestinationRule` defines policies that apply to traffic intended for a -// service after routing has occurred. These rules specify configuration -// for load balancing, connection pool size from the sidecar, and outlier -// detection settings to detect and evict unhealthy hosts from the load -// balancing pool. For example, a simple load balancing policy for the -// ratings service would look as follows: -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// ``` -// {{}} -// {{}} -// -// Version specific policies can be specified by defining a named -// `subset` and overriding the settings specified at the service level. The -// following rule uses a round robin load balancing policy for all traffic -// going to a subset named testversion that is composed of endpoints (e.g., -// pods) with labels (version:v3). -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// subsets: -// - name: testversion -// labels: -// version: v3 -// trafficPolicy: -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// subsets: -// - name: testversion -// labels: -// version: v3 -// trafficPolicy: -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// {{}} -// -// **Note:** Policies specified for subsets will not take effect until -// a route rule explicitly sends traffic to this subset. -// -// Traffic policies can be customized to specific ports as well. The -// following rule uses the least connection load balancing policy for all -// traffic to port 80, while uses a round robin load balancing setting for -// traffic to the port 9080. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings-port -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: # Apply to all ports -// portLevelSettings: -// - port: -// number: 80 -// loadBalancer: -// simple: LEAST_CONN -// - port: -// number: 9080 -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings-port -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: # Apply to all ports -// portLevelSettings: -// - port: -// number: 80 -// loadBalancer: -// simple: LEAST_CONN -// - port: -// number: 9080 -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// {{}} -// - -package v1alpha3 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - types "github.com/gogo/protobuf/types" - io "io" - _ "github.com/polarismesh/polaris-controller/pkg/inject/googleapis/google/api" - math "math" - math_bits "math/bits" - time "time" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Standard load balancing algorithms that require no tuning. -type LoadBalancerSettings_SimpleLB int32 - -const ( - // Round Robin policy. Default - LoadBalancerSettings_ROUND_ROBIN LoadBalancerSettings_SimpleLB = 0 - // The least request load balancer uses an O(1) algorithm which selects - // two random healthy hosts and picks the host which has fewer active - // requests. - LoadBalancerSettings_LEAST_CONN LoadBalancerSettings_SimpleLB = 1 - // The random load balancer selects a random healthy host. The random - // load balancer generally performs better than round robin if no health - // checking policy is configured. - LoadBalancerSettings_RANDOM LoadBalancerSettings_SimpleLB = 2 - // This option will forward the connection to the original IP address - // requested by the caller without doing any form of load - // balancing. This option must be used with care. It is meant for - // advanced use cases. Refer to Original Destination load balancer in - // Envoy for further details. - LoadBalancerSettings_PASSTHROUGH LoadBalancerSettings_SimpleLB = 3 -) - -var LoadBalancerSettings_SimpleLB_name = map[int32]string{ - 0: "ROUND_ROBIN", - 1: "LEAST_CONN", - 2: "RANDOM", - 3: "PASSTHROUGH", -} - -var LoadBalancerSettings_SimpleLB_value = map[string]int32{ - "ROUND_ROBIN": 0, - "LEAST_CONN": 1, - "RANDOM": 2, - "PASSTHROUGH": 3, -} - -func (x LoadBalancerSettings_SimpleLB) String() string { - return proto.EnumName(LoadBalancerSettings_SimpleLB_name, int32(x)) -} - -func (LoadBalancerSettings_SimpleLB) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{3, 0} -} - -// Policy for upgrading http1.1 connections to http2. -type ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy int32 - -const ( - // Use the global default. - ConnectionPoolSettings_HTTPSettings_DEFAULT ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy = 0 - // Do not upgrade the connection to http2. - // This opt-out option overrides the default. - ConnectionPoolSettings_HTTPSettings_DO_NOT_UPGRADE ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy = 1 - // Upgrade the connection to http2. - // This opt-in option overrides the default. - ConnectionPoolSettings_HTTPSettings_UPGRADE ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy = 2 -) - -var ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy_name = map[int32]string{ - 0: "DEFAULT", - 1: "DO_NOT_UPGRADE", - 2: "UPGRADE", -} - -var ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy_value = map[string]int32{ - "DEFAULT": 0, - "DO_NOT_UPGRADE": 1, - "UPGRADE": 2, -} - -func (x ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy) String() string { - return proto.EnumName(ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy_name, int32(x)) -} - -func (ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{4, 1, 0} -} - -// TLS connection mode -type TLSSettings_TLSmode int32 - -const ( - // Do not setup a TLS connection to the upstream endpoint. - TLSSettings_DISABLE TLSSettings_TLSmode = 0 - // Originate a TLS connection to the upstream endpoint. - TLSSettings_SIMPLE TLSSettings_TLSmode = 1 - // Secure connections to the upstream using mutual TLS by presenting - // client certificates for authentication. - TLSSettings_MUTUAL TLSSettings_TLSmode = 2 - // Secure connections to the upstream using mutual TLS by presenting - // client certificates for authentication. - // Compared to Mutual mode, this mode uses certificates generated - // automatically by Istio for mTLS authentication. When this mode is - // used, all other fields in `TLSSettings` should be empty. - TLSSettings_ISTIO_MUTUAL TLSSettings_TLSmode = 3 -) - -var TLSSettings_TLSmode_name = map[int32]string{ - 0: "DISABLE", - 1: "SIMPLE", - 2: "MUTUAL", - 3: "ISTIO_MUTUAL", -} - -var TLSSettings_TLSmode_value = map[string]int32{ - "DISABLE": 0, - "SIMPLE": 1, - "MUTUAL": 2, - "ISTIO_MUTUAL": 3, -} - -func (x TLSSettings_TLSmode) String() string { - return proto.EnumName(TLSSettings_TLSmode_name, int32(x)) -} - -func (TLSSettings_TLSmode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{6, 0} -} - -// DestinationRule defines policies that apply to traffic intended for a service -// after routing has occurred. -// -// -// -// -type DestinationRule struct { - // The name of a service from the service registry. Service - // names are looked up from the platform's service registry (e.g., - // Kubernetes services, Consul services, etc.) and from the hosts - // declared by [ServiceEntries](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Rules defined for - // services that do not exist in the service registry will be ignored. - // - // *Note for Kubernetes users*: When short names are used (e.g. "reviews" - // instead of "reviews.default.svc.cluster.local"), Istio will interpret - // the short name based on the namespace of the rule, not the service. A - // rule in the "default" namespace containing a host "reviews" will be - // interpreted as "reviews.default.svc.cluster.local", irrespective of - // the actual namespace associated with the reviews service. _To avoid - // potential misconfigurations, it is recommended to always use fully - // qualified domain names over short names._ - // - // Note that the host field applies to both HTTP and TCP services. - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - // Traffic policies to apply (load balancing policy, connection pool - // sizes, outlier detection). - TrafficPolicy *TrafficPolicy `protobuf:"bytes,2,opt,name=traffic_policy,json=trafficPolicy,proto3" json:"traffic_policy,omitempty"` - // One or more named sets that represent individual versions of a - // service. Traffic policies can be overridden at subset level. - Subsets []*Subset `protobuf:"bytes,3,rep,name=subsets,proto3" json:"subsets,omitempty"` - // A list of namespaces to which this destination rule is exported. - // The resolution of a destination rule to apply to a service occurs in the - // context of a hierarchy of namespaces. Exporting a destination rule allows - // it to be included in the resolution hierarchy for services in - // other namespaces. This feature provides a mechanism for service owners - // and mesh administrators to control the visibility of destination rules - // across namespace boundaries. - // - // If no namespaces are specified then the destination rule is exported to all - // namespaces by default. - // - // The value "." is reserved and defines an export to the same namespace that - // the destination rule is declared in. Similarly, the value "*" is reserved and - // defines an export to all namespaces. - // - // NOTE: in the current release, the `exportTo` value is restricted to - // "." or "*" (i.e., the current namespace or all namespaces). - ExportTo []string `protobuf:"bytes,4,rep,name=export_to,json=exportTo,proto3" json:"export_to,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DestinationRule) Reset() { *m = DestinationRule{} } -func (m *DestinationRule) String() string { return proto.CompactTextString(m) } -func (*DestinationRule) ProtoMessage() {} -func (*DestinationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{0} -} -func (m *DestinationRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DestinationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DestinationRule.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DestinationRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_DestinationRule.Merge(m, src) -} -func (m *DestinationRule) XXX_Size() int { - return m.Size() -} -func (m *DestinationRule) XXX_DiscardUnknown() { - xxx_messageInfo_DestinationRule.DiscardUnknown(m) -} - -var xxx_messageInfo_DestinationRule proto.InternalMessageInfo - -func (m *DestinationRule) GetHost() string { - if m != nil { - return m.Host - } - return "" -} - -func (m *DestinationRule) GetTrafficPolicy() *TrafficPolicy { - if m != nil { - return m.TrafficPolicy - } - return nil -} - -func (m *DestinationRule) GetSubsets() []*Subset { - if m != nil { - return m.Subsets - } - return nil -} - -func (m *DestinationRule) GetExportTo() []string { - if m != nil { - return m.ExportTo - } - return nil -} - -// Traffic policies to apply for a specific destination, across all -// destination ports. See DestinationRule for examples. -type TrafficPolicy struct { - // Settings controlling the load balancer algorithms. - LoadBalancer *LoadBalancerSettings `protobuf:"bytes,1,opt,name=load_balancer,json=loadBalancer,proto3" json:"load_balancer,omitempty"` - // Settings controlling the volume of connections to an upstream service - ConnectionPool *ConnectionPoolSettings `protobuf:"bytes,2,opt,name=connection_pool,json=connectionPool,proto3" json:"connection_pool,omitempty"` - // Settings controlling eviction of unhealthy hosts from the load balancing pool - OutlierDetection *OutlierDetection `protobuf:"bytes,3,opt,name=outlier_detection,json=outlierDetection,proto3" json:"outlier_detection,omitempty"` - // TLS related settings for connections to the upstream service. - Tls *TLSSettings `protobuf:"bytes,4,opt,name=tls,proto3" json:"tls,omitempty"` - // Traffic policies specific to individual ports. Note that port level - // settings will override the destination-level settings. Traffic - // settings specified at the destination-level will not be inherited when - // overridden by port-level settings, i.e. default values will be applied - // to fields omitted in port-level traffic policies. - PortLevelSettings []*TrafficPolicy_PortTrafficPolicy `protobuf:"bytes,5,rep,name=port_level_settings,json=portLevelSettings,proto3" json:"port_level_settings,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TrafficPolicy) Reset() { *m = TrafficPolicy{} } -func (m *TrafficPolicy) String() string { return proto.CompactTextString(m) } -func (*TrafficPolicy) ProtoMessage() {} -func (*TrafficPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{1} -} -func (m *TrafficPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TrafficPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TrafficPolicy.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TrafficPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_TrafficPolicy.Merge(m, src) -} -func (m *TrafficPolicy) XXX_Size() int { - return m.Size() -} -func (m *TrafficPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_TrafficPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_TrafficPolicy proto.InternalMessageInfo - -func (m *TrafficPolicy) GetLoadBalancer() *LoadBalancerSettings { - if m != nil { - return m.LoadBalancer - } - return nil -} - -func (m *TrafficPolicy) GetConnectionPool() *ConnectionPoolSettings { - if m != nil { - return m.ConnectionPool - } - return nil -} - -func (m *TrafficPolicy) GetOutlierDetection() *OutlierDetection { - if m != nil { - return m.OutlierDetection - } - return nil -} - -func (m *TrafficPolicy) GetTls() *TLSSettings { - if m != nil { - return m.Tls - } - return nil -} - -func (m *TrafficPolicy) GetPortLevelSettings() []*TrafficPolicy_PortTrafficPolicy { - if m != nil { - return m.PortLevelSettings - } - return nil -} - -// Traffic policies that apply to specific ports of the service -type TrafficPolicy_PortTrafficPolicy struct { - // Specifies the number of a port on the destination service - // on which this policy is being applied. - // - Port *PortSelector `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"` - // Settings controlling the load balancer algorithms. - LoadBalancer *LoadBalancerSettings `protobuf:"bytes,2,opt,name=load_balancer,json=loadBalancer,proto3" json:"load_balancer,omitempty"` - // Settings controlling the volume of connections to an upstream service - ConnectionPool *ConnectionPoolSettings `protobuf:"bytes,3,opt,name=connection_pool,json=connectionPool,proto3" json:"connection_pool,omitempty"` - // Settings controlling eviction of unhealthy hosts from the load balancing pool - OutlierDetection *OutlierDetection `protobuf:"bytes,4,opt,name=outlier_detection,json=outlierDetection,proto3" json:"outlier_detection,omitempty"` - // TLS related settings for connections to the upstream service. - Tls *TLSSettings `protobuf:"bytes,5,opt,name=tls,proto3" json:"tls,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TrafficPolicy_PortTrafficPolicy) Reset() { *m = TrafficPolicy_PortTrafficPolicy{} } -func (m *TrafficPolicy_PortTrafficPolicy) String() string { return proto.CompactTextString(m) } -func (*TrafficPolicy_PortTrafficPolicy) ProtoMessage() {} -func (*TrafficPolicy_PortTrafficPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{1, 0} -} -func (m *TrafficPolicy_PortTrafficPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TrafficPolicy_PortTrafficPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TrafficPolicy_PortTrafficPolicy.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TrafficPolicy_PortTrafficPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_TrafficPolicy_PortTrafficPolicy.Merge(m, src) -} -func (m *TrafficPolicy_PortTrafficPolicy) XXX_Size() int { - return m.Size() -} -func (m *TrafficPolicy_PortTrafficPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_TrafficPolicy_PortTrafficPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_TrafficPolicy_PortTrafficPolicy proto.InternalMessageInfo - -func (m *TrafficPolicy_PortTrafficPolicy) GetPort() *PortSelector { - if m != nil { - return m.Port - } - return nil -} - -func (m *TrafficPolicy_PortTrafficPolicy) GetLoadBalancer() *LoadBalancerSettings { - if m != nil { - return m.LoadBalancer - } - return nil -} - -func (m *TrafficPolicy_PortTrafficPolicy) GetConnectionPool() *ConnectionPoolSettings { - if m != nil { - return m.ConnectionPool - } - return nil -} - -func (m *TrafficPolicy_PortTrafficPolicy) GetOutlierDetection() *OutlierDetection { - if m != nil { - return m.OutlierDetection - } - return nil -} - -func (m *TrafficPolicy_PortTrafficPolicy) GetTls() *TLSSettings { - if m != nil { - return m.Tls - } - return nil -} - -// A subset of endpoints of a service. Subsets can be used for scenarios -// like A/B testing, or routing to a specific version of a service. Refer -// to [VirtualService](https://istio.io/docs/reference/config/networking/virtual-service/#VirtualService) documentation for examples of using -// subsets in these scenarios. In addition, traffic policies defined at the -// service-level can be overridden at a subset-level. The following rule -// uses a round robin load balancing policy for all traffic going to a -// subset named testversion that is composed of endpoints (e.g., pods) with -// labels (version:v3). -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// subsets: -// - name: testversion -// labels: -// version: v3 -// trafficPolicy: -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// subsets: -// - name: testversion -// labels: -// version: v3 -// trafficPolicy: -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// {{}} -// -// **Note:** Policies specified for subsets will not take effect until -// a route rule explicitly sends traffic to this subset. -// -// One or more labels are typically required to identify the subset destination, -// however, when the corresponding DestinationRule represents a host that -// supports multiple SNI hosts (e.g., an egress gateway), a subset without labels -// may be meaningful. In this case a traffic policy with [TLSSettings](#TLSSettings) -// can be used to identify a specific SNI host corresponding to the named subset. -type Subset struct { - // Name of the subset. The service name and the subset name can - // be used for traffic splitting in a route rule. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Labels apply a filter over the endpoints of a service in the - // service registry. See route rules for examples of usage. - Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Traffic policies that apply to this subset. Subsets inherit the - // traffic policies specified at the DestinationRule level. Settings - // specified at the subset level will override the corresponding settings - // specified at the DestinationRule level. - TrafficPolicy *TrafficPolicy `protobuf:"bytes,3,opt,name=traffic_policy,json=trafficPolicy,proto3" json:"traffic_policy,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Subset) Reset() { *m = Subset{} } -func (m *Subset) String() string { return proto.CompactTextString(m) } -func (*Subset) ProtoMessage() {} -func (*Subset) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{2} -} -func (m *Subset) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Subset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Subset.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Subset) XXX_Merge(src proto.Message) { - xxx_messageInfo_Subset.Merge(m, src) -} -func (m *Subset) XXX_Size() int { - return m.Size() -} -func (m *Subset) XXX_DiscardUnknown() { - xxx_messageInfo_Subset.DiscardUnknown(m) -} - -var xxx_messageInfo_Subset proto.InternalMessageInfo - -func (m *Subset) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Subset) GetLabels() map[string]string { - if m != nil { - return m.Labels - } - return nil -} - -func (m *Subset) GetTrafficPolicy() *TrafficPolicy { - if m != nil { - return m.TrafficPolicy - } - return nil -} - -// Load balancing policies to apply for a specific destination. See Envoy's -// load balancing -// [documentation](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancing) -// for more details. -// -// For example, the following rule uses a round robin load balancing policy -// for all traffic going to the ratings service. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// {{}} -// -// The following example sets up sticky sessions for the ratings service -// hashing-based load balancer for the same ratings service using the -// the User cookie as the hash key. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// consistentHash: -// httpCookie: -// name: user -// ttl: 0s -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// consistentHash: -// httpCookie: -// name: user -// ttl: 0s -// ``` -// {{}} -// {{}} -// -type LoadBalancerSettings struct { - // Upstream load balancing policy. - // - // Types that are valid to be assigned to LbPolicy: - // *LoadBalancerSettings_Simple - // *LoadBalancerSettings_ConsistentHash - LbPolicy isLoadBalancerSettings_LbPolicy `protobuf_oneof:"lb_policy"` - // Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed - // between this object and the object one in MeshConfig - LocalityLbSetting *LocalityLoadBalancerSetting `protobuf:"bytes,3,opt,name=locality_lb_setting,json=localityLbSetting,proto3" json:"locality_lb_setting,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LoadBalancerSettings) Reset() { *m = LoadBalancerSettings{} } -func (m *LoadBalancerSettings) String() string { return proto.CompactTextString(m) } -func (*LoadBalancerSettings) ProtoMessage() {} -func (*LoadBalancerSettings) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{3} -} -func (m *LoadBalancerSettings) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LoadBalancerSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LoadBalancerSettings.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LoadBalancerSettings) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadBalancerSettings.Merge(m, src) -} -func (m *LoadBalancerSettings) XXX_Size() int { - return m.Size() -} -func (m *LoadBalancerSettings) XXX_DiscardUnknown() { - xxx_messageInfo_LoadBalancerSettings.DiscardUnknown(m) -} - -var xxx_messageInfo_LoadBalancerSettings proto.InternalMessageInfo - -type isLoadBalancerSettings_LbPolicy interface { - isLoadBalancerSettings_LbPolicy() - MarshalTo([]byte) (int, error) - Size() int -} - -type LoadBalancerSettings_Simple struct { - Simple LoadBalancerSettings_SimpleLB `protobuf:"varint,1,opt,name=simple,proto3,enum=istio.networking.v1alpha3.LoadBalancerSettings_SimpleLB,oneof"` -} -type LoadBalancerSettings_ConsistentHash struct { - ConsistentHash *LoadBalancerSettings_ConsistentHashLB `protobuf:"bytes,2,opt,name=consistent_hash,json=consistentHash,proto3,oneof"` -} - -func (*LoadBalancerSettings_Simple) isLoadBalancerSettings_LbPolicy() {} -func (*LoadBalancerSettings_ConsistentHash) isLoadBalancerSettings_LbPolicy() {} - -func (m *LoadBalancerSettings) GetLbPolicy() isLoadBalancerSettings_LbPolicy { - if m != nil { - return m.LbPolicy - } - return nil -} - -func (m *LoadBalancerSettings) GetSimple() LoadBalancerSettings_SimpleLB { - if x, ok := m.GetLbPolicy().(*LoadBalancerSettings_Simple); ok { - return x.Simple - } - return LoadBalancerSettings_ROUND_ROBIN -} - -func (m *LoadBalancerSettings) GetConsistentHash() *LoadBalancerSettings_ConsistentHashLB { - if x, ok := m.GetLbPolicy().(*LoadBalancerSettings_ConsistentHash); ok { - return x.ConsistentHash - } - return nil -} - -func (m *LoadBalancerSettings) GetLocalityLbSetting() *LocalityLoadBalancerSetting { - if m != nil { - return m.LocalityLbSetting - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*LoadBalancerSettings) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*LoadBalancerSettings_Simple)(nil), - (*LoadBalancerSettings_ConsistentHash)(nil), - } -} - -// Consistent Hash-based load balancing can be used to provide soft -// session affinity based on HTTP headers, cookies or other -// properties. This load balancing policy is applicable only for HTTP -// connections. The affinity to a particular destination host will be -// lost when one or more hosts are added/removed from the destination -// service. -type LoadBalancerSettings_ConsistentHashLB struct { - // The hash key to use. - // - // Types that are valid to be assigned to HashKey: - // *LoadBalancerSettings_ConsistentHashLB_HttpHeaderName - // *LoadBalancerSettings_ConsistentHashLB_HttpCookie - // *LoadBalancerSettings_ConsistentHashLB_UseSourceIp - HashKey isLoadBalancerSettings_ConsistentHashLB_HashKey `protobuf_oneof:"hash_key"` - // The minimum number of virtual nodes to use for the hash - // ring. Defaults to 1024. Larger ring sizes result in more granular - // load distributions. If the number of hosts in the load balancing - // pool is larger than the ring size, each host will be assigned a - // single virtual node. - MinimumRingSize uint64 `protobuf:"varint,4,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LoadBalancerSettings_ConsistentHashLB) Reset() { *m = LoadBalancerSettings_ConsistentHashLB{} } -func (m *LoadBalancerSettings_ConsistentHashLB) String() string { return proto.CompactTextString(m) } -func (*LoadBalancerSettings_ConsistentHashLB) ProtoMessage() {} -func (*LoadBalancerSettings_ConsistentHashLB) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{3, 0} -} -func (m *LoadBalancerSettings_ConsistentHashLB) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LoadBalancerSettings_ConsistentHashLB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LoadBalancerSettings_ConsistentHashLB.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LoadBalancerSettings_ConsistentHashLB) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadBalancerSettings_ConsistentHashLB.Merge(m, src) -} -func (m *LoadBalancerSettings_ConsistentHashLB) XXX_Size() int { - return m.Size() -} -func (m *LoadBalancerSettings_ConsistentHashLB) XXX_DiscardUnknown() { - xxx_messageInfo_LoadBalancerSettings_ConsistentHashLB.DiscardUnknown(m) -} - -var xxx_messageInfo_LoadBalancerSettings_ConsistentHashLB proto.InternalMessageInfo - -type isLoadBalancerSettings_ConsistentHashLB_HashKey interface { - isLoadBalancerSettings_ConsistentHashLB_HashKey() - MarshalTo([]byte) (int, error) - Size() int -} - -type LoadBalancerSettings_ConsistentHashLB_HttpHeaderName struct { - HttpHeaderName string `protobuf:"bytes,1,opt,name=http_header_name,json=httpHeaderName,proto3,oneof"` -} -type LoadBalancerSettings_ConsistentHashLB_HttpCookie struct { - HttpCookie *LoadBalancerSettings_ConsistentHashLB_HTTPCookie `protobuf:"bytes,2,opt,name=http_cookie,json=httpCookie,proto3,oneof"` -} -type LoadBalancerSettings_ConsistentHashLB_UseSourceIp struct { - UseSourceIp bool `protobuf:"varint,3,opt,name=use_source_ip,json=useSourceIp,proto3,oneof"` -} - -func (*LoadBalancerSettings_ConsistentHashLB_HttpHeaderName) isLoadBalancerSettings_ConsistentHashLB_HashKey() { -} -func (*LoadBalancerSettings_ConsistentHashLB_HttpCookie) isLoadBalancerSettings_ConsistentHashLB_HashKey() { -} -func (*LoadBalancerSettings_ConsistentHashLB_UseSourceIp) isLoadBalancerSettings_ConsistentHashLB_HashKey() { -} - -func (m *LoadBalancerSettings_ConsistentHashLB) GetHashKey() isLoadBalancerSettings_ConsistentHashLB_HashKey { - if m != nil { - return m.HashKey - } - return nil -} - -func (m *LoadBalancerSettings_ConsistentHashLB) GetHttpHeaderName() string { - if x, ok := m.GetHashKey().(*LoadBalancerSettings_ConsistentHashLB_HttpHeaderName); ok { - return x.HttpHeaderName - } - return "" -} - -func (m *LoadBalancerSettings_ConsistentHashLB) GetHttpCookie() *LoadBalancerSettings_ConsistentHashLB_HTTPCookie { - if x, ok := m.GetHashKey().(*LoadBalancerSettings_ConsistentHashLB_HttpCookie); ok { - return x.HttpCookie - } - return nil -} - -func (m *LoadBalancerSettings_ConsistentHashLB) GetUseSourceIp() bool { - if x, ok := m.GetHashKey().(*LoadBalancerSettings_ConsistentHashLB_UseSourceIp); ok { - return x.UseSourceIp - } - return false -} - -func (m *LoadBalancerSettings_ConsistentHashLB) GetMinimumRingSize() uint64 { - if m != nil { - return m.MinimumRingSize - } - return 0 -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*LoadBalancerSettings_ConsistentHashLB) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*LoadBalancerSettings_ConsistentHashLB_HttpHeaderName)(nil), - (*LoadBalancerSettings_ConsistentHashLB_HttpCookie)(nil), - (*LoadBalancerSettings_ConsistentHashLB_UseSourceIp)(nil), - } -} - -// Describes a HTTP cookie that will be used as the hash key for the -// Consistent Hash load balancer. If the cookie is not present, it will -// be generated. -type LoadBalancerSettings_ConsistentHashLB_HTTPCookie struct { - // Name of the cookie. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Path to set for the cookie. - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - // Lifetime of the cookie. - Ttl *time.Duration `protobuf:"bytes,3,opt,name=ttl,proto3,stdduration" json:"ttl,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Reset() { - *m = LoadBalancerSettings_ConsistentHashLB_HTTPCookie{} -} -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) String() string { - return proto.CompactTextString(m) -} -func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) ProtoMessage() {} -func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{3, 0, 0} -} -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LoadBalancerSettings_ConsistentHashLB_HTTPCookie.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadBalancerSettings_ConsistentHashLB_HTTPCookie.Merge(m, src) -} -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) XXX_Size() int { - return m.Size() -} -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) XXX_DiscardUnknown() { - xxx_messageInfo_LoadBalancerSettings_ConsistentHashLB_HTTPCookie.DiscardUnknown(m) -} - -var xxx_messageInfo_LoadBalancerSettings_ConsistentHashLB_HTTPCookie proto.InternalMessageInfo - -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetTtl() *time.Duration { - if m != nil { - return m.Ttl - } - return nil -} - -// Connection pool settings for an upstream host. The settings apply to -// each individual host in the upstream service. See Envoy's [circuit -// breaker](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/circuit_breaking) -// for more details. Connection pool settings can be applied at the TCP -// level as well as at HTTP level. -// -// For example, the following rule sets a limit of 100 connections to redis -// service called myredissrv with a connect timeout of 30ms -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-redis -// spec: -// host: myredissrv.prod.svc.cluster.local -// trafficPolicy: -// connectionPool: -// tcp: -// maxConnections: 100 -// connectTimeout: 30ms -// tcpKeepalive: -// time: 7200s -// interval: 75s -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-redis -// spec: -// host: myredissrv.prod.svc.cluster.local -// trafficPolicy: -// connectionPool: -// tcp: -// maxConnections: 100 -// connectTimeout: 30ms -// tcpKeepalive: -// time: 7200s -// interval: 75s -// ``` -// {{}} -// {{}} -// -type ConnectionPoolSettings struct { - // Settings common to both HTTP and TCP upstream connections. - Tcp *ConnectionPoolSettings_TCPSettings `protobuf:"bytes,1,opt,name=tcp,proto3" json:"tcp,omitempty"` - // HTTP connection pool settings. - Http *ConnectionPoolSettings_HTTPSettings `protobuf:"bytes,2,opt,name=http,proto3" json:"http,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ConnectionPoolSettings) Reset() { *m = ConnectionPoolSettings{} } -func (m *ConnectionPoolSettings) String() string { return proto.CompactTextString(m) } -func (*ConnectionPoolSettings) ProtoMessage() {} -func (*ConnectionPoolSettings) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{4} -} -func (m *ConnectionPoolSettings) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConnectionPoolSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConnectionPoolSettings.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ConnectionPoolSettings) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConnectionPoolSettings.Merge(m, src) -} -func (m *ConnectionPoolSettings) XXX_Size() int { - return m.Size() -} -func (m *ConnectionPoolSettings) XXX_DiscardUnknown() { - xxx_messageInfo_ConnectionPoolSettings.DiscardUnknown(m) -} - -var xxx_messageInfo_ConnectionPoolSettings proto.InternalMessageInfo - -func (m *ConnectionPoolSettings) GetTcp() *ConnectionPoolSettings_TCPSettings { - if m != nil { - return m.Tcp - } - return nil -} - -func (m *ConnectionPoolSettings) GetHttp() *ConnectionPoolSettings_HTTPSettings { - if m != nil { - return m.Http - } - return nil -} - -// Settings common to both HTTP and TCP upstream connections. -type ConnectionPoolSettings_TCPSettings struct { - // Maximum number of HTTP1 /TCP connections to a destination host. Default 2^32-1. - MaxConnections int32 `protobuf:"varint,1,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"` - // TCP connection timeout. - ConnectTimeout *types.Duration `protobuf:"bytes,2,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` - // If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. - TcpKeepalive *ConnectionPoolSettings_TCPSettings_TcpKeepalive `protobuf:"bytes,3,opt,name=tcp_keepalive,json=tcpKeepalive,proto3" json:"tcp_keepalive,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ConnectionPoolSettings_TCPSettings) Reset() { *m = ConnectionPoolSettings_TCPSettings{} } -func (m *ConnectionPoolSettings_TCPSettings) String() string { return proto.CompactTextString(m) } -func (*ConnectionPoolSettings_TCPSettings) ProtoMessage() {} -func (*ConnectionPoolSettings_TCPSettings) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{4, 0} -} -func (m *ConnectionPoolSettings_TCPSettings) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConnectionPoolSettings_TCPSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConnectionPoolSettings_TCPSettings.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ConnectionPoolSettings_TCPSettings) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConnectionPoolSettings_TCPSettings.Merge(m, src) -} -func (m *ConnectionPoolSettings_TCPSettings) XXX_Size() int { - return m.Size() -} -func (m *ConnectionPoolSettings_TCPSettings) XXX_DiscardUnknown() { - xxx_messageInfo_ConnectionPoolSettings_TCPSettings.DiscardUnknown(m) -} - -var xxx_messageInfo_ConnectionPoolSettings_TCPSettings proto.InternalMessageInfo - -func (m *ConnectionPoolSettings_TCPSettings) GetMaxConnections() int32 { - if m != nil { - return m.MaxConnections - } - return 0 -} - -func (m *ConnectionPoolSettings_TCPSettings) GetConnectTimeout() *types.Duration { - if m != nil { - return m.ConnectTimeout - } - return nil -} - -func (m *ConnectionPoolSettings_TCPSettings) GetTcpKeepalive() *ConnectionPoolSettings_TCPSettings_TcpKeepalive { - if m != nil { - return m.TcpKeepalive - } - return nil -} - -// TCP keepalive. -type ConnectionPoolSettings_TCPSettings_TcpKeepalive struct { - // Maximum number of keepalive probes to send without response before - // deciding the connection is dead. Default is to use the OS level configuration - // (unless overridden, Linux defaults to 9.) - Probes uint32 `protobuf:"varint,1,opt,name=probes,proto3" json:"probes,omitempty"` - // The time duration a connection needs to be idle before keep-alive - // probes start being sent. Default is to use the OS level configuration - // (unless overridden, Linux defaults to 7200s (ie 2 hours.) - Time *types.Duration `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` - // The time duration between keep-alive probes. - // Default is to use the OS level configuration - // (unless overridden, Linux defaults to 75s.) - Interval *types.Duration `protobuf:"bytes,3,opt,name=interval,proto3" json:"interval,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) Reset() { - *m = ConnectionPoolSettings_TCPSettings_TcpKeepalive{} -} -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) String() string { - return proto.CompactTextString(m) -} -func (*ConnectionPoolSettings_TCPSettings_TcpKeepalive) ProtoMessage() {} -func (*ConnectionPoolSettings_TCPSettings_TcpKeepalive) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{4, 0, 0} -} -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConnectionPoolSettings_TCPSettings_TcpKeepalive.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConnectionPoolSettings_TCPSettings_TcpKeepalive.Merge(m, src) -} -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) XXX_Size() int { - return m.Size() -} -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) XXX_DiscardUnknown() { - xxx_messageInfo_ConnectionPoolSettings_TCPSettings_TcpKeepalive.DiscardUnknown(m) -} - -var xxx_messageInfo_ConnectionPoolSettings_TCPSettings_TcpKeepalive proto.InternalMessageInfo - -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) GetProbes() uint32 { - if m != nil { - return m.Probes - } - return 0 -} - -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) GetTime() *types.Duration { - if m != nil { - return m.Time - } - return nil -} - -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) GetInterval() *types.Duration { - if m != nil { - return m.Interval - } - return nil -} - -// Settings applicable to HTTP1.1/HTTP2/GRPC connections. -type ConnectionPoolSettings_HTTPSettings struct { - // Maximum number of pending HTTP requests to a destination. Default 2^32-1. - Http1MaxPendingRequests int32 `protobuf:"varint,1,opt,name=http1_max_pending_requests,json=http1MaxPendingRequests,proto3" json:"http1_max_pending_requests,omitempty"` - // Maximum number of requests to a backend. Default 2^32-1. - Http2MaxRequests int32 `protobuf:"varint,2,opt,name=http2_max_requests,json=http2MaxRequests,proto3" json:"http2_max_requests,omitempty"` - // Maximum number of requests per connection to a backend. Setting this - // parameter to 1 disables keep alive. Default 0, meaning "unlimited", - // up to 2^29. - MaxRequestsPerConnection int32 `protobuf:"varint,3,opt,name=max_requests_per_connection,json=maxRequestsPerConnection,proto3" json:"max_requests_per_connection,omitempty"` - // Maximum number of retries that can be outstanding to all hosts in a - // cluster at a given time. Defaults to 2^32-1. - MaxRetries int32 `protobuf:"varint,4,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"` - // The idle timeout for upstream connection pool connections. The idle timeout is defined as the period in which there are no active requests. - // If not set, the default is 1 hour. When the idle timeout is reached the connection will be closed. - // Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections. - IdleTimeout *types.Duration `protobuf:"bytes,5,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` - // Specify if http1.1 connection should be upgraded to http2 for the associated destination. - H2UpgradePolicy ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy `protobuf:"varint,6,opt,name=h2_upgrade_policy,json=h2UpgradePolicy,proto3,enum=istio.networking.v1alpha3.ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy" json:"h2_upgrade_policy,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ConnectionPoolSettings_HTTPSettings) Reset() { *m = ConnectionPoolSettings_HTTPSettings{} } -func (m *ConnectionPoolSettings_HTTPSettings) String() string { return proto.CompactTextString(m) } -func (*ConnectionPoolSettings_HTTPSettings) ProtoMessage() {} -func (*ConnectionPoolSettings_HTTPSettings) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{4, 1} -} -func (m *ConnectionPoolSettings_HTTPSettings) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConnectionPoolSettings_HTTPSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConnectionPoolSettings_HTTPSettings.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ConnectionPoolSettings_HTTPSettings) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConnectionPoolSettings_HTTPSettings.Merge(m, src) -} -func (m *ConnectionPoolSettings_HTTPSettings) XXX_Size() int { - return m.Size() -} -func (m *ConnectionPoolSettings_HTTPSettings) XXX_DiscardUnknown() { - xxx_messageInfo_ConnectionPoolSettings_HTTPSettings.DiscardUnknown(m) -} - -var xxx_messageInfo_ConnectionPoolSettings_HTTPSettings proto.InternalMessageInfo - -func (m *ConnectionPoolSettings_HTTPSettings) GetHttp1MaxPendingRequests() int32 { - if m != nil { - return m.Http1MaxPendingRequests - } - return 0 -} - -func (m *ConnectionPoolSettings_HTTPSettings) GetHttp2MaxRequests() int32 { - if m != nil { - return m.Http2MaxRequests - } - return 0 -} - -func (m *ConnectionPoolSettings_HTTPSettings) GetMaxRequestsPerConnection() int32 { - if m != nil { - return m.MaxRequestsPerConnection - } - return 0 -} - -func (m *ConnectionPoolSettings_HTTPSettings) GetMaxRetries() int32 { - if m != nil { - return m.MaxRetries - } - return 0 -} - -func (m *ConnectionPoolSettings_HTTPSettings) GetIdleTimeout() *types.Duration { - if m != nil { - return m.IdleTimeout - } - return nil -} - -func (m *ConnectionPoolSettings_HTTPSettings) GetH2UpgradePolicy() ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy { - if m != nil { - return m.H2UpgradePolicy - } - return ConnectionPoolSettings_HTTPSettings_DEFAULT -} - -// A Circuit breaker implementation that tracks the status of each -// individual host in the upstream service. Applicable to both HTTP and -// TCP services. For HTTP services, hosts that continually return 5xx -// errors for API calls are ejected from the pool for a pre-defined period -// of time. For TCP services, connection timeouts or connection -// failures to a given host counts as an error when measuring the -// consecutive errors metric. See Envoy's [outlier -// detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/outlier) -// for more details. -// -// The following rule sets a connection pool size of 100 HTTP1 connections -// with no more than 10 req/connection to the "reviews" service. In addition, -// it sets a limit of 1000 concurrent HTTP2 requests and configures upstream -// hosts to be scanned every 5 mins so that any host that fails 7 consecutive -// times with a 502, 503, or 504 error code will be ejected for 15 minutes. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: reviews-cb-policy -// spec: -// host: reviews.prod.svc.cluster.local -// trafficPolicy: -// connectionPool: -// tcp: -// maxConnections: 100 -// http: -// http2MaxRequests: 1000 -// maxRequestsPerConnection: 10 -// outlierDetection: -// consecutiveErrors: 7 -// interval: 5m -// baseEjectionTime: 15m -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: reviews-cb-policy -// spec: -// host: reviews.prod.svc.cluster.local -// trafficPolicy: -// connectionPool: -// tcp: -// maxConnections: 100 -// http: -// http2MaxRequests: 1000 -// maxRequestsPerConnection: 10 -// outlierDetection: -// consecutiveErrors: 7 -// interval: 5m -// baseEjectionTime: 15m -// ``` -// {{}} -// {{}} -// -type OutlierDetection struct { - // Number of errors before a host is ejected from the connection - // pool. Defaults to 5. When the upstream host is accessed over HTTP, a - // 502, 503, or 504 return code qualifies as an error. When the upstream host - // is accessed over an opaque TCP connection, connect timeouts and - // connection error/failure events qualify as an error. - // $hide_from_docs - ConsecutiveErrors int32 `protobuf:"varint,1,opt,name=consecutive_errors,json=consecutiveErrors,proto3" json:"consecutive_errors,omitempty"` // Deprecated: Do not use. - // Number of gateway errors before a host is ejected from the connection pool. - // When the upstream host is accessed over HTTP, a 502, 503, or 504 return - // code qualifies as a gateway error. When the upstream host is accessed over - // an opaque TCP connection, connect timeouts and connection error/failure - // events qualify as a gateway error. - // This feature is disabled by default or when set to the value 0. - // - // Note that consecutive_gateway_errors and consecutive_5xx_errors can be - // used separately or together. Because the errors counted by - // consecutive_gateway_errors are also included in consecutive_5xx_errors, - // if the value of consecutive_gateway_errors is greater than or equal to - // the value of consecutive_5xx_errors, consecutive_gateway_errors will have - // no effect. - ConsecutiveGatewayErrors *types.UInt32Value `protobuf:"bytes,6,opt,name=consecutive_gateway_errors,json=consecutiveGatewayErrors,proto3" json:"consecutive_gateway_errors,omitempty"` - // Number of 5xx errors before a host is ejected from the connection pool. - // When the upstream host is accessed over an opaque TCP connection, connect - // timeouts, connection error/failure and request failure events qualify as a - // 5xx error. - // This feature defaults to 5 but can be disabled by setting the value to 0. - // - // Note that consecutive_gateway_errors and consecutive_5xx_errors can be - // used separately or together. Because the errors counted by - // consecutive_gateway_errors are also included in consecutive_5xx_errors, - // if the value of consecutive_gateway_errors is greater than or equal to - // the value of consecutive_5xx_errors, consecutive_gateway_errors will have - // no effect. - Consecutive_5XxErrors *types.UInt32Value `protobuf:"bytes,7,opt,name=consecutive_5xx_errors,json=consecutive5xxErrors,proto3" json:"consecutive_5xx_errors,omitempty"` - // Time interval between ejection sweep analysis. format: - // 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s. - Interval *types.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` - // Minimum ejection duration. A host will remain ejected for a period - // equal to the product of minimum ejection duration and the number of - // times the host has been ejected. This technique allows the system to - // automatically increase the ejection period for unhealthy upstream - // servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s. - BaseEjectionTime *types.Duration `protobuf:"bytes,3,opt,name=base_ejection_time,json=baseEjectionTime,proto3" json:"base_ejection_time,omitempty"` - // Maximum % of hosts in the load balancing pool for the upstream - // service that can be ejected. Defaults to 10%. - MaxEjectionPercent int32 `protobuf:"varint,4,opt,name=max_ejection_percent,json=maxEjectionPercent,proto3" json:"max_ejection_percent,omitempty"` - // Outlier detection will be enabled as long as the associated load balancing - // pool has at least min_health_percent hosts in healthy mode. When the - // percentage of healthy hosts in the load balancing pool drops below this - // threshold, outlier detection will be disabled and the proxy will load balance - // across all hosts in the pool (healthy and unhealthy). The threshold can be - // disabled by setting it to 0%. The default is 0% as it's not typically - // applicable in k8s environments with few pods per service. - MinHealthPercent int32 `protobuf:"varint,5,opt,name=min_health_percent,json=minHealthPercent,proto3" json:"min_health_percent,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *OutlierDetection) Reset() { *m = OutlierDetection{} } -func (m *OutlierDetection) String() string { return proto.CompactTextString(m) } -func (*OutlierDetection) ProtoMessage() {} -func (*OutlierDetection) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{5} -} -func (m *OutlierDetection) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OutlierDetection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OutlierDetection.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *OutlierDetection) XXX_Merge(src proto.Message) { - xxx_messageInfo_OutlierDetection.Merge(m, src) -} -func (m *OutlierDetection) XXX_Size() int { - return m.Size() -} -func (m *OutlierDetection) XXX_DiscardUnknown() { - xxx_messageInfo_OutlierDetection.DiscardUnknown(m) -} - -var xxx_messageInfo_OutlierDetection proto.InternalMessageInfo - -// Deprecated: Do not use. -func (m *OutlierDetection) GetConsecutiveErrors() int32 { - if m != nil { - return m.ConsecutiveErrors - } - return 0 -} - -func (m *OutlierDetection) GetConsecutiveGatewayErrors() *types.UInt32Value { - if m != nil { - return m.ConsecutiveGatewayErrors - } - return nil -} - -func (m *OutlierDetection) GetConsecutive_5XxErrors() *types.UInt32Value { - if m != nil { - return m.Consecutive_5XxErrors - } - return nil -} - -func (m *OutlierDetection) GetInterval() *types.Duration { - if m != nil { - return m.Interval - } - return nil -} - -func (m *OutlierDetection) GetBaseEjectionTime() *types.Duration { - if m != nil { - return m.BaseEjectionTime - } - return nil -} - -func (m *OutlierDetection) GetMaxEjectionPercent() int32 { - if m != nil { - return m.MaxEjectionPercent - } - return 0 -} - -func (m *OutlierDetection) GetMinHealthPercent() int32 { - if m != nil { - return m.MinHealthPercent - } - return 0 -} - -// SSL/TLS related settings for upstream connections. See Envoy's [TLS -// context](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/auth/cert.proto.html) -// for more details. These settings are common to both HTTP and TCP upstreams. -// -// For example, the following rule configures a client to use mutual TLS -// for connections to upstream database cluster. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: db-mtls -// spec: -// host: mydbserver.prod.svc.cluster.local -// trafficPolicy: -// tls: -// mode: MUTUAL -// clientCertificate: /etc/certs/myclientcert.pem -// privateKey: /etc/certs/client_private_key.pem -// caCertificates: /etc/certs/rootcacerts.pem -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: db-mtls -// spec: -// host: mydbserver.prod.svc.cluster.local -// trafficPolicy: -// tls: -// mode: MUTUAL -// clientCertificate: /etc/certs/myclientcert.pem -// privateKey: /etc/certs/client_private_key.pem -// caCertificates: /etc/certs/rootcacerts.pem -// ``` -// {{}} -// {{}} -// -// The following rule configures a client to use TLS when talking to a -// foreign service whose domain matches *.foo.com. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: tls-foo -// spec: -// host: "*.foo.com" -// trafficPolicy: -// tls: -// mode: SIMPLE -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: tls-foo -// spec: -// host: "*.foo.com" -// trafficPolicy: -// tls: -// mode: SIMPLE -// ``` -// {{}} -// {{}} -// -// The following rule configures a client to use Istio mutual TLS when talking -// to rating services. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: ratings-istio-mtls -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// tls: -// mode: ISTIO_MUTUAL -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: ratings-istio-mtls -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// tls: -// mode: ISTIO_MUTUAL -// ``` -// {{}} -// {{}} -// -type TLSSettings struct { - // Indicates whether connections to this port should be secured - // using TLS. The value of this field determines how TLS is enforced. - Mode TLSSettings_TLSmode `protobuf:"varint,1,opt,name=mode,proto3,enum=istio.networking.v1alpha3.TLSSettings_TLSmode" json:"mode,omitempty"` - // REQUIRED if mode is `MUTUAL`. The path to the file holding the - // client-side TLS certificate to use. - // Should be empty if mode is `ISTIO_MUTUAL`. - ClientCertificate string `protobuf:"bytes,2,opt,name=client_certificate,json=clientCertificate,proto3" json:"client_certificate,omitempty"` - // REQUIRED if mode is `MUTUAL`. The path to the file holding the - // client's private key. - // Should be empty if mode is `ISTIO_MUTUAL`. - PrivateKey string `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` - // OPTIONAL: The path to the file containing certificate authority - // certificates to use in verifying a presented server certificate. If - // omitted, the proxy will not verify the server's certificate. - // Should be empty if mode is `ISTIO_MUTUAL`. - CaCertificates string `protobuf:"bytes,4,opt,name=ca_certificates,json=caCertificates,proto3" json:"ca_certificates,omitempty"` - // A list of alternate names to verify the subject identity in the - // certificate. If specified, the proxy will verify that the server - // certificate's subject alt name matches one of the specified values. - // If specified, this list overrides the value of subject_alt_names - // from the ServiceEntry. - SubjectAltNames []string `protobuf:"bytes,5,rep,name=subject_alt_names,json=subjectAltNames,proto3" json:"subject_alt_names,omitempty"` - // SNI string to present to the server during TLS handshake. - Sni string `protobuf:"bytes,6,opt,name=sni,proto3" json:"sni,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TLSSettings) Reset() { *m = TLSSettings{} } -func (m *TLSSettings) String() string { return proto.CompactTextString(m) } -func (*TLSSettings) ProtoMessage() {} -func (*TLSSettings) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{6} -} -func (m *TLSSettings) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TLSSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TLSSettings.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TLSSettings) XXX_Merge(src proto.Message) { - xxx_messageInfo_TLSSettings.Merge(m, src) -} -func (m *TLSSettings) XXX_Size() int { - return m.Size() -} -func (m *TLSSettings) XXX_DiscardUnknown() { - xxx_messageInfo_TLSSettings.DiscardUnknown(m) -} - -var xxx_messageInfo_TLSSettings proto.InternalMessageInfo - -func (m *TLSSettings) GetMode() TLSSettings_TLSmode { - if m != nil { - return m.Mode - } - return TLSSettings_DISABLE -} - -func (m *TLSSettings) GetClientCertificate() string { - if m != nil { - return m.ClientCertificate - } - return "" -} - -func (m *TLSSettings) GetPrivateKey() string { - if m != nil { - return m.PrivateKey - } - return "" -} - -func (m *TLSSettings) GetCaCertificates() string { - if m != nil { - return m.CaCertificates - } - return "" -} - -func (m *TLSSettings) GetSubjectAltNames() []string { - if m != nil { - return m.SubjectAltNames - } - return nil -} - -func (m *TLSSettings) GetSni() string { - if m != nil { - return m.Sni - } - return "" -} - -// Locality-weighted load balancing allows administrators to control the -// distribution of traffic to endpoints based on the localities of where the -// traffic originates and where it will terminate. These localities are -// specified using arbitrary labels that designate a hierarchy of localities in -// {region}/{zone}/{sub-zone} form. For additional detail refer to -// [Locality Weight](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight) -// The following example shows how to setup locality weights mesh-wide. -// -// Given a mesh with workloads and their service deployed to "us-west/zone1/*" -// and "us-west/zone2/*". This example specifies that when traffic accessing a -// service originates from workloads in "us-west/zone1/*", 80% of the traffic -// will be sent to endpoints in "us-west/zone1/*", i.e the same zone, and the -// remaining 20% will go to endpoints in "us-west/zone2/*". This setup is -// intended to favor routing traffic to endpoints in the same locality. -// A similar setting is specified for traffic originating in "us-west/zone2/*". -// -// ```yaml -// distribute: -// - from: us-west/zone1/* -// to: -// "us-west/zone1/*": 80 -// "us-west/zone2/*": 20 -// - from: us-west/zone2/* -// to: -// "us-west/zone1/*": 20 -// "us-west/zone2/*": 80 -// ``` -// -// If the goal of the operator is not to distribute load across zones and -// regions but rather to restrict the regionality of failover to meet other -// operational requirements an operator can set a 'failover' policy instead of -// a 'distribute' policy. -// -// The following example sets up a locality failover policy for regions. -// Assume a service resides in zones within us-east, us-west & eu-west -// this example specifies that when endpoints within us-east become unhealthy -// traffic should failover to endpoints in any zone or sub-zone within eu-west -// and similarly us-west should failover to us-east. -// -// ```yaml -// failover: -// - from: us-east -// to: eu-west -// - from: us-west -// to: us-east -// ``` -// Locality load balancing settings. -type LocalityLoadBalancerSetting struct { - // Optional: only one of distribute or failover can be set. - // Explicitly specify loadbalancing weight across different zones and geographical locations. - // Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight) - // If empty, the locality weight is set according to the endpoints number within it. - Distribute []*LocalityLoadBalancerSetting_Distribute `protobuf:"bytes,1,rep,name=distribute,proto3" json:"distribute,omitempty"` - // Optional: only failover or distribute can be set. - // Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy. - // Should be used together with OutlierDetection to detect unhealthy endpoints. - // Note: if no OutlierDetection specified, this will not take effect. - Failover []*LocalityLoadBalancerSetting_Failover `protobuf:"bytes,2,rep,name=failover,proto3" json:"failover,omitempty"` - // enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. - // e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is. - Enabled *types.BoolValue `protobuf:"bytes,3,opt,name=enabled,proto3" json:"enabled,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LocalityLoadBalancerSetting) Reset() { *m = LocalityLoadBalancerSetting{} } -func (m *LocalityLoadBalancerSetting) String() string { return proto.CompactTextString(m) } -func (*LocalityLoadBalancerSetting) ProtoMessage() {} -func (*LocalityLoadBalancerSetting) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{7} -} -func (m *LocalityLoadBalancerSetting) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalityLoadBalancerSetting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LocalityLoadBalancerSetting.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LocalityLoadBalancerSetting) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalityLoadBalancerSetting.Merge(m, src) -} -func (m *LocalityLoadBalancerSetting) XXX_Size() int { - return m.Size() -} -func (m *LocalityLoadBalancerSetting) XXX_DiscardUnknown() { - xxx_messageInfo_LocalityLoadBalancerSetting.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalityLoadBalancerSetting proto.InternalMessageInfo - -func (m *LocalityLoadBalancerSetting) GetDistribute() []*LocalityLoadBalancerSetting_Distribute { - if m != nil { - return m.Distribute - } - return nil -} - -func (m *LocalityLoadBalancerSetting) GetFailover() []*LocalityLoadBalancerSetting_Failover { - if m != nil { - return m.Failover - } - return nil -} - -func (m *LocalityLoadBalancerSetting) GetEnabled() *types.BoolValue { - if m != nil { - return m.Enabled - } - return nil -} - -// Describes how traffic originating in the 'from' zone or sub-zone is -// distributed over a set of 'to' zones. Syntax for specifying a zone is -// {region}/{zone}/{sub-zone} and terminal wildcards are allowed on any -// segment of the specification. Examples: -// * - matches all localities -// us-west/* - all zones and sub-zones within the us-west region -// us-west/zone-1/* - all sub-zones within us-west/zone-1 -type LocalityLoadBalancerSetting_Distribute struct { - // Originating locality, '/' separated, e.g. 'region/zone/sub_zone'. - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - // Map of upstream localities to traffic distribution weights. The sum of - // all weights should be == 100. Any locality not assigned a weight will - // receive no traffic. - To map[string]uint32 `protobuf:"bytes,2,rep,name=to,proto3" json:"to,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LocalityLoadBalancerSetting_Distribute) Reset() { - *m = LocalityLoadBalancerSetting_Distribute{} -} -func (m *LocalityLoadBalancerSetting_Distribute) String() string { return proto.CompactTextString(m) } -func (*LocalityLoadBalancerSetting_Distribute) ProtoMessage() {} -func (*LocalityLoadBalancerSetting_Distribute) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{7, 0} -} -func (m *LocalityLoadBalancerSetting_Distribute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalityLoadBalancerSetting_Distribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LocalityLoadBalancerSetting_Distribute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LocalityLoadBalancerSetting_Distribute) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalityLoadBalancerSetting_Distribute.Merge(m, src) -} -func (m *LocalityLoadBalancerSetting_Distribute) XXX_Size() int { - return m.Size() -} -func (m *LocalityLoadBalancerSetting_Distribute) XXX_DiscardUnknown() { - xxx_messageInfo_LocalityLoadBalancerSetting_Distribute.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalityLoadBalancerSetting_Distribute proto.InternalMessageInfo - -func (m *LocalityLoadBalancerSetting_Distribute) GetFrom() string { - if m != nil { - return m.From - } - return "" -} - -func (m *LocalityLoadBalancerSetting_Distribute) GetTo() map[string]uint32 { - if m != nil { - return m.To - } - return nil -} - -// Specify the traffic failover policy across regions. Since zone and sub-zone -// failover is supported by default this only needs to be specified for -// regions when the operator needs to constrain traffic failover so that -// the default behavior of failing over to any endpoint globally does not -// apply. This is useful when failing over traffic across regions would not -// improve service health or may need to be restricted for other reasons -// like regulatory controls. -type LocalityLoadBalancerSetting_Failover struct { - // Originating region. - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - // Destination region the traffic will fail over to when endpoints in - // the 'from' region becomes unhealthy. - To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LocalityLoadBalancerSetting_Failover) Reset() { *m = LocalityLoadBalancerSetting_Failover{} } -func (m *LocalityLoadBalancerSetting_Failover) String() string { return proto.CompactTextString(m) } -func (*LocalityLoadBalancerSetting_Failover) ProtoMessage() {} -func (*LocalityLoadBalancerSetting_Failover) Descriptor() ([]byte, []int) { - return fileDescriptor_12899beb695152c8, []int{7, 1} -} -func (m *LocalityLoadBalancerSetting_Failover) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalityLoadBalancerSetting_Failover) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LocalityLoadBalancerSetting_Failover.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LocalityLoadBalancerSetting_Failover) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalityLoadBalancerSetting_Failover.Merge(m, src) -} -func (m *LocalityLoadBalancerSetting_Failover) XXX_Size() int { - return m.Size() -} -func (m *LocalityLoadBalancerSetting_Failover) XXX_DiscardUnknown() { - xxx_messageInfo_LocalityLoadBalancerSetting_Failover.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalityLoadBalancerSetting_Failover proto.InternalMessageInfo - -func (m *LocalityLoadBalancerSetting_Failover) GetFrom() string { - if m != nil { - return m.From - } - return "" -} - -func (m *LocalityLoadBalancerSetting_Failover) GetTo() string { - if m != nil { - return m.To - } - return "" -} - -func init() { - proto.RegisterEnum("istio.networking.v1alpha3.LoadBalancerSettings_SimpleLB", LoadBalancerSettings_SimpleLB_name, LoadBalancerSettings_SimpleLB_value) - proto.RegisterEnum("istio.networking.v1alpha3.ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy", ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy_name, ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy_value) - proto.RegisterEnum("istio.networking.v1alpha3.TLSSettings_TLSmode", TLSSettings_TLSmode_name, TLSSettings_TLSmode_value) - proto.RegisterType((*DestinationRule)(nil), "istio.networking.v1alpha3.DestinationRule") - proto.RegisterType((*TrafficPolicy)(nil), "istio.networking.v1alpha3.TrafficPolicy") - proto.RegisterType((*TrafficPolicy_PortTrafficPolicy)(nil), "istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy") - proto.RegisterType((*Subset)(nil), "istio.networking.v1alpha3.Subset") - proto.RegisterMapType((map[string]string)(nil), "istio.networking.v1alpha3.Subset.LabelsEntry") - proto.RegisterType((*LoadBalancerSettings)(nil), "istio.networking.v1alpha3.LoadBalancerSettings") - proto.RegisterType((*LoadBalancerSettings_ConsistentHashLB)(nil), "istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB") - proto.RegisterType((*LoadBalancerSettings_ConsistentHashLB_HTTPCookie)(nil), "istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie") - proto.RegisterType((*ConnectionPoolSettings)(nil), "istio.networking.v1alpha3.ConnectionPoolSettings") - proto.RegisterType((*ConnectionPoolSettings_TCPSettings)(nil), "istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings") - proto.RegisterType((*ConnectionPoolSettings_TCPSettings_TcpKeepalive)(nil), "istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive") - proto.RegisterType((*ConnectionPoolSettings_HTTPSettings)(nil), "istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings") - proto.RegisterType((*OutlierDetection)(nil), "istio.networking.v1alpha3.OutlierDetection") - proto.RegisterType((*TLSSettings)(nil), "istio.networking.v1alpha3.TLSSettings") - proto.RegisterType((*LocalityLoadBalancerSetting)(nil), "istio.networking.v1alpha3.LocalityLoadBalancerSetting") - proto.RegisterType((*LocalityLoadBalancerSetting_Distribute)(nil), "istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute") - proto.RegisterMapType((map[string]uint32)(nil), "istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry") - proto.RegisterType((*LocalityLoadBalancerSetting_Failover)(nil), "istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover") -} - -func init() { - proto.RegisterFile("networking/v1alpha3/destination_rule.proto", fileDescriptor_12899beb695152c8) -} - -var fileDescriptor_12899beb695152c8 = []byte{ - // 1756 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x73, 0x1b, 0x49, - 0x15, 0xb7, 0x34, 0xb2, 0x6c, 0x3d, 0xd9, 0xb2, 0xdc, 0xeb, 0xca, 0x6a, 0x15, 0x2a, 0x31, 0x2a, - 0x8a, 0x35, 0x81, 0x8c, 0x89, 0xb2, 0xa1, 0xc2, 0x86, 0x65, 0x57, 0xb2, 0xb4, 0x96, 0x89, 0x6c, - 0xa9, 0x5a, 0x32, 0x05, 0xe1, 0x30, 0xd5, 0x1a, 0xb5, 0xa5, 0x5e, 0x8f, 0xa6, 0x87, 0x99, 0x1e, - 0x45, 0xce, 0x67, 0xe0, 0xc2, 0x65, 0x8b, 0xcf, 0xc1, 0xa7, 0xe0, 0x06, 0x07, 0xf6, 0xc2, 0x85, - 0x54, 0x3e, 0x03, 0x07, 0x8a, 0x2a, 0xaa, 0xa8, 0xee, 0xe9, 0x91, 0xc6, 0x89, 0xe3, 0x3f, 0x6b, - 0xf6, 0xd6, 0xfd, 0xfe, 0xfc, 0xba, 0xfb, 0xf5, 0xef, 0xbd, 0x7e, 0x33, 0xf0, 0xc0, 0xa5, 0xe2, - 0x25, 0xf7, 0x4f, 0x99, 0x3b, 0xda, 0x9d, 0x3e, 0x22, 0x8e, 0x37, 0x26, 0x8f, 0x77, 0x87, 0x34, - 0x10, 0xcc, 0x25, 0x82, 0x71, 0xd7, 0xf2, 0x43, 0x87, 0x9a, 0x9e, 0xcf, 0x05, 0x47, 0x1f, 0xb1, - 0x40, 0x30, 0x6e, 0x2e, 0x3c, 0xcc, 0xd8, 0xa3, 0x7c, 0x7f, 0xc4, 0xf9, 0xc8, 0xa1, 0xbb, 0xc4, - 0x63, 0xbb, 0x27, 0x8c, 0x3a, 0x43, 0x6b, 0x40, 0xc7, 0x64, 0xca, 0xb8, 0x1f, 0xf9, 0x96, 0xef, - 0x69, 0x03, 0x35, 0x1b, 0x84, 0x27, 0xbb, 0xc3, 0xd0, 0x57, 0x0b, 0xbc, 0x4f, 0xff, 0xd2, 0x27, - 0x9e, 0x47, 0xfd, 0x40, 0xeb, 0x7f, 0x74, 0xd1, 0x3e, 0xa7, 0xcc, 0x17, 0x21, 0x71, 0xac, 0x80, - 0xfa, 0x53, 0x66, 0xeb, 0x6d, 0x96, 0xb7, 0x46, 0x7c, 0xc4, 0xd5, 0x70, 0x57, 0x8e, 0x22, 0x69, - 0xe5, 0x9b, 0x14, 0x6c, 0x34, 0x16, 0xe7, 0xc2, 0xa1, 0x43, 0xd1, 0x87, 0x90, 0x19, 0xf3, 0x40, - 0x94, 0x52, 0xdb, 0xa9, 0x9d, 0x5c, 0xdd, 0x78, 0x5d, 0x4b, 0x63, 0x25, 0x40, 0x1d, 0x28, 0x08, - 0x9f, 0x9c, 0x9c, 0x30, 0xdb, 0xf2, 0xb8, 0xc3, 0xec, 0xb3, 0x52, 0x7a, 0x3b, 0xb5, 0x93, 0xaf, - 0xee, 0x98, 0xef, 0x0d, 0x81, 0xd9, 0x8f, 0x1c, 0xba, 0xca, 0x1e, 0xaf, 0x8b, 0xe4, 0x14, 0x3d, - 0x83, 0x95, 0x20, 0x1c, 0x04, 0x54, 0x04, 0x25, 0x63, 0xdb, 0xd8, 0xc9, 0x57, 0xbf, 0x7f, 0x09, - 0x52, 0x4f, 0x59, 0xe2, 0xd8, 0x03, 0xdd, 0x85, 0x1c, 0x9d, 0x79, 0xdc, 0x17, 0x96, 0xe0, 0xa5, - 0xcc, 0xb6, 0xb1, 0x93, 0xc3, 0xab, 0x91, 0xa0, 0xcf, 0x2b, 0xff, 0xc8, 0xc2, 0xfa, 0xb9, 0xa5, - 0x51, 0x1f, 0xd6, 0x1d, 0x4e, 0x86, 0xd6, 0x80, 0x38, 0xc4, 0xb5, 0xa9, 0xaf, 0x8e, 0x97, 0xaf, - 0xee, 0x5e, 0xb2, 0x62, 0x9b, 0x93, 0x61, 0x5d, 0x9b, 0xf7, 0xa8, 0x10, 0xcc, 0x1d, 0x05, 0x78, - 0xcd, 0x49, 0x48, 0xd1, 0x0b, 0xd8, 0xb0, 0xb9, 0xeb, 0x52, 0x5b, 0xb1, 0xc2, 0xe3, 0xdc, 0xd1, - 0x31, 0x79, 0x74, 0x09, 0xee, 0xde, 0xdc, 0xa3, 0xcb, 0xb9, 0x33, 0x47, 0x2e, 0xd8, 0xe7, 0xe4, - 0xe8, 0x37, 0xb0, 0xc9, 0x43, 0xe1, 0x30, 0xea, 0x5b, 0x43, 0x2a, 0x22, 0x45, 0xc9, 0x50, 0xe8, - 0x3f, 0xbe, 0x04, 0xbd, 0x13, 0xf9, 0x34, 0x62, 0x17, 0x5c, 0xe4, 0x6f, 0x49, 0xd0, 0x53, 0x30, - 0x84, 0x13, 0x94, 0x32, 0x0a, 0xeb, 0x87, 0x97, 0xdd, 0x5e, 0xbb, 0x37, 0xdf, 0x9e, 0x74, 0x41, - 0x5f, 0xc1, 0x07, 0x2a, 0xe4, 0x0e, 0x9d, 0x52, 0xc9, 0xb0, 0x48, 0x57, 0x5a, 0x56, 0xb7, 0xf7, - 0xe9, 0x75, 0x79, 0x60, 0x76, 0xe5, 0x2d, 0x9d, 0x63, 0xc6, 0xa6, 0x84, 0x6d, 0x4b, 0xd4, 0x78, - 0xc1, 0xf2, 0xd7, 0x06, 0x6c, 0xbe, 0x63, 0x88, 0x9e, 0x41, 0x46, 0x9a, 0xea, 0xeb, 0xfb, 0xf8, - 0x92, 0x25, 0xa5, 0x6f, 0x8f, 0x3a, 0xd4, 0x16, 0xdc, 0xc7, 0xca, 0xe9, 0x5d, 0x12, 0xa4, 0xbf, - 0x23, 0x12, 0x18, 0xdf, 0x29, 0x09, 0x32, 0xff, 0x47, 0x12, 0x2c, 0xdf, 0x98, 0x04, 0x95, 0x7f, - 0xa5, 0x20, 0x1b, 0x65, 0xa3, 0xac, 0x15, 0x2e, 0x99, 0xd0, 0x73, 0xb5, 0x42, 0x0a, 0x50, 0x13, - 0xb2, 0x0e, 0x19, 0x50, 0x27, 0x28, 0xa5, 0x15, 0x37, 0x1e, 0x5e, 0x99, 0xd9, 0x66, 0x5b, 0xd9, - 0x37, 0x5d, 0xe1, 0x9f, 0x61, 0xed, 0x7c, 0x41, 0xc9, 0x31, 0x6e, 0x55, 0x72, 0xca, 0x3f, 0x87, - 0x7c, 0x62, 0x1d, 0x54, 0x04, 0xe3, 0x94, 0x9e, 0x45, 0xdb, 0xc7, 0x72, 0x88, 0xb6, 0x60, 0x79, - 0x4a, 0x9c, 0x90, 0x2a, 0x6a, 0xe4, 0x70, 0x34, 0xf9, 0x34, 0xfd, 0x34, 0x55, 0xf9, 0x3a, 0x0b, - 0x5b, 0x17, 0xb1, 0x01, 0x61, 0xc8, 0x06, 0x6c, 0xe2, 0x39, 0x51, 0x18, 0x0a, 0xd5, 0xa7, 0x37, - 0xa4, 0x93, 0xd9, 0x53, 0xde, 0xed, 0x7a, 0x6b, 0x09, 0x6b, 0x24, 0x74, 0xaa, 0x38, 0x15, 0xb0, - 0x40, 0x50, 0x57, 0x58, 0x63, 0x12, 0x8c, 0x35, 0x57, 0xbf, 0xb8, 0x29, 0xf8, 0xde, 0x1c, 0xa6, - 0x45, 0x82, 0xb1, 0x5a, 0xa4, 0x60, 0x9f, 0x93, 0xa1, 0x13, 0xf8, 0xc0, 0xe1, 0x36, 0x71, 0x98, - 0x38, 0xb3, 0x9c, 0x41, 0x9c, 0xd6, 0x3a, 0xd4, 0x3f, 0xbb, 0x74, 0xc1, 0xc8, 0xeb, 0x82, 0x85, - 0xf1, 0x66, 0x0c, 0xd9, 0x1e, 0x68, 0x51, 0xf9, 0xbf, 0x69, 0x28, 0xbe, 0xbd, 0x1d, 0xf4, 0x00, - 0x8a, 0x63, 0x21, 0x3c, 0x6b, 0x4c, 0xc9, 0x90, 0xfa, 0xd6, 0x82, 0x4e, 0x72, 0xa3, 0x52, 0xd3, - 0x52, 0x8a, 0x23, 0xc9, 0x2a, 0x17, 0xf2, 0xca, 0xd6, 0xe6, 0xfc, 0x94, 0x51, 0x1d, 0x91, 0xe7, - 0xb7, 0x8d, 0x88, 0xd9, 0xea, 0xf7, 0xbb, 0x7b, 0x0a, 0xb2, 0xb5, 0x84, 0x41, 0xae, 0x10, 0xcd, - 0xd0, 0x0f, 0x60, 0x3d, 0x0c, 0xa8, 0x15, 0xf0, 0xd0, 0xb7, 0xa9, 0xc5, 0x3c, 0x15, 0x92, 0xd5, - 0xd6, 0x12, 0xce, 0x87, 0x01, 0xed, 0x29, 0xe9, 0x81, 0x87, 0x1e, 0xc0, 0xe6, 0x84, 0xb9, 0x6c, - 0x12, 0x4e, 0x2c, 0x9f, 0xb9, 0x23, 0x2b, 0x60, 0xaf, 0xa8, 0xca, 0xd1, 0x0c, 0xde, 0xd0, 0x0a, - 0xcc, 0xdc, 0x51, 0x8f, 0xbd, 0xa2, 0x65, 0x0e, 0xb0, 0x58, 0xed, 0xfd, 0xe9, 0x83, 0x20, 0xe3, - 0x11, 0x31, 0xd6, 0x24, 0x54, 0x63, 0xf4, 0x09, 0x18, 0x42, 0xc4, 0xa5, 0xe5, 0x23, 0x33, 0x6a, - 0x0d, 0xcc, 0xb8, 0x35, 0x30, 0x1b, 0xba, 0x75, 0xa8, 0xaf, 0xbc, 0xae, 0xa5, 0xff, 0xf4, 0xcf, - 0xfb, 0x29, 0x2c, 0xcd, 0xeb, 0x00, 0xab, 0x92, 0x3d, 0xd6, 0x29, 0x3d, 0xab, 0xb4, 0x60, 0x35, - 0xa6, 0x1a, 0xda, 0x80, 0x3c, 0xee, 0x1c, 0x1f, 0x35, 0x2c, 0xdc, 0xa9, 0x1f, 0x1c, 0x15, 0x97, - 0x50, 0x01, 0xa0, 0xdd, 0xac, 0xf5, 0xfa, 0xd6, 0x5e, 0xe7, 0xe8, 0xa8, 0x98, 0x42, 0x00, 0x59, - 0x5c, 0x3b, 0x6a, 0x74, 0x0e, 0x8b, 0x69, 0x69, 0xdc, 0xad, 0xf5, 0x7a, 0xfd, 0x16, 0xee, 0x1c, - 0xef, 0xb7, 0x8a, 0x46, 0x3d, 0x0f, 0x39, 0x67, 0xa0, 0x53, 0xb2, 0xf2, 0xc7, 0x55, 0xb8, 0x73, - 0x71, 0x39, 0x43, 0x1d, 0x30, 0x84, 0xed, 0xe9, 0x62, 0xfd, 0xd9, 0x8d, 0xcb, 0xa1, 0xd9, 0xdf, - 0xeb, 0x26, 0x6a, 0x8f, 0xed, 0x21, 0x0c, 0x19, 0x79, 0x3f, 0xfa, 0xea, 0x7f, 0x79, 0x73, 0x44, - 0x19, 0xfd, 0x39, 0xa4, 0xc2, 0x2a, 0xff, 0x27, 0x0d, 0xf9, 0xc4, 0x42, 0xe8, 0x63, 0xd8, 0x98, - 0x90, 0x99, 0xb5, 0xa8, 0xc4, 0x81, 0x3a, 0xc0, 0x32, 0x2e, 0x4c, 0xc8, 0x6c, 0x01, 0x1b, 0xa0, - 0xfa, 0xbc, 0xf0, 0x5b, 0x82, 0x4d, 0x28, 0x0f, 0x85, 0xde, 0xd7, 0xfb, 0x6f, 0x67, 0x5e, 0xe0, - 0xfb, 0x91, 0x03, 0xe2, 0xb0, 0x2e, 0x6c, 0xcf, 0x3a, 0xa5, 0xd4, 0x23, 0x0e, 0x9b, 0x52, 0x7d, - 0xbf, 0xbf, 0xba, 0x55, 0xac, 0xcc, 0xbe, 0xed, 0x3d, 0x8f, 0x11, 0xf1, 0x9a, 0x48, 0xcc, 0xca, - 0x7f, 0x48, 0xc1, 0x5a, 0x52, 0x8d, 0xee, 0x40, 0xd6, 0xf3, 0xf9, 0x80, 0x46, 0xa7, 0x5c, 0xc7, - 0x7a, 0x86, 0x1e, 0x42, 0x46, 0x9e, 0xea, 0xea, 0x23, 0x29, 0x33, 0xf4, 0x04, 0x56, 0x99, 0x2b, - 0xa8, 0x3f, 0x25, 0x57, 0x73, 0x14, 0xcf, 0x4d, 0xcb, 0x7f, 0x37, 0x60, 0x2d, 0x79, 0x27, 0xe8, - 0x19, 0x94, 0xe5, 0xad, 0x3c, 0xb2, 0xe4, 0x1d, 0x78, 0xd4, 0x1d, 0xca, 0x94, 0xf2, 0xe9, 0xef, - 0x43, 0x1a, 0x88, 0xf8, 0x22, 0x3e, 0x54, 0x16, 0x87, 0x64, 0xd6, 0x8d, 0xf4, 0x58, 0xab, 0xd1, - 0x4f, 0x00, 0x49, 0x55, 0x55, 0x39, 0xcf, 0x9d, 0xd2, 0xca, 0x49, 0x95, 0x99, 0xea, 0x21, 0x99, - 0xcd, 0xad, 0x3f, 0x83, 0xbb, 0x49, 0x3b, 0xcb, 0xa3, 0x7e, 0xe2, 0xd6, 0xd5, 0x29, 0x96, 0x71, - 0x69, 0xb2, 0xf0, 0xe8, 0x52, 0x7f, 0x11, 0x7c, 0x74, 0x1f, 0xf2, 0x91, 0xbb, 0xf0, 0x19, 0x8d, - 0xda, 0xa9, 0x65, 0x0c, 0xca, 0x5c, 0x49, 0xd0, 0x2f, 0x60, 0x8d, 0x0d, 0x1d, 0x3a, 0x27, 0xc7, - 0xf2, 0x55, 0x61, 0xc9, 0x4b, 0xf3, 0x98, 0x19, 0xaf, 0x60, 0x73, 0x5c, 0xb5, 0x42, 0x6f, 0xe4, - 0x93, 0x21, 0x8d, 0x9f, 0xbf, 0xac, 0x7a, 0x61, 0x8e, 0x6e, 0xc7, 0x7b, 0xb3, 0x55, 0x3d, 0x8e, - 0x60, 0xf5, 0x23, 0xb9, 0x31, 0x3e, 0x2f, 0xa8, 0x7c, 0x0e, 0x1b, 0x6f, 0xd9, 0xa0, 0x3c, 0xac, - 0x34, 0x9a, 0x5f, 0xd6, 0x8e, 0xdb, 0xfd, 0xe2, 0x12, 0x42, 0x50, 0x68, 0x74, 0xac, 0xa3, 0x4e, - 0xdf, 0x3a, 0xee, 0xee, 0xe3, 0x5a, 0xa3, 0x59, 0x4c, 0x49, 0x83, 0x78, 0x92, 0xae, 0x7c, 0x63, - 0x40, 0xf1, 0xed, 0x26, 0x04, 0x3d, 0x02, 0x24, 0x5f, 0x1e, 0x6a, 0x87, 0x82, 0x4d, 0xa9, 0x45, - 0x7d, 0x9f, 0xfb, 0xfa, 0x4a, 0xeb, 0xe9, 0x52, 0x0a, 0x6f, 0x26, 0xb4, 0x4d, 0xa5, 0x44, 0x2f, - 0xa0, 0x9c, 0x74, 0x19, 0x11, 0x41, 0x5f, 0x92, 0xb3, 0xd8, 0x35, 0xab, 0x02, 0xfa, 0xbd, 0x77, - 0x02, 0x7a, 0x7c, 0xe0, 0x8a, 0xc7, 0xd5, 0x5f, 0xcb, 0xa7, 0x1b, 0x97, 0x12, 0xfe, 0xfb, 0x91, - 0xbb, 0xc6, 0xc6, 0x70, 0x27, 0x89, 0xfd, 0x64, 0x36, 0x8b, 0x71, 0x57, 0xae, 0x81, 0xbb, 0x95, - 0xf0, 0x7d, 0x32, 0x9b, 0x69, 0xcc, 0x64, 0x16, 0xa4, 0xaf, 0x9d, 0x05, 0x68, 0x1f, 0xd0, 0x80, - 0x04, 0xd4, 0xa2, 0x5f, 0xe9, 0x2e, 0x52, 0x65, 0xde, 0x95, 0x69, 0x54, 0x94, 0x4e, 0x4d, 0xed, - 0x23, 0x79, 0x83, 0x7e, 0x0a, 0x5b, 0x92, 0x93, 0x73, 0x1c, 0x8f, 0xfa, 0x36, 0x75, 0x85, 0x26, - 0x27, 0x9a, 0x90, 0x59, 0x6c, 0xde, 0x8d, 0x34, 0x32, 0x65, 0x26, 0xcc, 0x95, 0xcf, 0xaf, 0x23, - 0xc6, 0x73, 0xfb, 0xe5, 0x28, 0x65, 0x26, 0xcc, 0x6d, 0x29, 0x85, 0xb6, 0xae, 0xfc, 0x55, 0xd6, - 0xca, 0x45, 0x43, 0x88, 0xf6, 0x21, 0x33, 0xe1, 0xc3, 0xb8, 0xf3, 0x31, 0xaf, 0xd7, 0x46, 0xca, - 0xb1, 0xf4, 0xd2, 0x2f, 0x9e, 0x1c, 0xa2, 0x87, 0x80, 0x6c, 0x87, 0xc9, 0x66, 0xc7, 0xa6, 0xbe, - 0x60, 0x27, 0xcc, 0x26, 0x22, 0x6e, 0xc2, 0x36, 0x23, 0xcd, 0xde, 0x42, 0x21, 0x73, 0xcf, 0xf3, - 0xd9, 0x94, 0x08, 0x2a, 0x5f, 0x36, 0x15, 0xa9, 0x1c, 0x06, 0x2d, 0x7a, 0x4e, 0xcf, 0x64, 0x11, - 0xb7, 0x49, 0x12, 0x2b, 0x4a, 0xd0, 0x1c, 0x2e, 0xd8, 0x24, 0x01, 0x14, 0xc8, 0xd7, 0x3b, 0x08, - 0x07, 0x32, 0x28, 0x16, 0x71, 0x84, 0xea, 0x3f, 0xa2, 0x0f, 0x9a, 0x1c, 0xde, 0xd0, 0x8a, 0x9a, - 0x23, 0x64, 0xfb, 0x11, 0xc8, 0x76, 0x31, 0x70, 0x99, 0xa2, 0x5d, 0x0e, 0xcb, 0x61, 0xe5, 0x0b, - 0x58, 0xd1, 0x87, 0x51, 0x09, 0x72, 0xd0, 0xab, 0xd5, 0xdb, 0xcd, 0xe2, 0x92, 0x7c, 0x3d, 0x7b, - 0x07, 0x87, 0xdd, 0x76, 0x33, 0x7a, 0x49, 0x0f, 0x8f, 0xfb, 0xc7, 0xb5, 0x76, 0x31, 0x8d, 0x8a, - 0xb0, 0x76, 0xd0, 0xeb, 0x1f, 0x74, 0x2c, 0x2d, 0x31, 0x2a, 0xff, 0x36, 0xe0, 0xee, 0x25, 0x7d, - 0x14, 0x22, 0x00, 0x43, 0x16, 0x08, 0x9f, 0x0d, 0x42, 0x21, 0xe3, 0x2c, 0xbb, 0xe9, 0xda, 0xb7, - 0xeb, 0xc9, 0xcc, 0xc6, 0x1c, 0x08, 0x27, 0x40, 0xd1, 0xef, 0x60, 0xf5, 0x84, 0x30, 0x87, 0x4f, - 0xd5, 0x17, 0x91, 0x5c, 0xe0, 0xf3, 0x6f, 0xb9, 0xc0, 0x97, 0x1a, 0x06, 0xcf, 0x01, 0xd1, 0x27, - 0xb0, 0x42, 0x5d, 0x32, 0x70, 0xe8, 0x50, 0xf3, 0xb9, 0xfc, 0x0e, 0x9f, 0xeb, 0x9c, 0x3b, 0x51, - 0x52, 0xc5, 0xa6, 0xe5, 0x3f, 0xa7, 0x00, 0x16, 0xbb, 0x95, 0xfd, 0xd0, 0x89, 0xcf, 0x27, 0xba, - 0x51, 0x57, 0x63, 0xf4, 0x5b, 0x48, 0x0b, 0xae, 0xf7, 0x7b, 0x70, 0xeb, 0x80, 0x98, 0x7d, 0x1e, - 0x7d, 0x7a, 0xa4, 0x05, 0x2f, 0x3f, 0x81, 0x15, 0x3d, 0xbd, 0xea, 0x0b, 0x61, 0x3d, 0xf1, 0x85, - 0x50, 0x36, 0x61, 0x35, 0x0e, 0xc0, 0x85, 0x3b, 0x2e, 0xe8, 0x1d, 0x4b, 0x49, 0x5a, 0xf0, 0xba, - 0xf9, 0x97, 0x37, 0xf7, 0x52, 0x7f, 0x7b, 0x73, 0x2f, 0xf5, 0xfa, 0xcd, 0xbd, 0xd4, 0x8b, 0xed, - 0xe8, 0x08, 0x8c, 0xab, 0xff, 0x45, 0x17, 0xfc, 0xd9, 0x19, 0x64, 0x55, 0xc4, 0x1e, 0xff, 0x2f, - 0x00, 0x00, 0xff, 0xff, 0x29, 0xa1, 0x3f, 0x39, 0x9f, 0x12, 0x00, 0x00, -} - -func (m *DestinationRule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DestinationRule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DestinationRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ExportTo) > 0 { - for iNdEx := len(m.ExportTo) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExportTo[iNdEx]) - copy(dAtA[i:], m.ExportTo[iNdEx]) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.ExportTo[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Subsets) > 0 { - for iNdEx := len(m.Subsets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Subsets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.TrafficPolicy != nil { - { - size, err := m.TrafficPolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Host) > 0 { - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.Host))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TrafficPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TrafficPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TrafficPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.PortLevelSettings) > 0 { - for iNdEx := len(m.PortLevelSettings) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PortLevelSettings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.Tls != nil { - { - size, err := m.Tls.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.OutlierDetection != nil { - { - size, err := m.OutlierDetection.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.ConnectionPool != nil { - { - size, err := m.ConnectionPool.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.LoadBalancer != nil { - { - size, err := m.LoadBalancer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TrafficPolicy_PortTrafficPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TrafficPolicy_PortTrafficPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TrafficPolicy_PortTrafficPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Tls != nil { - { - size, err := m.Tls.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.OutlierDetection != nil { - { - size, err := m.OutlierDetection.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.ConnectionPool != nil { - { - size, err := m.ConnectionPool.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.LoadBalancer != nil { - { - size, err := m.LoadBalancer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Port != nil { - { - size, err := m.Port.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Subset) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Subset) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Subset) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.TrafficPolicy != nil { - { - size, err := m.TrafficPolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Labels) > 0 { - for k := range m.Labels { - v := m.Labels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintDestinationRule(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LoadBalancerSettings) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LoadBalancerSettings) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LoadBalancerSettings) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.LocalityLbSetting != nil { - { - size, err := m.LocalityLbSetting.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.LbPolicy != nil { - { - size := m.LbPolicy.Size() - i -= size - if _, err := m.LbPolicy.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *LoadBalancerSettings_Simple) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *LoadBalancerSettings_Simple) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintDestinationRule(dAtA, i, uint64(m.Simple)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} -func (m *LoadBalancerSettings_ConsistentHash) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *LoadBalancerSettings_ConsistentHash) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ConsistentHash != nil { - { - size, err := m.ConsistentHash.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *LoadBalancerSettings_ConsistentHashLB) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LoadBalancerSettings_ConsistentHashLB) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LoadBalancerSettings_ConsistentHashLB) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.MinimumRingSize != 0 { - i = encodeVarintDestinationRule(dAtA, i, uint64(m.MinimumRingSize)) - i-- - dAtA[i] = 0x20 - } - if m.HashKey != nil { - { - size := m.HashKey.Size() - i -= size - if _, err := m.HashKey.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *LoadBalancerSettings_ConsistentHashLB_HttpHeaderName) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *LoadBalancerSettings_ConsistentHashLB_HttpHeaderName) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.HttpHeaderName) - copy(dAtA[i:], m.HttpHeaderName) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.HttpHeaderName))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} -func (m *LoadBalancerSettings_ConsistentHashLB_HttpCookie) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *LoadBalancerSettings_ConsistentHashLB_HttpCookie) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.HttpCookie != nil { - { - size, err := m.HttpCookie.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *LoadBalancerSettings_ConsistentHashLB_UseSourceIp) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *LoadBalancerSettings_ConsistentHashLB_UseSourceIp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i-- - if m.UseSourceIp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - return len(dAtA) - i, nil -} -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Ttl != nil { - n15, err15 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Ttl, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Ttl):]) - if err15 != nil { - return 0, err15 - } - i -= n15 - i = encodeVarintDestinationRule(dAtA, i, uint64(n15)) - i-- - dAtA[i] = 0x1a - } - if len(m.Path) > 0 { - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.Path))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ConnectionPoolSettings) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConnectionPoolSettings) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConnectionPoolSettings) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Http != nil { - { - size, err := m.Http.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Tcp != nil { - { - size, err := m.Tcp.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ConnectionPoolSettings_TCPSettings) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConnectionPoolSettings_TCPSettings) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConnectionPoolSettings_TCPSettings) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.TcpKeepalive != nil { - { - size, err := m.TcpKeepalive.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.ConnectTimeout != nil { - { - size, err := m.ConnectTimeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.MaxConnections != 0 { - i = encodeVarintDestinationRule(dAtA, i, uint64(m.MaxConnections)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Interval != nil { - { - size, err := m.Interval.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Time != nil { - { - size, err := m.Time.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Probes != 0 { - i = encodeVarintDestinationRule(dAtA, i, uint64(m.Probes)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ConnectionPoolSettings_HTTPSettings) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConnectionPoolSettings_HTTPSettings) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConnectionPoolSettings_HTTPSettings) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.H2UpgradePolicy != 0 { - i = encodeVarintDestinationRule(dAtA, i, uint64(m.H2UpgradePolicy)) - i-- - dAtA[i] = 0x30 - } - if m.IdleTimeout != nil { - { - size, err := m.IdleTimeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.MaxRetries != 0 { - i = encodeVarintDestinationRule(dAtA, i, uint64(m.MaxRetries)) - i-- - dAtA[i] = 0x20 - } - if m.MaxRequestsPerConnection != 0 { - i = encodeVarintDestinationRule(dAtA, i, uint64(m.MaxRequestsPerConnection)) - i-- - dAtA[i] = 0x18 - } - if m.Http2MaxRequests != 0 { - i = encodeVarintDestinationRule(dAtA, i, uint64(m.Http2MaxRequests)) - i-- - dAtA[i] = 0x10 - } - if m.Http1MaxPendingRequests != 0 { - i = encodeVarintDestinationRule(dAtA, i, uint64(m.Http1MaxPendingRequests)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *OutlierDetection) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OutlierDetection) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OutlierDetection) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Consecutive_5XxErrors != nil { - { - size, err := m.Consecutive_5XxErrors.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.ConsecutiveGatewayErrors != nil { - { - size, err := m.ConsecutiveGatewayErrors.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.MinHealthPercent != 0 { - i = encodeVarintDestinationRule(dAtA, i, uint64(m.MinHealthPercent)) - i-- - dAtA[i] = 0x28 - } - if m.MaxEjectionPercent != 0 { - i = encodeVarintDestinationRule(dAtA, i, uint64(m.MaxEjectionPercent)) - i-- - dAtA[i] = 0x20 - } - if m.BaseEjectionTime != nil { - { - size, err := m.BaseEjectionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Interval != nil { - { - size, err := m.Interval.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ConsecutiveErrors != 0 { - i = encodeVarintDestinationRule(dAtA, i, uint64(m.ConsecutiveErrors)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TLSSettings) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TLSSettings) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TLSSettings) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Sni) > 0 { - i -= len(m.Sni) - copy(dAtA[i:], m.Sni) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.Sni))) - i-- - dAtA[i] = 0x32 - } - if len(m.SubjectAltNames) > 0 { - for iNdEx := len(m.SubjectAltNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SubjectAltNames[iNdEx]) - copy(dAtA[i:], m.SubjectAltNames[iNdEx]) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.SubjectAltNames[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.CaCertificates) > 0 { - i -= len(m.CaCertificates) - copy(dAtA[i:], m.CaCertificates) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.CaCertificates))) - i-- - dAtA[i] = 0x22 - } - if len(m.PrivateKey) > 0 { - i -= len(m.PrivateKey) - copy(dAtA[i:], m.PrivateKey) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.PrivateKey))) - i-- - dAtA[i] = 0x1a - } - if len(m.ClientCertificate) > 0 { - i -= len(m.ClientCertificate) - copy(dAtA[i:], m.ClientCertificate) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.ClientCertificate))) - i-- - dAtA[i] = 0x12 - } - if m.Mode != 0 { - i = encodeVarintDestinationRule(dAtA, i, uint64(m.Mode)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LocalityLoadBalancerSetting) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalityLoadBalancerSetting) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LocalityLoadBalancerSetting) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Enabled != nil { - { - size, err := m.Enabled.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Failover) > 0 { - for iNdEx := len(m.Failover) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Failover[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Distribute) > 0 { - for iNdEx := len(m.Distribute) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Distribute[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDestinationRule(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *LocalityLoadBalancerSetting_Distribute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalityLoadBalancerSetting_Distribute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LocalityLoadBalancerSetting_Distribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.To) > 0 { - for k := range m.To { - v := m.To[k] - baseI := i - i = encodeVarintDestinationRule(dAtA, i, uint64(v)) - i-- - dAtA[i] = 0x10 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintDestinationRule(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if len(m.From) > 0 { - i -= len(m.From) - copy(dAtA[i:], m.From) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.From))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LocalityLoadBalancerSetting_Failover) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalityLoadBalancerSetting_Failover) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LocalityLoadBalancerSetting_Failover) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.To) > 0 { - i -= len(m.To) - copy(dAtA[i:], m.To) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.To))) - i-- - dAtA[i] = 0x12 - } - if len(m.From) > 0 { - i -= len(m.From) - copy(dAtA[i:], m.From) - i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.From))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintDestinationRule(dAtA []byte, offset int, v uint64) int { - offset -= sovDestinationRule(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *DestinationRule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Host) - if l > 0 { - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.TrafficPolicy != nil { - l = m.TrafficPolicy.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if len(m.Subsets) > 0 { - for _, e := range m.Subsets { - l = e.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - } - if len(m.ExportTo) > 0 { - for _, s := range m.ExportTo { - l = len(s) - n += 1 + l + sovDestinationRule(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TrafficPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LoadBalancer != nil { - l = m.LoadBalancer.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.ConnectionPool != nil { - l = m.ConnectionPool.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.OutlierDetection != nil { - l = m.OutlierDetection.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.Tls != nil { - l = m.Tls.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if len(m.PortLevelSettings) > 0 { - for _, e := range m.PortLevelSettings { - l = e.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TrafficPolicy_PortTrafficPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Port != nil { - l = m.Port.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.LoadBalancer != nil { - l = m.LoadBalancer.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.ConnectionPool != nil { - l = m.ConnectionPool.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.OutlierDetection != nil { - l = m.OutlierDetection.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.Tls != nil { - l = m.Tls.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Subset) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovDestinationRule(uint64(l)) - } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovDestinationRule(uint64(len(k))) + 1 + len(v) + sovDestinationRule(uint64(len(v))) - n += mapEntrySize + 1 + sovDestinationRule(uint64(mapEntrySize)) - } - } - if m.TrafficPolicy != nil { - l = m.TrafficPolicy.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LoadBalancerSettings) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LbPolicy != nil { - n += m.LbPolicy.Size() - } - if m.LocalityLbSetting != nil { - l = m.LocalityLbSetting.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LoadBalancerSettings_Simple) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovDestinationRule(uint64(m.Simple)) - return n -} -func (m *LoadBalancerSettings_ConsistentHash) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ConsistentHash != nil { - l = m.ConsistentHash.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - return n -} -func (m *LoadBalancerSettings_ConsistentHashLB) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HashKey != nil { - n += m.HashKey.Size() - } - if m.MinimumRingSize != 0 { - n += 1 + sovDestinationRule(uint64(m.MinimumRingSize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LoadBalancerSettings_ConsistentHashLB_HttpHeaderName) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HttpHeaderName) - n += 1 + l + sovDestinationRule(uint64(l)) - return n -} -func (m *LoadBalancerSettings_ConsistentHashLB_HttpCookie) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HttpCookie != nil { - l = m.HttpCookie.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - return n -} -func (m *LoadBalancerSettings_ConsistentHashLB_UseSourceIp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovDestinationRule(uint64(l)) - } - l = len(m.Path) - if l > 0 { - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.Ttl != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Ttl) - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ConnectionPoolSettings) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Tcp != nil { - l = m.Tcp.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.Http != nil { - l = m.Http.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ConnectionPoolSettings_TCPSettings) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MaxConnections != 0 { - n += 1 + sovDestinationRule(uint64(m.MaxConnections)) - } - if m.ConnectTimeout != nil { - l = m.ConnectTimeout.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.TcpKeepalive != nil { - l = m.TcpKeepalive.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Probes != 0 { - n += 1 + sovDestinationRule(uint64(m.Probes)) - } - if m.Time != nil { - l = m.Time.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.Interval != nil { - l = m.Interval.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ConnectionPoolSettings_HTTPSettings) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Http1MaxPendingRequests != 0 { - n += 1 + sovDestinationRule(uint64(m.Http1MaxPendingRequests)) - } - if m.Http2MaxRequests != 0 { - n += 1 + sovDestinationRule(uint64(m.Http2MaxRequests)) - } - if m.MaxRequestsPerConnection != 0 { - n += 1 + sovDestinationRule(uint64(m.MaxRequestsPerConnection)) - } - if m.MaxRetries != 0 { - n += 1 + sovDestinationRule(uint64(m.MaxRetries)) - } - if m.IdleTimeout != nil { - l = m.IdleTimeout.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.H2UpgradePolicy != 0 { - n += 1 + sovDestinationRule(uint64(m.H2UpgradePolicy)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OutlierDetection) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ConsecutiveErrors != 0 { - n += 1 + sovDestinationRule(uint64(m.ConsecutiveErrors)) - } - if m.Interval != nil { - l = m.Interval.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.BaseEjectionTime != nil { - l = m.BaseEjectionTime.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.MaxEjectionPercent != 0 { - n += 1 + sovDestinationRule(uint64(m.MaxEjectionPercent)) - } - if m.MinHealthPercent != 0 { - n += 1 + sovDestinationRule(uint64(m.MinHealthPercent)) - } - if m.ConsecutiveGatewayErrors != nil { - l = m.ConsecutiveGatewayErrors.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.Consecutive_5XxErrors != nil { - l = m.Consecutive_5XxErrors.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TLSSettings) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Mode != 0 { - n += 1 + sovDestinationRule(uint64(m.Mode)) - } - l = len(m.ClientCertificate) - if l > 0 { - n += 1 + l + sovDestinationRule(uint64(l)) - } - l = len(m.PrivateKey) - if l > 0 { - n += 1 + l + sovDestinationRule(uint64(l)) - } - l = len(m.CaCertificates) - if l > 0 { - n += 1 + l + sovDestinationRule(uint64(l)) - } - if len(m.SubjectAltNames) > 0 { - for _, s := range m.SubjectAltNames { - l = len(s) - n += 1 + l + sovDestinationRule(uint64(l)) - } - } - l = len(m.Sni) - if l > 0 { - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LocalityLoadBalancerSetting) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Distribute) > 0 { - for _, e := range m.Distribute { - l = e.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - } - if len(m.Failover) > 0 { - for _, e := range m.Failover { - l = e.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - } - if m.Enabled != nil { - l = m.Enabled.Size() - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LocalityLoadBalancerSetting_Distribute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.From) - if l > 0 { - n += 1 + l + sovDestinationRule(uint64(l)) - } - if len(m.To) > 0 { - for k, v := range m.To { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovDestinationRule(uint64(len(k))) + 1 + sovDestinationRule(uint64(v)) - n += mapEntrySize + 1 + sovDestinationRule(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LocalityLoadBalancerSetting_Failover) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.From) - if l > 0 { - n += 1 + l + sovDestinationRule(uint64(l)) - } - l = len(m.To) - if l > 0 { - n += 1 + l + sovDestinationRule(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovDestinationRule(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDestinationRule(x uint64) (n int) { - return sovDestinationRule(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *DestinationRule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DestinationRule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DestinationRule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrafficPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TrafficPolicy == nil { - m.TrafficPolicy = &TrafficPolicy{} - } - if err := m.TrafficPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subsets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subsets = append(m.Subsets, &Subset{}) - if err := m.Subsets[len(m.Subsets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExportTo", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExportTo = append(m.ExportTo, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TrafficPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TrafficPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TrafficPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LoadBalancer == nil { - m.LoadBalancer = &LoadBalancerSettings{} - } - if err := m.LoadBalancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionPool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConnectionPool == nil { - m.ConnectionPool = &ConnectionPoolSettings{} - } - if err := m.ConnectionPool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutlierDetection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OutlierDetection == nil { - m.OutlierDetection = &OutlierDetection{} - } - if err := m.OutlierDetection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tls", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tls == nil { - m.Tls = &TLSSettings{} - } - if err := m.Tls.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortLevelSettings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortLevelSettings = append(m.PortLevelSettings, &TrafficPolicy_PortTrafficPolicy{}) - if err := m.PortLevelSettings[len(m.PortLevelSettings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TrafficPolicy_PortTrafficPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PortTrafficPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PortTrafficPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Port == nil { - m.Port = &PortSelector{} - } - if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LoadBalancer == nil { - m.LoadBalancer = &LoadBalancerSettings{} - } - if err := m.LoadBalancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionPool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConnectionPool == nil { - m.ConnectionPool = &ConnectionPoolSettings{} - } - if err := m.ConnectionPool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutlierDetection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OutlierDetection == nil { - m.OutlierDetection = &OutlierDetection{} - } - if err := m.OutlierDetection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tls", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tls == nil { - m.Tls = &TLSSettings{} - } - if err := m.Tls.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Subset) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subset: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subset: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Labels == nil { - m.Labels = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthDestinationRule - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthDestinationRule - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthDestinationRule - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthDestinationRule - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Labels[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrafficPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TrafficPolicy == nil { - m.TrafficPolicy = &TrafficPolicy{} - } - if err := m.TrafficPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LoadBalancerSettings) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LoadBalancerSettings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LoadBalancerSettings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Simple", wireType) - } - var v LoadBalancerSettings_SimpleLB - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= LoadBalancerSettings_SimpleLB(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LbPolicy = &LoadBalancerSettings_Simple{v} - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsistentHash", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &LoadBalancerSettings_ConsistentHashLB{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.LbPolicy = &LoadBalancerSettings_ConsistentHash{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalityLbSetting", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LocalityLbSetting == nil { - m.LocalityLbSetting = &LocalityLoadBalancerSetting{} - } - if err := m.LocalityLbSetting.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LoadBalancerSettings_ConsistentHashLB) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConsistentHashLB: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsistentHashLB: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HttpHeaderName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HashKey = &LoadBalancerSettings_ConsistentHashLB_HttpHeaderName{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HttpCookie", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &LoadBalancerSettings_ConsistentHashLB_HTTPCookie{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.HashKey = &LoadBalancerSettings_ConsistentHashLB_HttpCookie{v} - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UseSourceIp", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.HashKey = &LoadBalancerSettings_ConsistentHashLB_UseSourceIp{b} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumRingSize", wireType) - } - m.MinimumRingSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinimumRingSize |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HTTPCookie: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HTTPCookie: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ttl", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Ttl == nil { - m.Ttl = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Ttl, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConnectionPoolSettings) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConnectionPoolSettings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConnectionPoolSettings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tcp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tcp == nil { - m.Tcp = &ConnectionPoolSettings_TCPSettings{} - } - if err := m.Tcp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Http == nil { - m.Http = &ConnectionPoolSettings_HTTPSettings{} - } - if err := m.Http.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConnectionPoolSettings_TCPSettings) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TCPSettings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TCPSettings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxConnections", wireType) - } - m.MaxConnections = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxConnections |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConnectTimeout == nil { - m.ConnectTimeout = &types.Duration{} - } - if err := m.ConnectTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TcpKeepalive", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TcpKeepalive == nil { - m.TcpKeepalive = &ConnectionPoolSettings_TCPSettings_TcpKeepalive{} - } - if err := m.TcpKeepalive.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConnectionPoolSettings_TCPSettings_TcpKeepalive) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TcpKeepalive: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TcpKeepalive: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Probes", wireType) - } - m.Probes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Probes |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Time == nil { - m.Time = &types.Duration{} - } - if err := m.Time.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Interval == nil { - m.Interval = &types.Duration{} - } - if err := m.Interval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConnectionPoolSettings_HTTPSettings) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HTTPSettings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HTTPSettings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Http1MaxPendingRequests", wireType) - } - m.Http1MaxPendingRequests = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Http1MaxPendingRequests |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Http2MaxRequests", wireType) - } - m.Http2MaxRequests = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Http2MaxRequests |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRequestsPerConnection", wireType) - } - m.MaxRequestsPerConnection = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxRequestsPerConnection |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRetries", wireType) - } - m.MaxRetries = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxRetries |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdleTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdleTimeout == nil { - m.IdleTimeout = &types.Duration{} - } - if err := m.IdleTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field H2UpgradePolicy", wireType) - } - m.H2UpgradePolicy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.H2UpgradePolicy |= ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OutlierDetection) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OutlierDetection: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OutlierDetection: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsecutiveErrors", wireType) - } - m.ConsecutiveErrors = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ConsecutiveErrors |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Interval == nil { - m.Interval = &types.Duration{} - } - if err := m.Interval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseEjectionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BaseEjectionTime == nil { - m.BaseEjectionTime = &types.Duration{} - } - if err := m.BaseEjectionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxEjectionPercent", wireType) - } - m.MaxEjectionPercent = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxEjectionPercent |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinHealthPercent", wireType) - } - m.MinHealthPercent = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinHealthPercent |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsecutiveGatewayErrors", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConsecutiveGatewayErrors == nil { - m.ConsecutiveGatewayErrors = &types.UInt32Value{} - } - if err := m.ConsecutiveGatewayErrors.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Consecutive_5XxErrors", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Consecutive_5XxErrors == nil { - m.Consecutive_5XxErrors = &types.UInt32Value{} - } - if err := m.Consecutive_5XxErrors.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TLSSettings) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TLSSettings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TLSSettings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - m.Mode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Mode |= TLSSettings_TLSmode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientCertificate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientCertificate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrivateKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrivateKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CaCertificates", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CaCertificates = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubjectAltNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SubjectAltNames = append(m.SubjectAltNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sni", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sni = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LocalityLoadBalancerSetting) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LocalityLoadBalancerSetting: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LocalityLoadBalancerSetting: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Distribute", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Distribute = append(m.Distribute, &LocalityLoadBalancerSetting_Distribute{}) - if err := m.Distribute[len(m.Distribute)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Failover", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Failover = append(m.Failover, &LocalityLoadBalancerSetting_Failover{}) - if err := m.Failover[len(m.Failover)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Enabled == nil { - m.Enabled = &types.BoolValue{} - } - if err := m.Enabled.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LocalityLoadBalancerSetting_Distribute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Distribute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Distribute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.From = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.To == nil { - m.To = make(map[string]uint32) - } - var mapkey string - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthDestinationRule - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthDestinationRule - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.To[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LocalityLoadBalancerSetting_Failover) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Failover: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Failover: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.From = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDestinationRule - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDestinationRule - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.To = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDestinationRule(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDestinationRule - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDestinationRule(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthDestinationRule - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthDestinationRule - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDestinationRule - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipDestinationRule(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthDestinationRule - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthDestinationRule = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDestinationRule = fmt.Errorf("proto: integer overflow") -) diff --git a/pkg/inject/api/networking/v1alpha3/destination_rule_deepcopy.gen.go b/pkg/inject/api/networking/v1alpha3/destination_rule_deepcopy.gen.go deleted file mode 100644 index 096b8a8a..00000000 --- a/pkg/inject/api/networking/v1alpha3/destination_rule_deepcopy.gen.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networking/v1alpha3/destination_rule.proto - -// `DestinationRule` defines policies that apply to traffic intended for a -// service after routing has occurred. These rules specify configuration -// for load balancing, connection pool size from the sidecar, and outlier -// detection settings to detect and evict unhealthy hosts from the load -// balancing pool. For example, a simple load balancing policy for the -// ratings service would look as follows: -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// ``` -// {{}} -// {{}} -// -// Version specific policies can be specified by defining a named -// `subset` and overriding the settings specified at the service level. The -// following rule uses a round robin load balancing policy for all traffic -// going to a subset named testversion that is composed of endpoints (e.g., -// pods) with labels (version:v3). -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// subsets: -// - name: testversion -// labels: -// version: v3 -// trafficPolicy: -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// subsets: -// - name: testversion -// labels: -// version: v3 -// trafficPolicy: -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// {{}} -// -// **Note:** Policies specified for subsets will not take effect until -// a route rule explicitly sends traffic to this subset. -// -// Traffic policies can be customized to specific ports as well. The -// following rule uses the least connection load balancing policy for all -// traffic to port 80, while uses a round robin load balancing setting for -// traffic to the port 9080. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings-port -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: # Apply to all ports -// portLevelSettings: -// - port: -// number: 80 -// loadBalancer: -// simple: LEAST_CONN -// - port: -// number: 9080 -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings-port -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: # Apply to all ports -// portLevelSettings: -// - port: -// number: 80 -// loadBalancer: -// simple: LEAST_CONN -// - port: -// number: 9080 -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// {{}} -// - -package v1alpha3 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - _ "github.com/polarismesh/polaris-controller/pkg/inject/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// DeepCopyInto supports using DestinationRule within kubernetes types, where deepcopy-gen is used. -func (in *DestinationRule) DeepCopyInto(out *DestinationRule) { - p := proto.Clone(in).(*DestinationRule) - *out = *p -} diff --git a/pkg/inject/api/networking/v1alpha3/destination_rule_json.gen.go b/pkg/inject/api/networking/v1alpha3/destination_rule_json.gen.go deleted file mode 100644 index 3c549c06..00000000 --- a/pkg/inject/api/networking/v1alpha3/destination_rule_json.gen.go +++ /dev/null @@ -1,341 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networking/v1alpha3/destination_rule.proto - -// `DestinationRule` defines policies that apply to traffic intended for a -// service after routing has occurred. These rules specify configuration -// for load balancing, connection pool size from the sidecar, and outlier -// detection settings to detect and evict unhealthy hosts from the load -// balancing pool. For example, a simple load balancing policy for the -// ratings service would look as follows: -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// ``` -// {{}} -// {{}} -// -// Version specific policies can be specified by defining a named -// `subset` and overriding the settings specified at the service level. The -// following rule uses a round robin load balancing policy for all traffic -// going to a subset named testversion that is composed of endpoints (e.g., -// pods) with labels (version:v3). -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// subsets: -// - name: testversion -// labels: -// version: v3 -// trafficPolicy: -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: -// loadBalancer: -// simple: LEAST_CONN -// subsets: -// - name: testversion -// labels: -// version: v3 -// trafficPolicy: -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// {{}} -// -// **Note:** Policies specified for subsets will not take effect until -// a route rule explicitly sends traffic to this subset. -// -// Traffic policies can be customized to specific ports as well. The -// following rule uses the least connection load balancing policy for all -// traffic to port 80, while uses a round robin load balancing setting for -// traffic to the port 9080. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings-port -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: # Apply to all ports -// portLevelSettings: -// - port: -// number: 80 -// loadBalancer: -// simple: LEAST_CONN -// - port: -// number: 9080 -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: bookinfo-ratings-port -// spec: -// host: ratings.prod.svc.cluster.local -// trafficPolicy: # Apply to all ports -// portLevelSettings: -// - port: -// number: 80 -// loadBalancer: -// simple: LEAST_CONN -// - port: -// number: 9080 -// loadBalancer: -// simple: ROUND_ROBIN -// ``` -// {{}} -// {{}} -// - -package v1alpha3 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - _ "github.com/polarismesh/polaris-controller/pkg/inject/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// MarshalJSON is a custom marshaler for DestinationRule -func (this *DestinationRule) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for DestinationRule -func (this *DestinationRule) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for TrafficPolicy -func (this *TrafficPolicy) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for TrafficPolicy -func (this *TrafficPolicy) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for TrafficPolicy_PortTrafficPolicy -func (this *TrafficPolicy_PortTrafficPolicy) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for TrafficPolicy_PortTrafficPolicy -func (this *TrafficPolicy_PortTrafficPolicy) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Subset -func (this *Subset) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Subset -func (this *Subset) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for LoadBalancerSettings -func (this *LoadBalancerSettings) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for LoadBalancerSettings -func (this *LoadBalancerSettings) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for LoadBalancerSettings_ConsistentHashLB -func (this *LoadBalancerSettings_ConsistentHashLB) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for LoadBalancerSettings_ConsistentHashLB -func (this *LoadBalancerSettings_ConsistentHashLB) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for LoadBalancerSettings_ConsistentHashLB_HTTPCookie -func (this *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for LoadBalancerSettings_ConsistentHashLB_HTTPCookie -func (this *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for ConnectionPoolSettings -func (this *ConnectionPoolSettings) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for ConnectionPoolSettings -func (this *ConnectionPoolSettings) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for ConnectionPoolSettings_TCPSettings -func (this *ConnectionPoolSettings_TCPSettings) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for ConnectionPoolSettings_TCPSettings -func (this *ConnectionPoolSettings_TCPSettings) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for ConnectionPoolSettings_TCPSettings_TcpKeepalive -func (this *ConnectionPoolSettings_TCPSettings_TcpKeepalive) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for ConnectionPoolSettings_TCPSettings_TcpKeepalive -func (this *ConnectionPoolSettings_TCPSettings_TcpKeepalive) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for ConnectionPoolSettings_HTTPSettings -func (this *ConnectionPoolSettings_HTTPSettings) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for ConnectionPoolSettings_HTTPSettings -func (this *ConnectionPoolSettings_HTTPSettings) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for OutlierDetection -func (this *OutlierDetection) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for OutlierDetection -func (this *OutlierDetection) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for TLSSettings -func (this *TLSSettings) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for TLSSettings -func (this *TLSSettings) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for LocalityLoadBalancerSetting -func (this *LocalityLoadBalancerSetting) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for LocalityLoadBalancerSetting -func (this *LocalityLoadBalancerSetting) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for LocalityLoadBalancerSetting_Distribute -func (this *LocalityLoadBalancerSetting_Distribute) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for LocalityLoadBalancerSetting_Distribute -func (this *LocalityLoadBalancerSetting_Distribute) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for LocalityLoadBalancerSetting_Failover -func (this *LocalityLoadBalancerSetting_Failover) MarshalJSON() ([]byte, error) { - str, err := DestinationRuleMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for LocalityLoadBalancerSetting_Failover -func (this *LocalityLoadBalancerSetting_Failover) UnmarshalJSON(b []byte) error { - return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -var ( - DestinationRuleMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{} - DestinationRuleUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{} -) diff --git a/pkg/inject/api/networking/v1alpha3/gateway.pb.go b/pkg/inject/api/networking/v1alpha3/gateway.pb.go deleted file mode 100644 index e23182b9..00000000 --- a/pkg/inject/api/networking/v1alpha3/gateway.pb.go +++ /dev/null @@ -1,2632 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networking/v1alpha3/gateway.proto - -// `Gateway` describes a load balancer operating at the edge of the mesh -// receiving incoming or outgoing HTTP/TCP connections. The specification -// describes a set of ports that should be exposed, the type of protocol to -// use, SNI configuration for the load balancer, etc. -// -// For example, the following Gateway configuration sets up a proxy to act -// as a load balancer exposing port 80 and 9080 (http), 443 (https), -// 9443(https) and port 2379 (TCP) for ingress. The gateway will be -// applied to the proxy running on a pod with labels `app: -// my-gateway-controller`. While Istio will configure the proxy to listen -// on these ports, it is the responsibility of the user to ensure that -// external traffic to these ports are allowed into the mesh. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: Gateway -// metadata: -// name: my-gateway -// namespace: some-config-namespace -// spec: -// selector: -// app: my-gateway-controller -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - uk.bookinfo.com -// - eu.bookinfo.com -// tls: -// httpsRedirect: true # sends 301 redirect for http requests -// - port: -// number: 443 -// name: https-443 -// protocol: HTTPS -// hosts: -// - uk.bookinfo.com -// - eu.bookinfo.com -// tls: -// mode: SIMPLE # enables HTTPS on this port -// serverCertificate: /etc/certs/servercert.pem -// privateKey: /etc/certs/privatekey.pem -// - port: -// number: 9443 -// name: https-9443 -// protocol: HTTPS -// hosts: -// - "bookinfo-namespace/*.bookinfo.com" -// tls: -// mode: SIMPLE # enables HTTPS on this port -// credentialName: bookinfo-secret # fetches certs from Kubernetes secret -// - port: -// number: 9080 -// name: http-wildcard -// protocol: HTTP -// hosts: -// - "*" -// - port: -// number: 2379 # to expose internal service via external port 2379 -// name: mongo -// protocol: MONGO -// hosts: -// - "*" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: Gateway -// metadata: -// name: my-gateway -// namespace: some-config-namespace -// spec: -// selector: -// app: my-gateway-controller -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - uk.bookinfo.com -// - eu.bookinfo.com -// tls: -// httpsRedirect: true # sends 301 redirect for http requests -// - port: -// number: 443 -// name: https-443 -// protocol: HTTPS -// hosts: -// - uk.bookinfo.com -// - eu.bookinfo.com -// tls: -// mode: SIMPLE # enables HTTPS on this port -// serverCertificate: /etc/certs/servercert.pem -// privateKey: /etc/certs/privatekey.pem -// - port: -// number: 9443 -// name: https-9443 -// protocol: HTTPS -// hosts: -// - "bookinfo-namespace/*.bookinfo.com" -// tls: -// mode: SIMPLE # enables HTTPS on this port -// credentialName: bookinfo-secret # fetches certs from Kubernetes secret -// - port: -// number: 9080 -// name: http-wildcard -// protocol: HTTP -// hosts: -// - "*" -// - port: -// number: 2379 # to expose internal service via external port 2379 -// name: mongo -// protocol: MONGO -// hosts: -// - "*" -// ``` -// {{}} -// {{}} -// -// The Gateway specification above describes the L4-L6 properties of a load -// balancer. A `VirtualService` can then be bound to a gateway to control -// the forwarding of traffic arriving at a particular host or gateway port. -// -// For example, the following VirtualService splits traffic for -// `https://uk.bookinfo.com/reviews`, `https://eu.bookinfo.com/reviews`, -// `http://uk.bookinfo.com:9080/reviews`, -// `http://eu.bookinfo.com:9080/reviews` into two versions (prod and qa) of -// an internal reviews service on port 9080. In addition, requests -// containing the cookie "user: dev-123" will be sent to special port 7777 -// in the qa version. The same rule is also applicable inside the mesh for -// requests to the "reviews.prod.svc.cluster.local" service. This rule is -// applicable across ports 443, 9080. Note that `http://uk.bookinfo.com` -// gets redirected to `https://uk.bookinfo.com` (i.e. 80 redirects to 443). -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: bookinfo-rule -// namespace: bookinfo-namespace -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// - uk.bookinfo.com -// - eu.bookinfo.com -// gateways: -// - some-config-namespace/my-gateway -// - mesh # applies to all the sidecars in the mesh -// http: -// - match: -// - headers: -// cookie: -// exact: "user=dev-123" -// route: -// - destination: -// port: -// number: 7777 -// host: reviews.qa.svc.cluster.local -// - match: -// - uri: -// prefix: /reviews/ -// route: -// - destination: -// port: -// number: 9080 # can be omitted if it's the only port for reviews -// host: reviews.prod.svc.cluster.local -// weight: 80 -// - destination: -// host: reviews.qa.svc.cluster.local -// weight: 20 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: bookinfo-rule -// namespace: bookinfo-namespace -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// - uk.bookinfo.com -// - eu.bookinfo.com -// gateways: -// - some-config-namespace/my-gateway -// - mesh # applies to all the sidecars in the mesh -// http: -// - match: -// - headers: -// cookie: -// exact: "user=dev-123" -// route: -// - destination: -// port: -// number: 7777 -// host: reviews.qa.svc.cluster.local -// - match: -// - uri: -// prefix: /reviews/ -// route: -// - destination: -// port: -// number: 9080 # can be omitted if it's the only port for reviews -// host: reviews.prod.svc.cluster.local -// weight: 80 -// - destination: -// host: reviews.qa.svc.cluster.local -// weight: 20 -// ``` -// {{}} -// {{}} -// -// The following VirtualService forwards traffic arriving at (external) -// port 27017 to internal Mongo server on port 5555. This rule is not -// applicable internally in the mesh as the gateway list omits the -// reserved name `mesh`. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: bookinfo-Mongo -// namespace: bookinfo-namespace -// spec: -// hosts: -// - mongosvr.prod.svc.cluster.local # name of internal Mongo service -// gateways: -// - some-config-namespace/my-gateway # can omit the namespace if gateway is in same -// namespace as virtual service. -// tcp: -// - match: -// - port: 27017 -// route: -// - destination: -// host: mongo.prod.svc.cluster.local -// port: -// number: 5555 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: bookinfo-Mongo -// namespace: bookinfo-namespace -// spec: -// hosts: -// - mongosvr.prod.svc.cluster.local # name of internal Mongo service -// gateways: -// - some-config-namespace/my-gateway # can omit the namespace if gateway is in same -// namespace as virtual service. -// tcp: -// - match: -// - port: 27017 -// route: -// - destination: -// host: mongo.prod.svc.cluster.local -// port: -// number: 5555 -// ``` -// {{}} -// {{}} -// -// It is possible to restrict the set of virtual services that can bind to -// a gateway server using the namespace/hostname syntax in the hosts field. -// For example, the following Gateway allows any virtual service in the ns1 -// namespace to bind to it, while restricting only the virtual service with -// foo.bar.com host in the ns2 namespace to bind to it. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: Gateway -// metadata: -// name: my-gateway -// namespace: some-config-namespace -// spec: -// selector: -// app: my-gateway-controller -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - "ns1/*" -// - "ns2/foo.bar.com" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: Gateway -// metadata: -// name: my-gateway -// namespace: some-config-namespace -// spec: -// selector: -// app: my-gateway-controller -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - "ns1/*" -// - "ns2/foo.bar.com" -// ``` -// {{}} -// {{}} -// - -package v1alpha3 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - _ "github.com/polarismesh/polaris-controller/pkg/inject/googleapis/google/api" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// TLS modes enforced by the proxy -type Server_TLSOptions_TLSmode int32 - -const ( - // The SNI string presented by the client will be used as the match - // criterion in a VirtualService TLS route to determine the - // destination service from the service registry. - Server_TLSOptions_PASSTHROUGH Server_TLSOptions_TLSmode = 0 - // Secure connections with standard TLS semantics. - Server_TLSOptions_SIMPLE Server_TLSOptions_TLSmode = 1 - // Secure connections to the downstream using mutual TLS by presenting - // server certificates for authentication. - Server_TLSOptions_MUTUAL Server_TLSOptions_TLSmode = 2 - // Similar to the passthrough mode, except servers with this TLS mode - // do not require an associated VirtualService to map from the SNI - // value to service in the registry. The destination details such as - // the service/subset/port are encoded in the SNI value. The proxy - // will forward to the upstream (Envoy) cluster (a group of - // endpoints) specified by the SNI value. This server is typically - // used to provide connectivity between services in disparate L3 - // networks that otherwise do not have direct connectivity between - // their respective endpoints. Use of this mode assumes that both the - // source and the destination are using Istio mTLS to secure traffic. - Server_TLSOptions_AUTO_PASSTHROUGH Server_TLSOptions_TLSmode = 3 - // Secure connections from the downstream using mutual TLS by presenting - // server certificates for authentication. - // Compared to Mutual mode, this mode uses certificates, representing - // gateway workload identity, generated automatically by Istio for - // mTLS authentication. When this mode is used, all other fields in - // `TLSOptions` should be empty. - Server_TLSOptions_ISTIO_MUTUAL Server_TLSOptions_TLSmode = 4 -) - -var Server_TLSOptions_TLSmode_name = map[int32]string{ - 0: "PASSTHROUGH", - 1: "SIMPLE", - 2: "MUTUAL", - 3: "AUTO_PASSTHROUGH", - 4: "ISTIO_MUTUAL", -} - -var Server_TLSOptions_TLSmode_value = map[string]int32{ - "PASSTHROUGH": 0, - "SIMPLE": 1, - "MUTUAL": 2, - "AUTO_PASSTHROUGH": 3, - "ISTIO_MUTUAL": 4, -} - -func (x Server_TLSOptions_TLSmode) String() string { - return proto.EnumName(Server_TLSOptions_TLSmode_name, int32(x)) -} - -func (Server_TLSOptions_TLSmode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_067d98d02f84cc0b, []int{1, 0, 0} -} - -// TLS protocol versions. -type Server_TLSOptions_TLSProtocol int32 - -const ( - // Automatically choose the optimal TLS version. - Server_TLSOptions_TLS_AUTO Server_TLSOptions_TLSProtocol = 0 - // TLS version 1.0 - Server_TLSOptions_TLSV1_0 Server_TLSOptions_TLSProtocol = 1 - // TLS version 1.1 - Server_TLSOptions_TLSV1_1 Server_TLSOptions_TLSProtocol = 2 - // TLS version 1.2 - Server_TLSOptions_TLSV1_2 Server_TLSOptions_TLSProtocol = 3 - // TLS version 1.3 - Server_TLSOptions_TLSV1_3 Server_TLSOptions_TLSProtocol = 4 -) - -var Server_TLSOptions_TLSProtocol_name = map[int32]string{ - 0: "TLS_AUTO", - 1: "TLSV1_0", - 2: "TLSV1_1", - 3: "TLSV1_2", - 4: "TLSV1_3", -} - -var Server_TLSOptions_TLSProtocol_value = map[string]int32{ - "TLS_AUTO": 0, - "TLSV1_0": 1, - "TLSV1_1": 2, - "TLSV1_2": 3, - "TLSV1_3": 4, -} - -func (x Server_TLSOptions_TLSProtocol) String() string { - return proto.EnumName(Server_TLSOptions_TLSProtocol_name, int32(x)) -} - -func (Server_TLSOptions_TLSProtocol) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_067d98d02f84cc0b, []int{1, 0, 1} -} - -// Gateway describes a load balancer operating at the edge of the mesh -// receiving incoming or outgoing HTTP/TCP connections. -// -// -// -// -type Gateway struct { - // A list of server specifications. - Servers []*Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"` - // One or more labels that indicate a specific set of pods/VMs - // on which this gateway configuration should be applied. The scope of - // label search is restricted to the configuration namespace in which the - // the resource is present. In other words, the Gateway resource must - // reside in the same namespace as the gateway workload instance. - Selector map[string]string `protobuf:"bytes,2,rep,name=selector,proto3" json:"selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Gateway) Reset() { *m = Gateway{} } -func (m *Gateway) String() string { return proto.CompactTextString(m) } -func (*Gateway) ProtoMessage() {} -func (*Gateway) Descriptor() ([]byte, []int) { - return fileDescriptor_067d98d02f84cc0b, []int{0} -} -func (m *Gateway) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Gateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Gateway.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Gateway) XXX_Merge(src proto.Message) { - xxx_messageInfo_Gateway.Merge(m, src) -} -func (m *Gateway) XXX_Size() int { - return m.Size() -} -func (m *Gateway) XXX_DiscardUnknown() { - xxx_messageInfo_Gateway.DiscardUnknown(m) -} - -var xxx_messageInfo_Gateway proto.InternalMessageInfo - -func (m *Gateway) GetServers() []*Server { - if m != nil { - return m.Servers - } - return nil -} - -func (m *Gateway) GetSelector() map[string]string { - if m != nil { - return m.Selector - } - return nil -} - -// `Server` describes the properties of the proxy on a given load balancer -// port. For example, -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: Gateway -// metadata: -// name: my-ingress -// spec: -// selector: -// app: my-ingress-gateway -// servers: -// - port: -// number: 80 -// name: http2 -// protocol: HTTP2 -// hosts: -// - "*" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: Gateway -// metadata: -// name: my-ingress -// spec: -// selector: -// app: my-ingress-gateway -// servers: -// - port: -// number: 80 -// name: http2 -// protocol: HTTP2 -// hosts: -// - "*" -// ``` -// {{}} -// {{}} -// -// Another example -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: Gateway -// metadata: -// name: my-tcp-ingress -// spec: -// selector: -// app: my-tcp-ingress-gateway -// servers: -// - port: -// number: 27018 -// name: mongo -// protocol: MONGO -// hosts: -// - "*" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: Gateway -// metadata: -// name: my-tcp-ingress -// spec: -// selector: -// app: my-tcp-ingress-gateway -// servers: -// - port: -// number: 27018 -// name: mongo -// protocol: MONGO -// hosts: -// - "*" -// ``` -// {{}} -// {{}} -// -// The following is an example of TLS configuration for port 443 -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: Gateway -// metadata: -// name: my-tls-ingress -// spec: -// selector: -// app: my-tls-ingress-gateway -// servers: -// - port: -// number: 443 -// name: https -// protocol: HTTPS -// hosts: -// - "*" -// tls: -// mode: SIMPLE -// serverCertificate: /etc/certs/server.pem -// privateKey: /etc/certs/privatekey.pem -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: Gateway -// metadata: -// name: my-tls-ingress -// spec: -// selector: -// app: my-tls-ingress-gateway -// servers: -// - port: -// number: 443 -// name: https -// protocol: HTTPS -// hosts: -// - "*" -// tls: -// mode: SIMPLE -// serverCertificate: /etc/certs/server.pem -// privateKey: /etc/certs/privatekey.pem -// ``` -// {{}} -// {{}} -// -type Server struct { - // The Port on which the proxy should listen for incoming - // connections. - Port *Port `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"` - // $hide_from_docs - // The ip or the Unix domain socket to which the listener should be bound - // to. Format: `x.x.x.x` or `unix:///path/to/uds` or `unix://@foobar` - // (Linux abstract namespace). When using Unix domain sockets, the port - // number should be 0. - Bind string `protobuf:"bytes,4,opt,name=bind,proto3" json:"bind,omitempty"` - // One or more hosts exposed by this gateway. - // While typically applicable to - // HTTP services, it can also be used for TCP services using TLS with SNI. - // A host is specified as a `dnsName` with an optional `namespace/` prefix. - // The `dnsName` should be specified using FQDN format, optionally including - // a wildcard character in the left-most component (e.g., `prod/*.example.com`). - // Set the `dnsName` to `*` to select all `VirtualService` hosts from the - // specified namespace (e.g.,`prod/*`). - // - // The `namespace` can be set to `*` or `.`, representing any or the current - // namespace, respectively. For example, `*/foo.example.com` selects the - // service from any available namespace while `./foo.example.com` only selects - // the service from the namespace of the sidecar. The default, if no `namespace/` - // is specified, is `*/`, that is, select services from any namespace. - // Any associated `DestinationRule` in the selected namespace will also be used. - // - // A `VirtualService` must be bound to the gateway and must have one or - // more hosts that match the hosts specified in a server. The match - // could be an exact match or a suffix match with the server's hosts. For - // example, if the server's hosts specifies `*.example.com`, a - // `VirtualService` with hosts `dev.example.com` or `prod.example.com` will - // match. However, a `VirtualService` with host `example.com` or - // `newexample.com` will not match. - // - // NOTE: Only virtual services exported to the gateway's namespace - // (e.g., `exportTo` value of `*`) can be referenced. - // Private configurations (e.g., `exportTo` set to `.`) will not be - // available. Refer to the `exportTo` setting in `VirtualService`, - // `DestinationRule`, and `ServiceEntry` configurations for details. - Hosts []string `protobuf:"bytes,2,rep,name=hosts,proto3" json:"hosts,omitempty"` - // Set of TLS related options that govern the server's behavior. Use - // these options to control if all http requests should be redirected to - // https, and the TLS modes to use. - Tls *Server_TLSOptions `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` - // The loopback IP endpoint or Unix domain socket to which traffic should - // be forwarded to by default. Format should be `127.0.0.1:PORT` or - // `unix:///path/to/socket` or `unix://@foobar` (Linux abstract namespace). - DefaultEndpoint string `protobuf:"bytes,5,opt,name=default_endpoint,json=defaultEndpoint,proto3" json:"default_endpoint,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Server) Reset() { *m = Server{} } -func (m *Server) String() string { return proto.CompactTextString(m) } -func (*Server) ProtoMessage() {} -func (*Server) Descriptor() ([]byte, []int) { - return fileDescriptor_067d98d02f84cc0b, []int{1} -} -func (m *Server) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Server) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Server.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Server) XXX_Merge(src proto.Message) { - xxx_messageInfo_Server.Merge(m, src) -} -func (m *Server) XXX_Size() int { - return m.Size() -} -func (m *Server) XXX_DiscardUnknown() { - xxx_messageInfo_Server.DiscardUnknown(m) -} - -var xxx_messageInfo_Server proto.InternalMessageInfo - -func (m *Server) GetPort() *Port { - if m != nil { - return m.Port - } - return nil -} - -func (m *Server) GetBind() string { - if m != nil { - return m.Bind - } - return "" -} - -func (m *Server) GetHosts() []string { - if m != nil { - return m.Hosts - } - return nil -} - -func (m *Server) GetTls() *Server_TLSOptions { - if m != nil { - return m.Tls - } - return nil -} - -func (m *Server) GetDefaultEndpoint() string { - if m != nil { - return m.DefaultEndpoint - } - return "" -} - -type Server_TLSOptions struct { - // If set to true, the load balancer will send a 301 redirect for all - // http connections, asking the clients to use HTTPS. - HttpsRedirect bool `protobuf:"varint,1,opt,name=https_redirect,json=httpsRedirect,proto3" json:"https_redirect,omitempty"` - // Optional: Indicates whether connections to this port should be - // secured using TLS. The value of this field determines how TLS is - // enforced. - Mode Server_TLSOptions_TLSmode `protobuf:"varint,2,opt,name=mode,proto3,enum=istio.networking.v1alpha3.Server_TLSOptions_TLSmode" json:"mode,omitempty"` - // REQUIRED if mode is `SIMPLE` or `MUTUAL`. The path to the file - // holding the server-side TLS certificate to use. - ServerCertificate string `protobuf:"bytes,3,opt,name=server_certificate,json=serverCertificate,proto3" json:"server_certificate,omitempty"` - // REQUIRED if mode is `SIMPLE` or `MUTUAL`. The path to the file - // holding the server's private key. - PrivateKey string `protobuf:"bytes,4,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` - // REQUIRED if mode is `MUTUAL`. The path to a file containing - // certificate authority certificates to use in verifying a presented - // client side certificate. - CaCertificates string `protobuf:"bytes,5,opt,name=ca_certificates,json=caCertificates,proto3" json:"ca_certificates,omitempty"` - // The credentialName stands for a unique identifier that can be used - // to identify the serverCertificate and the privateKey. The - // credentialName appended with suffix "-cacert" is used to identify - // the CaCertificates associated with this server. Gateway workloads - // capable of fetching credentials from a remote credential store such - // as Kubernetes secrets, will be configured to retrieve the - // serverCertificate and the privateKey using credentialName, instead - // of using the file system paths specified above. If using mutual TLS, - // gateway workload instances will retrieve the CaCertificates using - // credentialName-cacert. The semantics of the name are platform - // dependent. In Kubernetes, the default Istio supplied credential - // server expects the credentialName to match the name of the - // Kubernetes secret that holds the server certificate, the private - // key, and the CA certificate (if using mutual TLS). Set the - // `ISTIO_META_USER_SDS` metadata variable in the gateway's proxy to - // enable the dynamic credential fetching feature. - CredentialName string `protobuf:"bytes,10,opt,name=credential_name,json=credentialName,proto3" json:"credential_name,omitempty"` - // A list of alternate names to verify the subject identity in the - // certificate presented by the client. - SubjectAltNames []string `protobuf:"bytes,6,rep,name=subject_alt_names,json=subjectAltNames,proto3" json:"subject_alt_names,omitempty"` - // An optional list of base64-encoded SHA-256 hashes of the SKPIs of - // authorized client certificates. - // Note: When both verify_certificate_hash and verify_certificate_spki - // are specified, a hash matching either value will result in the - // certificate being accepted. - VerifyCertificateSpki []string `protobuf:"bytes,11,rep,name=verify_certificate_spki,json=verifyCertificateSpki,proto3" json:"verify_certificate_spki,omitempty"` - // An optional list of hex-encoded SHA-256 hashes of the - // authorized client certificates. Both simple and colon separated - // formats are acceptable. - // Note: When both verify_certificate_hash and verify_certificate_spki - // are specified, a hash matching either value will result in the - // certificate being accepted. - VerifyCertificateHash []string `protobuf:"bytes,12,rep,name=verify_certificate_hash,json=verifyCertificateHash,proto3" json:"verify_certificate_hash,omitempty"` - // Optional: Minimum TLS protocol version. - MinProtocolVersion Server_TLSOptions_TLSProtocol `protobuf:"varint,7,opt,name=min_protocol_version,json=minProtocolVersion,proto3,enum=istio.networking.v1alpha3.Server_TLSOptions_TLSProtocol" json:"min_protocol_version,omitempty"` - // Optional: Maximum TLS protocol version. - MaxProtocolVersion Server_TLSOptions_TLSProtocol `protobuf:"varint,8,opt,name=max_protocol_version,json=maxProtocolVersion,proto3,enum=istio.networking.v1alpha3.Server_TLSOptions_TLSProtocol" json:"max_protocol_version,omitempty"` - // Optional: If specified, only support the specified cipher list. - // Otherwise default to the default cipher list supported by Envoy. - CipherSuites []string `protobuf:"bytes,9,rep,name=cipher_suites,json=cipherSuites,proto3" json:"cipher_suites,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Server_TLSOptions) Reset() { *m = Server_TLSOptions{} } -func (m *Server_TLSOptions) String() string { return proto.CompactTextString(m) } -func (*Server_TLSOptions) ProtoMessage() {} -func (*Server_TLSOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_067d98d02f84cc0b, []int{1, 0} -} -func (m *Server_TLSOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Server_TLSOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Server_TLSOptions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Server_TLSOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_Server_TLSOptions.Merge(m, src) -} -func (m *Server_TLSOptions) XXX_Size() int { - return m.Size() -} -func (m *Server_TLSOptions) XXX_DiscardUnknown() { - xxx_messageInfo_Server_TLSOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_Server_TLSOptions proto.InternalMessageInfo - -func (m *Server_TLSOptions) GetHttpsRedirect() bool { - if m != nil { - return m.HttpsRedirect - } - return false -} - -func (m *Server_TLSOptions) GetMode() Server_TLSOptions_TLSmode { - if m != nil { - return m.Mode - } - return Server_TLSOptions_PASSTHROUGH -} - -func (m *Server_TLSOptions) GetServerCertificate() string { - if m != nil { - return m.ServerCertificate - } - return "" -} - -func (m *Server_TLSOptions) GetPrivateKey() string { - if m != nil { - return m.PrivateKey - } - return "" -} - -func (m *Server_TLSOptions) GetCaCertificates() string { - if m != nil { - return m.CaCertificates - } - return "" -} - -func (m *Server_TLSOptions) GetCredentialName() string { - if m != nil { - return m.CredentialName - } - return "" -} - -func (m *Server_TLSOptions) GetSubjectAltNames() []string { - if m != nil { - return m.SubjectAltNames - } - return nil -} - -func (m *Server_TLSOptions) GetVerifyCertificateSpki() []string { - if m != nil { - return m.VerifyCertificateSpki - } - return nil -} - -func (m *Server_TLSOptions) GetVerifyCertificateHash() []string { - if m != nil { - return m.VerifyCertificateHash - } - return nil -} - -func (m *Server_TLSOptions) GetMinProtocolVersion() Server_TLSOptions_TLSProtocol { - if m != nil { - return m.MinProtocolVersion - } - return Server_TLSOptions_TLS_AUTO -} - -func (m *Server_TLSOptions) GetMaxProtocolVersion() Server_TLSOptions_TLSProtocol { - if m != nil { - return m.MaxProtocolVersion - } - return Server_TLSOptions_TLS_AUTO -} - -func (m *Server_TLSOptions) GetCipherSuites() []string { - if m != nil { - return m.CipherSuites - } - return nil -} - -// Port describes the properties of a specific port of a service. -type Port struct { - // A valid non-negative integer port number. - Number uint32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` - // The protocol exposed on the port. - // MUST BE one of HTTP|HTTPS|GRPC|HTTP2|MONGO|TCP|TLS. - // TLS implies the connection will be routed based on the SNI header to - // the destination without terminating the TLS connection. - Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` - // Label assigned to the port. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Port) Reset() { *m = Port{} } -func (m *Port) String() string { return proto.CompactTextString(m) } -func (*Port) ProtoMessage() {} -func (*Port) Descriptor() ([]byte, []int) { - return fileDescriptor_067d98d02f84cc0b, []int{2} -} -func (m *Port) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Port) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Port.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Port) XXX_Merge(src proto.Message) { - xxx_messageInfo_Port.Merge(m, src) -} -func (m *Port) XXX_Size() int { - return m.Size() -} -func (m *Port) XXX_DiscardUnknown() { - xxx_messageInfo_Port.DiscardUnknown(m) -} - -var xxx_messageInfo_Port proto.InternalMessageInfo - -func (m *Port) GetNumber() uint32 { - if m != nil { - return m.Number - } - return 0 -} - -func (m *Port) GetProtocol() string { - if m != nil { - return m.Protocol - } - return "" -} - -func (m *Port) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func init() { - proto.RegisterEnum("istio.networking.v1alpha3.Server_TLSOptions_TLSmode", Server_TLSOptions_TLSmode_name, Server_TLSOptions_TLSmode_value) - proto.RegisterEnum("istio.networking.v1alpha3.Server_TLSOptions_TLSProtocol", Server_TLSOptions_TLSProtocol_name, Server_TLSOptions_TLSProtocol_value) - proto.RegisterType((*Gateway)(nil), "istio.networking.v1alpha3.Gateway") - proto.RegisterMapType((map[string]string)(nil), "istio.networking.v1alpha3.Gateway.SelectorEntry") - proto.RegisterType((*Server)(nil), "istio.networking.v1alpha3.Server") - proto.RegisterType((*Server_TLSOptions)(nil), "istio.networking.v1alpha3.Server.TLSOptions") - proto.RegisterType((*Port)(nil), "istio.networking.v1alpha3.Port") -} - -func init() { proto.RegisterFile("networking/v1alpha3/gateway.proto", fileDescriptor_067d98d02f84cc0b) } - -var fileDescriptor_067d98d02f84cc0b = []byte{ - // 762 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x5d, 0x6f, 0x22, 0x37, - 0x14, 0xdd, 0x01, 0xc2, 0xc7, 0x05, 0xc2, 0xac, 0x95, 0xaa, 0xb3, 0xa9, 0x14, 0xb2, 0x54, 0x55, - 0xb7, 0x55, 0x3b, 0x6c, 0x48, 0x55, 0x45, 0xad, 0x54, 0x95, 0xad, 0xa2, 0x10, 0x95, 0x14, 0x3a, - 0x03, 0x51, 0x95, 0x97, 0x91, 0x19, 0x0c, 0xe3, 0x30, 0x8c, 0x47, 0xb6, 0x21, 0xe1, 0xff, 0xf5, - 0xa1, 0x8f, 0x7d, 0xef, 0x4b, 0x14, 0xa9, 0xff, 0xa3, 0x1a, 0x7b, 0x08, 0xf4, 0x23, 0xa9, 0xa2, - 0x7d, 0xb3, 0x8f, 0xcf, 0x39, 0xf7, 0xda, 0xd7, 0xf7, 0xc2, 0xeb, 0x88, 0xc8, 0x1b, 0xc6, 0x67, - 0x34, 0x9a, 0x36, 0x97, 0x47, 0x38, 0x8c, 0x03, 0x7c, 0xdc, 0x9c, 0x62, 0x49, 0x6e, 0xf0, 0xca, - 0x8e, 0x39, 0x93, 0x0c, 0xbd, 0xa2, 0x42, 0x52, 0x66, 0x6f, 0x88, 0xf6, 0x9a, 0xb8, 0x5f, 0x9f, - 0x32, 0x36, 0x0d, 0x49, 0x13, 0xc7, 0xb4, 0x39, 0xa1, 0x24, 0x1c, 0x7b, 0x23, 0x12, 0xe0, 0x25, - 0x65, 0x5c, 0x6b, 0x1b, 0x7f, 0x18, 0x50, 0x38, 0xd3, 0x6e, 0xe8, 0x7b, 0x28, 0x08, 0xc2, 0x97, - 0x84, 0x0b, 0xcb, 0x38, 0xcc, 0xbe, 0x29, 0xb7, 0x5e, 0xdb, 0x8f, 0x3a, 0xdb, 0xae, 0x62, 0xbe, - 0xcb, 0xde, 0xb5, 0x33, 0xce, 0x5a, 0x86, 0x7e, 0x86, 0xa2, 0x20, 0x21, 0xf1, 0x25, 0xe3, 0x56, - 0x46, 0x59, 0xbc, 0x7d, 0xc2, 0x22, 0x8d, 0x6b, 0xbb, 0xa9, 0xe4, 0x34, 0x92, 0x7c, 0xa5, 0x1d, - 0x1f, 0x6c, 0xf6, 0xbf, 0x85, 0xea, 0xdf, 0xce, 0x91, 0x09, 0xd9, 0x19, 0x59, 0x59, 0xc6, 0xa1, - 0xf1, 0xa6, 0xe4, 0x24, 0x4b, 0xb4, 0x07, 0x3b, 0x4b, 0x1c, 0x2e, 0x88, 0x95, 0x51, 0x98, 0xde, - 0x7c, 0x93, 0x39, 0x31, 0x1a, 0xbf, 0x16, 0x21, 0xaf, 0x13, 0x45, 0x27, 0x90, 0x8b, 0x19, 0x97, - 0x4a, 0x57, 0x6e, 0xd5, 0x9f, 0x48, 0xab, 0xcf, 0xb8, 0xd4, 0x59, 0x28, 0x05, 0x42, 0x90, 0x1b, - 0xd1, 0x68, 0x6c, 0xe5, 0x94, 0xbb, 0x5a, 0xa3, 0x57, 0xb0, 0x13, 0x30, 0x21, 0x85, 0xba, 0x65, - 0x49, 0xb3, 0x35, 0x82, 0xbe, 0x83, 0xac, 0x0c, 0x85, 0x95, 0x55, 0x71, 0xbe, 0xf8, 0xdf, 0x17, - 0xb4, 0x07, 0x5d, 0xb7, 0x17, 0x4b, 0xca, 0x22, 0xe1, 0x24, 0x42, 0xf4, 0x19, 0x98, 0x63, 0x32, - 0xc1, 0x8b, 0x50, 0x7a, 0x24, 0x1a, 0xc7, 0x8c, 0x46, 0xd2, 0xda, 0x51, 0xa1, 0x6b, 0x29, 0x7e, - 0x9a, 0xc2, 0xfb, 0x7f, 0xe6, 0x01, 0x36, 0x72, 0xf4, 0x09, 0xec, 0x06, 0x52, 0xc6, 0xc2, 0xe3, - 0x64, 0x4c, 0x39, 0xf1, 0xf5, 0x65, 0x8b, 0x4e, 0x55, 0xa1, 0x4e, 0x0a, 0xa2, 0x0e, 0xe4, 0xe6, - 0x6c, 0xac, 0x5f, 0x6b, 0xb7, 0xf5, 0xd5, 0x73, 0x32, 0x4c, 0x96, 0x89, 0xd6, 0x51, 0x0e, 0xe8, - 0x4b, 0x40, 0xba, 0xf2, 0x9e, 0x4f, 0xb8, 0xa4, 0x13, 0xea, 0x63, 0x49, 0xd4, 0xcd, 0x4b, 0xce, - 0x4b, 0x7d, 0xf2, 0xc3, 0xe6, 0x00, 0xd5, 0xa1, 0x1c, 0x73, 0xba, 0xc4, 0x92, 0x78, 0x49, 0x05, - 0xf5, 0x7b, 0x42, 0x0a, 0xfd, 0x48, 0x56, 0xe8, 0x53, 0xa8, 0xf9, 0x78, 0xdb, 0x4b, 0xa4, 0x37, - 0xdf, 0xf5, 0xf1, 0x96, 0x91, 0x50, 0x44, 0x4e, 0xc6, 0x24, 0x92, 0x14, 0x87, 0x5e, 0x84, 0xe7, - 0xc4, 0x82, 0x94, 0xf8, 0x00, 0xff, 0x84, 0xe7, 0x04, 0x7d, 0x0e, 0x2f, 0xc5, 0x62, 0x74, 0x4d, - 0x7c, 0xe9, 0xe1, 0x50, 0x2a, 0xa6, 0xb0, 0xf2, 0x49, 0xcd, 0x9c, 0x5a, 0x7a, 0xd0, 0x0e, 0x65, - 0x42, 0x15, 0xe8, 0x6b, 0xf8, 0x70, 0x49, 0x38, 0x9d, 0xac, 0xb6, 0x33, 0xf0, 0x44, 0x3c, 0xa3, - 0x56, 0x59, 0x29, 0x3e, 0xd0, 0xc7, 0x5b, 0x99, 0xb8, 0xf1, 0x8c, 0x3e, 0xa2, 0x0b, 0xb0, 0x08, - 0xac, 0xca, 0x23, 0xba, 0x0e, 0x16, 0x01, 0xba, 0x86, 0xbd, 0x39, 0x8d, 0x3c, 0xd5, 0x87, 0x3e, - 0x0b, 0xbd, 0xa4, 0x83, 0x28, 0x8b, 0xac, 0x82, 0xaa, 0xcb, 0xc9, 0x73, 0xeb, 0xd2, 0x4f, 0x7d, - 0x1c, 0x34, 0xa7, 0xd1, 0x7a, 0x73, 0xa9, 0x3d, 0x55, 0x2c, 0x7c, 0xfb, 0xef, 0x58, 0xc5, 0xf7, - 0x8e, 0x85, 0x6f, 0xff, 0x19, 0xeb, 0x63, 0xa8, 0xfa, 0x34, 0x0e, 0x08, 0xf7, 0xc4, 0x82, 0x26, - 0x35, 0x2c, 0xa9, 0x57, 0xa8, 0x68, 0xd0, 0x55, 0x58, 0xe3, 0x0a, 0x0a, 0xe9, 0x5f, 0x42, 0x35, - 0x28, 0xf7, 0xdb, 0xae, 0x3b, 0xe8, 0x38, 0xbd, 0xe1, 0x59, 0xc7, 0x7c, 0x81, 0x00, 0xf2, 0xee, - 0xf9, 0x45, 0xbf, 0x7b, 0x6a, 0x1a, 0xc9, 0xfa, 0x62, 0x38, 0x18, 0xb6, 0xbb, 0x66, 0x06, 0xed, - 0x81, 0xd9, 0x1e, 0x0e, 0x7a, 0xde, 0x36, 0x3b, 0x8b, 0x4c, 0xa8, 0x9c, 0xbb, 0x83, 0xf3, 0x9e, - 0x97, 0xf2, 0x72, 0x8d, 0x1e, 0x94, 0xb7, 0x72, 0x44, 0x15, 0x28, 0x0e, 0xba, 0xae, 0x97, 0x48, - 0xcd, 0x17, 0xa8, 0xac, 0x02, 0x5f, 0x1e, 0x79, 0x6f, 0x4d, 0x63, 0xb3, 0x39, 0x32, 0x33, 0x9b, - 0x4d, 0xcb, 0xcc, 0x6e, 0x36, 0xc7, 0x66, 0xae, 0xf1, 0x0b, 0xe4, 0x92, 0xa1, 0x80, 0x3e, 0x82, - 0x7c, 0xb4, 0x98, 0x8f, 0x08, 0x57, 0x8d, 0x55, 0xd5, 0x6d, 0x9f, 0x42, 0xa8, 0x0e, 0xc5, 0xf5, - 0xf3, 0xea, 0x41, 0x94, 0x4e, 0xb2, 0x35, 0x98, 0xcc, 0x11, 0xf5, 0x53, 0x75, 0x7f, 0xa8, 0xf5, - 0x3b, 0xfb, 0xb7, 0xfb, 0x03, 0xe3, 0xf7, 0xfb, 0x03, 0xe3, 0xee, 0xfe, 0xc0, 0xb8, 0x3a, 0xd4, - 0x65, 0xa0, 0x4c, 0xcd, 0xeb, 0xff, 0x18, 0xfc, 0xa3, 0xbc, 0x72, 0x3b, 0xfe, 0x2b, 0x00, 0x00, - 0xff, 0xff, 0x52, 0x8a, 0xc5, 0xe7, 0x16, 0x06, 0x00, 0x00, -} - -func (m *Gateway) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Gateway) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Gateway) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Selector) > 0 { - for k := range m.Selector { - v := m.Selector[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGateway(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintGateway(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintGateway(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Servers) > 0 { - for iNdEx := len(m.Servers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Servers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGateway(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Server) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Server) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Server) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.DefaultEndpoint) > 0 { - i -= len(m.DefaultEndpoint) - copy(dAtA[i:], m.DefaultEndpoint) - i = encodeVarintGateway(dAtA, i, uint64(len(m.DefaultEndpoint))) - i-- - dAtA[i] = 0x2a - } - if len(m.Bind) > 0 { - i -= len(m.Bind) - copy(dAtA[i:], m.Bind) - i = encodeVarintGateway(dAtA, i, uint64(len(m.Bind))) - i-- - dAtA[i] = 0x22 - } - if m.Tls != nil { - { - size, err := m.Tls.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGateway(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Hosts) > 0 { - for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Hosts[iNdEx]) - copy(dAtA[i:], m.Hosts[iNdEx]) - i = encodeVarintGateway(dAtA, i, uint64(len(m.Hosts[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.Port != nil { - { - size, err := m.Port.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGateway(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Server_TLSOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Server_TLSOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Server_TLSOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.VerifyCertificateHash) > 0 { - for iNdEx := len(m.VerifyCertificateHash) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.VerifyCertificateHash[iNdEx]) - copy(dAtA[i:], m.VerifyCertificateHash[iNdEx]) - i = encodeVarintGateway(dAtA, i, uint64(len(m.VerifyCertificateHash[iNdEx]))) - i-- - dAtA[i] = 0x62 - } - } - if len(m.VerifyCertificateSpki) > 0 { - for iNdEx := len(m.VerifyCertificateSpki) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.VerifyCertificateSpki[iNdEx]) - copy(dAtA[i:], m.VerifyCertificateSpki[iNdEx]) - i = encodeVarintGateway(dAtA, i, uint64(len(m.VerifyCertificateSpki[iNdEx]))) - i-- - dAtA[i] = 0x5a - } - } - if len(m.CredentialName) > 0 { - i -= len(m.CredentialName) - copy(dAtA[i:], m.CredentialName) - i = encodeVarintGateway(dAtA, i, uint64(len(m.CredentialName))) - i-- - dAtA[i] = 0x52 - } - if len(m.CipherSuites) > 0 { - for iNdEx := len(m.CipherSuites) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CipherSuites[iNdEx]) - copy(dAtA[i:], m.CipherSuites[iNdEx]) - i = encodeVarintGateway(dAtA, i, uint64(len(m.CipherSuites[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if m.MaxProtocolVersion != 0 { - i = encodeVarintGateway(dAtA, i, uint64(m.MaxProtocolVersion)) - i-- - dAtA[i] = 0x40 - } - if m.MinProtocolVersion != 0 { - i = encodeVarintGateway(dAtA, i, uint64(m.MinProtocolVersion)) - i-- - dAtA[i] = 0x38 - } - if len(m.SubjectAltNames) > 0 { - for iNdEx := len(m.SubjectAltNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SubjectAltNames[iNdEx]) - copy(dAtA[i:], m.SubjectAltNames[iNdEx]) - i = encodeVarintGateway(dAtA, i, uint64(len(m.SubjectAltNames[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.CaCertificates) > 0 { - i -= len(m.CaCertificates) - copy(dAtA[i:], m.CaCertificates) - i = encodeVarintGateway(dAtA, i, uint64(len(m.CaCertificates))) - i-- - dAtA[i] = 0x2a - } - if len(m.PrivateKey) > 0 { - i -= len(m.PrivateKey) - copy(dAtA[i:], m.PrivateKey) - i = encodeVarintGateway(dAtA, i, uint64(len(m.PrivateKey))) - i-- - dAtA[i] = 0x22 - } - if len(m.ServerCertificate) > 0 { - i -= len(m.ServerCertificate) - copy(dAtA[i:], m.ServerCertificate) - i = encodeVarintGateway(dAtA, i, uint64(len(m.ServerCertificate))) - i-- - dAtA[i] = 0x1a - } - if m.Mode != 0 { - i = encodeVarintGateway(dAtA, i, uint64(m.Mode)) - i-- - dAtA[i] = 0x10 - } - if m.HttpsRedirect { - i-- - if m.HttpsRedirect { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Port) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Port) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Port) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGateway(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.Protocol) > 0 { - i -= len(m.Protocol) - copy(dAtA[i:], m.Protocol) - i = encodeVarintGateway(dAtA, i, uint64(len(m.Protocol))) - i-- - dAtA[i] = 0x12 - } - if m.Number != 0 { - i = encodeVarintGateway(dAtA, i, uint64(m.Number)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintGateway(dAtA []byte, offset int, v uint64) int { - offset -= sovGateway(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Gateway) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Servers) > 0 { - for _, e := range m.Servers { - l = e.Size() - n += 1 + l + sovGateway(uint64(l)) - } - } - if len(m.Selector) > 0 { - for k, v := range m.Selector { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGateway(uint64(len(k))) + 1 + len(v) + sovGateway(uint64(len(v))) - n += mapEntrySize + 1 + sovGateway(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Server) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Port != nil { - l = m.Port.Size() - n += 1 + l + sovGateway(uint64(l)) - } - if len(m.Hosts) > 0 { - for _, s := range m.Hosts { - l = len(s) - n += 1 + l + sovGateway(uint64(l)) - } - } - if m.Tls != nil { - l = m.Tls.Size() - n += 1 + l + sovGateway(uint64(l)) - } - l = len(m.Bind) - if l > 0 { - n += 1 + l + sovGateway(uint64(l)) - } - l = len(m.DefaultEndpoint) - if l > 0 { - n += 1 + l + sovGateway(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Server_TLSOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HttpsRedirect { - n += 2 - } - if m.Mode != 0 { - n += 1 + sovGateway(uint64(m.Mode)) - } - l = len(m.ServerCertificate) - if l > 0 { - n += 1 + l + sovGateway(uint64(l)) - } - l = len(m.PrivateKey) - if l > 0 { - n += 1 + l + sovGateway(uint64(l)) - } - l = len(m.CaCertificates) - if l > 0 { - n += 1 + l + sovGateway(uint64(l)) - } - if len(m.SubjectAltNames) > 0 { - for _, s := range m.SubjectAltNames { - l = len(s) - n += 1 + l + sovGateway(uint64(l)) - } - } - if m.MinProtocolVersion != 0 { - n += 1 + sovGateway(uint64(m.MinProtocolVersion)) - } - if m.MaxProtocolVersion != 0 { - n += 1 + sovGateway(uint64(m.MaxProtocolVersion)) - } - if len(m.CipherSuites) > 0 { - for _, s := range m.CipherSuites { - l = len(s) - n += 1 + l + sovGateway(uint64(l)) - } - } - l = len(m.CredentialName) - if l > 0 { - n += 1 + l + sovGateway(uint64(l)) - } - if len(m.VerifyCertificateSpki) > 0 { - for _, s := range m.VerifyCertificateSpki { - l = len(s) - n += 1 + l + sovGateway(uint64(l)) - } - } - if len(m.VerifyCertificateHash) > 0 { - for _, s := range m.VerifyCertificateHash { - l = len(s) - n += 1 + l + sovGateway(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Port) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Number != 0 { - n += 1 + sovGateway(uint64(m.Number)) - } - l = len(m.Protocol) - if l > 0 { - n += 1 + l + sovGateway(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovGateway(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovGateway(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGateway(x uint64) (n int) { - return sovGateway(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Gateway) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Gateway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Gateway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Servers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Servers = append(m.Servers, &Server{}) - if err := m.Servers[len(m.Servers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Selector == nil { - m.Selector = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGateway - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGateway - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGateway - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGateway - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGateway(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGateway - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Selector[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGateway(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGateway - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGateway - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Server) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Server: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Server: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Port == nil { - m.Port = &Port{} - } - if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tls", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tls == nil { - m.Tls = &Server_TLSOptions{} - } - if err := m.Tls.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultEndpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DefaultEndpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGateway(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGateway - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGateway - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Server_TLSOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TLSOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TLSOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HttpsRedirect", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HttpsRedirect = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - m.Mode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Mode |= Server_TLSOptions_TLSmode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServerCertificate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServerCertificate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrivateKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrivateKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CaCertificates", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CaCertificates = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubjectAltNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SubjectAltNames = append(m.SubjectAltNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinProtocolVersion", wireType) - } - m.MinProtocolVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinProtocolVersion |= Server_TLSOptions_TLSProtocol(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxProtocolVersion", wireType) - } - m.MaxProtocolVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxProtocolVersion |= Server_TLSOptions_TLSProtocol(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CipherSuites", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CipherSuites = append(m.CipherSuites, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifyCertificateSpki", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerifyCertificateSpki = append(m.VerifyCertificateSpki, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifyCertificateHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerifyCertificateHash = append(m.VerifyCertificateHash, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGateway(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGateway - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGateway - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Port) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Port: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Port: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - m.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Number |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Protocol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGateway(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGateway - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGateway - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGateway(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGateway - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGateway - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGateway - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGateway - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGateway - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGateway - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGateway(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGateway - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGateway = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGateway = fmt.Errorf("proto: integer overflow") -) diff --git a/pkg/inject/api/networking/v1alpha3/gateway_deepcopy.gen.go b/pkg/inject/api/networking/v1alpha3/gateway_deepcopy.gen.go deleted file mode 100644 index 480ebf2b..00000000 --- a/pkg/inject/api/networking/v1alpha3/gateway_deepcopy.gen.go +++ /dev/null @@ -1,350 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networking/v1alpha3/gateway.proto - -// `Gateway` describes a load balancer operating at the edge of the mesh -// receiving incoming or outgoing HTTP/TCP connections. The specification -// describes a set of ports that should be exposed, the type of protocol to -// use, SNI configuration for the load balancer, etc. -// -// For example, the following Gateway configuration sets up a proxy to act -// as a load balancer exposing port 80 and 9080 (http), 443 (https), -// 9443(https) and port 2379 (TCP) for ingress. The gateway will be -// applied to the proxy running on a pod with labels `app: -// my-gateway-controller`. While Istio will configure the proxy to listen -// on these ports, it is the responsibility of the user to ensure that -// external traffic to these ports are allowed into the mesh. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: Gateway -// metadata: -// name: my-gateway -// namespace: some-config-namespace -// spec: -// selector: -// app: my-gateway-controller -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - uk.bookinfo.com -// - eu.bookinfo.com -// tls: -// httpsRedirect: true # sends 301 redirect for http requests -// - port: -// number: 443 -// name: https-443 -// protocol: HTTPS -// hosts: -// - uk.bookinfo.com -// - eu.bookinfo.com -// tls: -// mode: SIMPLE # enables HTTPS on this port -// serverCertificate: /etc/certs/servercert.pem -// privateKey: /etc/certs/privatekey.pem -// - port: -// number: 9443 -// name: https-9443 -// protocol: HTTPS -// hosts: -// - "bookinfo-namespace/*.bookinfo.com" -// tls: -// mode: SIMPLE # enables HTTPS on this port -// credentialName: bookinfo-secret # fetches certs from Kubernetes secret -// - port: -// number: 9080 -// name: http-wildcard -// protocol: HTTP -// hosts: -// - "*" -// - port: -// number: 2379 # to expose internal service via external port 2379 -// name: mongo -// protocol: MONGO -// hosts: -// - "*" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: Gateway -// metadata: -// name: my-gateway -// namespace: some-config-namespace -// spec: -// selector: -// app: my-gateway-controller -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - uk.bookinfo.com -// - eu.bookinfo.com -// tls: -// httpsRedirect: true # sends 301 redirect for http requests -// - port: -// number: 443 -// name: https-443 -// protocol: HTTPS -// hosts: -// - uk.bookinfo.com -// - eu.bookinfo.com -// tls: -// mode: SIMPLE # enables HTTPS on this port -// serverCertificate: /etc/certs/servercert.pem -// privateKey: /etc/certs/privatekey.pem -// - port: -// number: 9443 -// name: https-9443 -// protocol: HTTPS -// hosts: -// - "bookinfo-namespace/*.bookinfo.com" -// tls: -// mode: SIMPLE # enables HTTPS on this port -// credentialName: bookinfo-secret # fetches certs from Kubernetes secret -// - port: -// number: 9080 -// name: http-wildcard -// protocol: HTTP -// hosts: -// - "*" -// - port: -// number: 2379 # to expose internal service via external port 2379 -// name: mongo -// protocol: MONGO -// hosts: -// - "*" -// ``` -// {{}} -// {{}} -// -// The Gateway specification above describes the L4-L6 properties of a load -// balancer. A `VirtualService` can then be bound to a gateway to control -// the forwarding of traffic arriving at a particular host or gateway port. -// -// For example, the following VirtualService splits traffic for -// `https://uk.bookinfo.com/reviews`, `https://eu.bookinfo.com/reviews`, -// `http://uk.bookinfo.com:9080/reviews`, -// `http://eu.bookinfo.com:9080/reviews` into two versions (prod and qa) of -// an internal reviews service on port 9080. In addition, requests -// containing the cookie "user: dev-123" will be sent to special port 7777 -// in the qa version. The same rule is also applicable inside the mesh for -// requests to the "reviews.prod.svc.cluster.local" service. This rule is -// applicable across ports 443, 9080. Note that `http://uk.bookinfo.com` -// gets redirected to `https://uk.bookinfo.com` (i.e. 80 redirects to 443). -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: bookinfo-rule -// namespace: bookinfo-namespace -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// - uk.bookinfo.com -// - eu.bookinfo.com -// gateways: -// - some-config-namespace/my-gateway -// - mesh # applies to all the sidecars in the mesh -// http: -// - match: -// - headers: -// cookie: -// exact: "user=dev-123" -// route: -// - destination: -// port: -// number: 7777 -// host: reviews.qa.svc.cluster.local -// - match: -// - uri: -// prefix: /reviews/ -// route: -// - destination: -// port: -// number: 9080 # can be omitted if it's the only port for reviews -// host: reviews.prod.svc.cluster.local -// weight: 80 -// - destination: -// host: reviews.qa.svc.cluster.local -// weight: 20 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: bookinfo-rule -// namespace: bookinfo-namespace -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// - uk.bookinfo.com -// - eu.bookinfo.com -// gateways: -// - some-config-namespace/my-gateway -// - mesh # applies to all the sidecars in the mesh -// http: -// - match: -// - headers: -// cookie: -// exact: "user=dev-123" -// route: -// - destination: -// port: -// number: 7777 -// host: reviews.qa.svc.cluster.local -// - match: -// - uri: -// prefix: /reviews/ -// route: -// - destination: -// port: -// number: 9080 # can be omitted if it's the only port for reviews -// host: reviews.prod.svc.cluster.local -// weight: 80 -// - destination: -// host: reviews.qa.svc.cluster.local -// weight: 20 -// ``` -// {{}} -// {{}} -// -// The following VirtualService forwards traffic arriving at (external) -// port 27017 to internal Mongo server on port 5555. This rule is not -// applicable internally in the mesh as the gateway list omits the -// reserved name `mesh`. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: bookinfo-Mongo -// namespace: bookinfo-namespace -// spec: -// hosts: -// - mongosvr.prod.svc.cluster.local # name of internal Mongo service -// gateways: -// - some-config-namespace/my-gateway # can omit the namespace if gateway is in same -// namespace as virtual service. -// tcp: -// - match: -// - port: 27017 -// route: -// - destination: -// host: mongo.prod.svc.cluster.local -// port: -// number: 5555 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: bookinfo-Mongo -// namespace: bookinfo-namespace -// spec: -// hosts: -// - mongosvr.prod.svc.cluster.local # name of internal Mongo service -// gateways: -// - some-config-namespace/my-gateway # can omit the namespace if gateway is in same -// namespace as virtual service. -// tcp: -// - match: -// - port: 27017 -// route: -// - destination: -// host: mongo.prod.svc.cluster.local -// port: -// number: 5555 -// ``` -// {{}} -// {{}} -// -// It is possible to restrict the set of virtual services that can bind to -// a gateway server using the namespace/hostname syntax in the hosts field. -// For example, the following Gateway allows any virtual service in the ns1 -// namespace to bind to it, while restricting only the virtual service with -// foo.bar.com host in the ns2 namespace to bind to it. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: Gateway -// metadata: -// name: my-gateway -// namespace: some-config-namespace -// spec: -// selector: -// app: my-gateway-controller -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - "ns1/*" -// - "ns2/foo.bar.com" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: Gateway -// metadata: -// name: my-gateway -// namespace: some-config-namespace -// spec: -// selector: -// app: my-gateway-controller -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - "ns1/*" -// - "ns2/foo.bar.com" -// ``` -// {{}} -// {{}} -// - -package v1alpha3 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - _ "github.com/polarismesh/polaris-controller/pkg/inject/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// DeepCopyInto supports using Gateway within kubernetes types, where deepcopy-gen is used. -func (in *Gateway) DeepCopyInto(out *Gateway) { - p := proto.Clone(in).(*Gateway) - *out = *p -} diff --git a/pkg/inject/api/networking/v1alpha3/gateway_json.gen.go b/pkg/inject/api/networking/v1alpha3/gateway_json.gen.go deleted file mode 100644 index 1c6617c5..00000000 --- a/pkg/inject/api/networking/v1alpha3/gateway_json.gen.go +++ /dev/null @@ -1,395 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networking/v1alpha3/gateway.proto - -// `Gateway` describes a load balancer operating at the edge of the mesh -// receiving incoming or outgoing HTTP/TCP connections. The specification -// describes a set of ports that should be exposed, the type of protocol to -// use, SNI configuration for the load balancer, etc. -// -// For example, the following Gateway configuration sets up a proxy to act -// as a load balancer exposing port 80 and 9080 (http), 443 (https), -// 9443(https) and port 2379 (TCP) for ingress. The gateway will be -// applied to the proxy running on a pod with labels `app: -// my-gateway-controller`. While Istio will configure the proxy to listen -// on these ports, it is the responsibility of the user to ensure that -// external traffic to these ports are allowed into the mesh. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: Gateway -// metadata: -// name: my-gateway -// namespace: some-config-namespace -// spec: -// selector: -// app: my-gateway-controller -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - uk.bookinfo.com -// - eu.bookinfo.com -// tls: -// httpsRedirect: true # sends 301 redirect for http requests -// - port: -// number: 443 -// name: https-443 -// protocol: HTTPS -// hosts: -// - uk.bookinfo.com -// - eu.bookinfo.com -// tls: -// mode: SIMPLE # enables HTTPS on this port -// serverCertificate: /etc/certs/servercert.pem -// privateKey: /etc/certs/privatekey.pem -// - port: -// number: 9443 -// name: https-9443 -// protocol: HTTPS -// hosts: -// - "bookinfo-namespace/*.bookinfo.com" -// tls: -// mode: SIMPLE # enables HTTPS on this port -// credentialName: bookinfo-secret # fetches certs from Kubernetes secret -// - port: -// number: 9080 -// name: http-wildcard -// protocol: HTTP -// hosts: -// - "*" -// - port: -// number: 2379 # to expose internal service via external port 2379 -// name: mongo -// protocol: MONGO -// hosts: -// - "*" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: Gateway -// metadata: -// name: my-gateway -// namespace: some-config-namespace -// spec: -// selector: -// app: my-gateway-controller -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - uk.bookinfo.com -// - eu.bookinfo.com -// tls: -// httpsRedirect: true # sends 301 redirect for http requests -// - port: -// number: 443 -// name: https-443 -// protocol: HTTPS -// hosts: -// - uk.bookinfo.com -// - eu.bookinfo.com -// tls: -// mode: SIMPLE # enables HTTPS on this port -// serverCertificate: /etc/certs/servercert.pem -// privateKey: /etc/certs/privatekey.pem -// - port: -// number: 9443 -// name: https-9443 -// protocol: HTTPS -// hosts: -// - "bookinfo-namespace/*.bookinfo.com" -// tls: -// mode: SIMPLE # enables HTTPS on this port -// credentialName: bookinfo-secret # fetches certs from Kubernetes secret -// - port: -// number: 9080 -// name: http-wildcard -// protocol: HTTP -// hosts: -// - "*" -// - port: -// number: 2379 # to expose internal service via external port 2379 -// name: mongo -// protocol: MONGO -// hosts: -// - "*" -// ``` -// {{}} -// {{}} -// -// The Gateway specification above describes the L4-L6 properties of a load -// balancer. A `VirtualService` can then be bound to a gateway to control -// the forwarding of traffic arriving at a particular host or gateway port. -// -// For example, the following VirtualService splits traffic for -// `https://uk.bookinfo.com/reviews`, `https://eu.bookinfo.com/reviews`, -// `http://uk.bookinfo.com:9080/reviews`, -// `http://eu.bookinfo.com:9080/reviews` into two versions (prod and qa) of -// an internal reviews service on port 9080. In addition, requests -// containing the cookie "user: dev-123" will be sent to special port 7777 -// in the qa version. The same rule is also applicable inside the mesh for -// requests to the "reviews.prod.svc.cluster.local" service. This rule is -// applicable across ports 443, 9080. Note that `http://uk.bookinfo.com` -// gets redirected to `https://uk.bookinfo.com` (i.e. 80 redirects to 443). -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: bookinfo-rule -// namespace: bookinfo-namespace -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// - uk.bookinfo.com -// - eu.bookinfo.com -// gateways: -// - some-config-namespace/my-gateway -// - mesh # applies to all the sidecars in the mesh -// http: -// - match: -// - headers: -// cookie: -// exact: "user=dev-123" -// route: -// - destination: -// port: -// number: 7777 -// host: reviews.qa.svc.cluster.local -// - match: -// - uri: -// prefix: /reviews/ -// route: -// - destination: -// port: -// number: 9080 # can be omitted if it's the only port for reviews -// host: reviews.prod.svc.cluster.local -// weight: 80 -// - destination: -// host: reviews.qa.svc.cluster.local -// weight: 20 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: bookinfo-rule -// namespace: bookinfo-namespace -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// - uk.bookinfo.com -// - eu.bookinfo.com -// gateways: -// - some-config-namespace/my-gateway -// - mesh # applies to all the sidecars in the mesh -// http: -// - match: -// - headers: -// cookie: -// exact: "user=dev-123" -// route: -// - destination: -// port: -// number: 7777 -// host: reviews.qa.svc.cluster.local -// - match: -// - uri: -// prefix: /reviews/ -// route: -// - destination: -// port: -// number: 9080 # can be omitted if it's the only port for reviews -// host: reviews.prod.svc.cluster.local -// weight: 80 -// - destination: -// host: reviews.qa.svc.cluster.local -// weight: 20 -// ``` -// {{}} -// {{}} -// -// The following VirtualService forwards traffic arriving at (external) -// port 27017 to internal Mongo server on port 5555. This rule is not -// applicable internally in the mesh as the gateway list omits the -// reserved name `mesh`. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: bookinfo-Mongo -// namespace: bookinfo-namespace -// spec: -// hosts: -// - mongosvr.prod.svc.cluster.local # name of internal Mongo service -// gateways: -// - some-config-namespace/my-gateway # can omit the namespace if gateway is in same -// namespace as virtual service. -// tcp: -// - match: -// - port: 27017 -// route: -// - destination: -// host: mongo.prod.svc.cluster.local -// port: -// number: 5555 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: bookinfo-Mongo -// namespace: bookinfo-namespace -// spec: -// hosts: -// - mongosvr.prod.svc.cluster.local # name of internal Mongo service -// gateways: -// - some-config-namespace/my-gateway # can omit the namespace if gateway is in same -// namespace as virtual service. -// tcp: -// - match: -// - port: 27017 -// route: -// - destination: -// host: mongo.prod.svc.cluster.local -// port: -// number: 5555 -// ``` -// {{}} -// {{}} -// -// It is possible to restrict the set of virtual services that can bind to -// a gateway server using the namespace/hostname syntax in the hosts field. -// For example, the following Gateway allows any virtual service in the ns1 -// namespace to bind to it, while restricting only the virtual service with -// foo.bar.com host in the ns2 namespace to bind to it. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: Gateway -// metadata: -// name: my-gateway -// namespace: some-config-namespace -// spec: -// selector: -// app: my-gateway-controller -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - "ns1/*" -// - "ns2/foo.bar.com" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: Gateway -// metadata: -// name: my-gateway -// namespace: some-config-namespace -// spec: -// selector: -// app: my-gateway-controller -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - "ns1/*" -// - "ns2/foo.bar.com" -// ``` -// {{}} -// {{}} -// - -package v1alpha3 - -import ( - bytes "bytes" - fmt "fmt" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - proto "github.com/gogo/protobuf/proto" - _ "github.com/polarismesh/polaris-controller/pkg/inject/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// MarshalJSON is a custom marshaler for Gateway -func (this *Gateway) MarshalJSON() ([]byte, error) { - str, err := GatewayMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Gateway -func (this *Gateway) UnmarshalJSON(b []byte) error { - return GatewayUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Server -func (this *Server) MarshalJSON() ([]byte, error) { - str, err := GatewayMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Server -func (this *Server) UnmarshalJSON(b []byte) error { - return GatewayUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Server_TLSOptions -func (this *Server_TLSOptions) MarshalJSON() ([]byte, error) { - str, err := GatewayMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Server_TLSOptions -func (this *Server_TLSOptions) UnmarshalJSON(b []byte) error { - return GatewayUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Port -func (this *Port) MarshalJSON() ([]byte, error) { - str, err := GatewayMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Port -func (this *Port) UnmarshalJSON(b []byte) error { - return GatewayUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -var ( - GatewayMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{} - GatewayUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{} -) diff --git a/pkg/inject/api/networking/v1alpha3/service_entry.pb.go b/pkg/inject/api/networking/v1alpha3/service_entry.pb.go deleted file mode 100644 index 0d10d4f1..00000000 --- a/pkg/inject/api/networking/v1alpha3/service_entry.pb.go +++ /dev/null @@ -1,2217 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networking/v1alpha3/service_entry.proto - -// `ServiceEntry` enables adding additional entries into Istio's internal -// service registry, so that auto-discovered services in the mesh can -// access/route to these manually specified services. A service entry -// describes the properties of a service (DNS name, VIPs, ports, protocols, -// endpoints). These services could be external to the mesh (e.g., web -// APIs) or mesh-internal services that are not part of the platform's -// service registry (e.g., a set of VMs talking to services in Kubernetes). -// -// The following example declares a few external APIs accessed by internal -// applications over HTTPS. The sidecar inspects the SNI value in the -// ClientHello message to route to the appropriate external service. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-https -// spec: -// hosts: -// - api.dropboxapi.com -// - www.googleapis.com -// - api.facebook.com -// location: MESH_EXTERNAL -// ports: -// - number: 443 -// name: https -// protocol: TLS -// resolution: DNS -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-https -// spec: -// hosts: -// - api.dropboxapi.com -// - www.googleapis.com -// - api.facebook.com -// location: MESH_EXTERNAL -// ports: -// - number: 443 -// name: https -// protocol: TLS -// resolution: DNS -// ``` -// {{}} -// {{}} -// -// The following configuration adds a set of MongoDB instances running on -// unmanaged VMs to Istio's registry, so that these services can be treated -// as any other service in the mesh. The associated DestinationRule is used -// to initiate mTLS connections to the database instances. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-mongocluster -// spec: -// hosts: -// - mymongodb.somedomain # not used -// addresses: -// - 192.192.192.192/24 # VIPs -// ports: -// - number: 27018 -// name: mongodb -// protocol: MONGO -// location: MESH_INTERNAL -// resolution: STATIC -// endpoints: -// - address: 2.2.2.2 -// - address: 3.3.3.3 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-mongocluster -// spec: -// hosts: -// - mymongodb.somedomain # not used -// addresses: -// - 192.192.192.192/24 # VIPs -// ports: -// - number: 27018 -// name: mongodb -// protocol: MONGO -// location: MESH_INTERNAL -// resolution: STATIC -// endpoints: -// - address: 2.2.2.2 -// - address: 3.3.3.3 -// ``` -// {{}} -// {{}} -// -// and the associated DestinationRule -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: mtls-mongocluster -// spec: -// host: mymongodb.somedomain -// trafficPolicy: -// tls: -// mode: MUTUAL -// clientCertificate: /etc/certs/myclientcert.pem -// privateKey: /etc/certs/client_private_key.pem -// caCertificates: /etc/certs/rootcacerts.pem -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: mtls-mongocluster -// spec: -// host: mymongodb.somedomain -// trafficPolicy: -// tls: -// mode: MUTUAL -// clientCertificate: /etc/certs/myclientcert.pem -// privateKey: /etc/certs/client_private_key.pem -// caCertificates: /etc/certs/rootcacerts.pem -// ``` -// {{}} -// {{}} -// -// The following example uses a combination of service entry and TLS -// routing in a virtual service to steer traffic based on the SNI value to -// an internal egress firewall. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-redirect -// spec: -// hosts: -// - wikipedia.org -// - "*.wikipedia.org" -// location: MESH_EXTERNAL -// ports: -// - number: 443 -// name: https -// protocol: TLS -// resolution: NONE -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-redirect -// spec: -// hosts: -// - wikipedia.org -// - "*.wikipedia.org" -// location: MESH_EXTERNAL -// ports: -// - number: 443 -// name: https -// protocol: TLS -// resolution: NONE -// ``` -// {{}} -// {{}} -// -// And the associated VirtualService to route based on the SNI value. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: tls-routing -// spec: -// hosts: -// - wikipedia.org -// - "*.wikipedia.org" -// tls: -// - match: -// - sniHosts: -// - wikipedia.org -// - "*.wikipedia.org" -// route: -// - destination: -// host: internal-egress-firewall.ns1.svc.cluster.local -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: tls-routing -// spec: -// hosts: -// - wikipedia.org -// - "*.wikipedia.org" -// tls: -// - match: -// - sniHosts: -// - wikipedia.org -// - "*.wikipedia.org" -// route: -// - destination: -// host: internal-egress-firewall.ns1.svc.cluster.local -// ``` -// {{}} -// {{}} -// -// The virtual service with TLS match serves to override the default SNI -// match. In the absence of a virtual service, traffic will be forwarded to -// the wikipedia domains. -// -// The following example demonstrates the use of a dedicated egress gateway -// through which all external service traffic is forwarded. -// The 'exportTo' field allows for control over the visibility of a service -// declaration to other namespaces in the mesh. By default, a service is exported -// to all namespaces. The following example restricts the visibility to the -// current namespace, represented by ".", so that it cannot be used by other -// namespaces. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-httpbin -// namespace : egress -// spec: -// hosts: -// - httpbin.com -// exportTo: -// - "." -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: DNS -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-httpbin -// namespace : egress -// spec: -// hosts: -// - httpbin.com -// exportTo: -// - "." -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: DNS -// ``` -// {{}} -// {{}} -// -// Define a gateway to handle all egress traffic. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: Gateway -// metadata: -// name: istio-egressgateway -// namespace: istio-system -// spec: -// selector: -// istio: egressgateway -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - "*" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: Gateway -// metadata: -// name: istio-egressgateway -// namespace: istio-system -// spec: -// selector: -// istio: egressgateway -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - "*" -// ``` -// {{}} -// {{}} -// -// And the associated `VirtualService` to route from the sidecar to the -// gateway service (`istio-egressgateway.istio-system.svc.cluster.local`), as -// well as route from the gateway to the external service. Note that the -// virtual service is exported to all namespaces enabling them to route traffic -// through the gateway to the external service. Forcing traffic to go through -// a managed middle proxy like this is a common practice. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: gateway-routing -// namespace: egress -// spec: -// hosts: -// - httpbin.com -// exportTo: -// - "*" -// gateways: -// - mesh -// - istio-egressgateway -// http: -// - match: -// - port: 80 -// gateways: -// - mesh -// route: -// - destination: -// host: istio-egressgateway.istio-system.svc.cluster.local -// - match: -// - port: 80 -// gateways: -// - istio-egressgateway -// route: -// - destination: -// host: httpbin.com -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: gateway-routing -// namespace: egress -// spec: -// hosts: -// - httpbin.com -// exportTo: -// - "*" -// gateways: -// - mesh -// - istio-egressgateway -// http: -// - match: -// - port: 80 -// gateways: -// - mesh -// route: -// - destination: -// host: istio-egressgateway.istio-system.svc.cluster.local -// - match: -// - port: 80 -// gateways: -// - istio-egressgateway -// route: -// - destination: -// host: httpbin.com -// ``` -// {{}} -// {{}} -// -// The following example demonstrates the use of wildcards in the hosts for -// external services. If the connection has to be routed to the IP address -// requested by the application (i.e. application resolves DNS and attempts -// to connect to a specific IP), the discovery mode must be set to `NONE`. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-wildcard-example -// spec: -// hosts: -// - "*.bar.com" -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: NONE -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-wildcard-example -// spec: -// hosts: -// - "*.bar.com" -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: NONE -// ``` -// {{}} -// {{}} -// -// The following example demonstrates a service that is available via a -// Unix Domain Socket on the host of the client. The resolution must be -// set to STATIC to use Unix address endpoints. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: unix-domain-socket-example -// spec: -// hosts: -// - "example.unix.local" -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: STATIC -// endpoints: -// - address: unix:///var/run/example/socket -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: unix-domain-socket-example -// spec: -// hosts: -// - "example.unix.local" -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: STATIC -// endpoints: -// - address: unix:///var/run/example/socket -// ``` -// {{}} -// {{}} -// -// For HTTP-based services, it is possible to create a `VirtualService` -// backed by multiple DNS addressable endpoints. In such a scenario, the -// application can use the `HTTP_PROXY` environment variable to transparently -// reroute API calls for the `VirtualService` to a chosen backend. For -// example, the following configuration creates a non-existent external -// service called foo.bar.com backed by three domains: us.foo.bar.com:8080, -// uk.foo.bar.com:9080, and in.foo.bar.com:7080 -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-dns -// spec: -// hosts: -// - foo.bar.com -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: DNS -// endpoints: -// - address: us.foo.bar.com -// ports: -// https: 8080 -// - address: uk.foo.bar.com -// ports: -// https: 9080 -// - address: in.foo.bar.com -// ports: -// https: 7080 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-dns -// spec: -// hosts: -// - foo.bar.com -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: DNS -// endpoints: -// - address: us.foo.bar.com -// ports: -// https: 8080 -// - address: uk.foo.bar.com -// ports: -// https: 9080 -// - address: in.foo.bar.com -// ports: -// https: 7080 -// ``` -// {{}} -// {{}} -// -// With `HTTP_PROXY=http://localhost/`, calls from the application to -// `http://foo.bar.com` will be load balanced across the three domains -// specified above. In other words, a call to `http://foo.bar.com/baz` would -// be translated to `http://uk.foo.bar.com/baz`. -// -// The following example illustrates the usage of a `ServiceEntry` -// containing a subject alternate name -// whose format conforms to the [SPIFFE standard](https://github.com/spiffe/spiffe/blob/master/standards/SPIFFE-ID.md): -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: httpbin -// namespace : httpbin-ns -// spec: -// hosts: -// - httpbin.com -// location: MESH_INTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: STATIC -// endpoints: -// - address: 2.2.2.2 -// - address: 3.3.3.3 -// subjectAltNames: -// - "spiffe://cluster.local/ns/httpbin-ns/sa/httpbin-service-account" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: httpbin -// namespace : httpbin-ns -// spec: -// hosts: -// - httpbin.com -// location: MESH_INTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: STATIC -// endpoints: -// - address: 2.2.2.2 -// - address: 3.3.3.3 -// subjectAltNames: -// - "spiffe://cluster.local/ns/httpbin-ns/sa/httpbin-service-account" -// ``` -// {{}} -// {{}} -// - -package v1alpha3 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - _ "github.com/polarismesh/polaris-controller/pkg/inject/googleapis/google/api" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Location specifies whether the service is part of Istio mesh or -// outside the mesh. Location determines the behavior of several -// features, such as service-to-service mTLS authentication, policy -// enforcement, etc. When communicating with services outside the mesh, -// Istio's mTLS authentication is disabled, and policy enforcement is -// performed on the client-side as opposed to server-side. -type ServiceEntry_Location int32 - -const ( - // Signifies that the service is external to the mesh. Typically used - // to indicate external services consumed through APIs. - ServiceEntry_MESH_EXTERNAL ServiceEntry_Location = 0 - // Signifies that the service is part of the mesh. Typically used to - // indicate services added explicitly as part of expanding the service - // mesh to include unmanaged infrastructure (e.g., VMs added to a - // Kubernetes based service mesh). - ServiceEntry_MESH_INTERNAL ServiceEntry_Location = 1 -) - -var ServiceEntry_Location_name = map[int32]string{ - 0: "MESH_EXTERNAL", - 1: "MESH_INTERNAL", -} - -var ServiceEntry_Location_value = map[string]int32{ - "MESH_EXTERNAL": 0, - "MESH_INTERNAL": 1, -} - -func (x ServiceEntry_Location) String() string { - return proto.EnumName(ServiceEntry_Location_name, int32(x)) -} - -func (ServiceEntry_Location) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_9220e0fa673c4bf8, []int{0, 0} -} - -// Resolution determines how the proxy will resolve the IP addresses of -// the network endpoints associated with the service, so that it can -// route to one of them. The resolution mode specified here has no impact -// on how the application resolves the IP address associated with the -// service. The application may still have to use DNS to resolve the -// service to an IP so that the outbound traffic can be captured by the -// Proxy. Alternatively, for HTTP services, the application could -// directly communicate with the proxy (e.g., by setting HTTP_PROXY) to -// talk to these services. -type ServiceEntry_Resolution int32 - -const ( - // Assume that incoming connections have already been resolved (to a - // specific destination IP address). Such connections are typically - // routed via the proxy using mechanisms such as IP table REDIRECT/ - // eBPF. After performing any routing related transformations, the - // proxy will forward the connection to the IP address to which the - // connection was bound. - ServiceEntry_NONE ServiceEntry_Resolution = 0 - // Use the static IP addresses specified in endpoints (see below) as the - // backing instances associated with the service. - ServiceEntry_STATIC ServiceEntry_Resolution = 1 - // Attempt to resolve the IP address by querying the ambient DNS, - // during request processing. If no endpoints are specified, the proxy - // will resolve the DNS address specified in the hosts field, if - // wildcards are not used. If endpoints are specified, the DNS - // addresses specified in the endpoints will be resolved to determine - // the destination IP address. DNS resolution cannot be used with Unix - // domain socket endpoints. - ServiceEntry_DNS ServiceEntry_Resolution = 2 -) - -var ServiceEntry_Resolution_name = map[int32]string{ - 0: "NONE", - 1: "STATIC", - 2: "DNS", -} - -var ServiceEntry_Resolution_value = map[string]int32{ - "NONE": 0, - "STATIC": 1, - "DNS": 2, -} - -func (x ServiceEntry_Resolution) String() string { - return proto.EnumName(ServiceEntry_Resolution_name, int32(x)) -} - -func (ServiceEntry_Resolution) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_9220e0fa673c4bf8, []int{0, 1} -} - -// ServiceEntry enables adding additional entries into Istio's internal -// service registry. -// -// -// -// -type ServiceEntry struct { - // The hosts associated with the ServiceEntry. Could be a DNS - // name with wildcard prefix. - // - // 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules. - // 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field. - // 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value - // will be matched against the hosts field. - // - // Note that when resolution is set to type DNS - // and no endpoints are specified, the host field will be used as the DNS name - // of the endpoint to route traffic to. - Hosts []string `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty"` - // The virtual IP addresses associated with the service. Could be CIDR - // prefix. For HTTP traffic, generated route configurations will include http route - // domains for both the `addresses` and `hosts` field values and the destination will - // be identified based on the HTTP Host/Authority header. - // If one or more IP addresses are specified, - // the incoming traffic will be identified as belonging to this service - // if the destination IP matches the IP/CIDRs specified in the addresses - // field. If the Addresses field is empty, traffic will be identified - // solely based on the destination port. In such scenarios, the port on - // which the service is being accessed must not be shared by any other - // service in the mesh. In other words, the sidecar will behave as a - // simple TCP proxy, forwarding incoming traffic on a specified port to - // the specified destination endpoint IP/host. Unix domain socket - // addresses are not supported in this field. - Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` - // The ports associated with the external service. If the - // Endpoints are Unix domain socket addresses, there must be exactly one - // port. - Ports []*Port `protobuf:"bytes,3,rep,name=ports,proto3" json:"ports,omitempty"` - // Specify whether the service should be considered external to the mesh - // or part of the mesh. - Location ServiceEntry_Location `protobuf:"varint,4,opt,name=location,proto3,enum=istio.networking.v1alpha3.ServiceEntry_Location" json:"location,omitempty"` - // Service discovery mode for the hosts. Care must be taken - // when setting the resolution mode to NONE for a TCP port without - // accompanying IP addresses. In such cases, traffic to any IP on - // said port will be allowed (i.e. `0.0.0.0:`). - Resolution ServiceEntry_Resolution `protobuf:"varint,5,opt,name=resolution,proto3,enum=istio.networking.v1alpha3.ServiceEntry_Resolution" json:"resolution,omitempty"` - // One or more endpoints associated with the service. - Endpoints []*ServiceEntry_Endpoint `protobuf:"bytes,6,rep,name=endpoints,proto3" json:"endpoints,omitempty"` - // A list of namespaces to which this service is exported. Exporting a service - // allows it to be used by sidecars, gateways and virtual services defined in - // other namespaces. This feature provides a mechanism for service owners - // and mesh administrators to control the visibility of services across - // namespace boundaries. - // - // If no namespaces are specified then the service is exported to all - // namespaces by default. - // - // The value "." is reserved and defines an export to the same namespace that - // the service is declared in. Similarly the value "*" is reserved and - // defines an export to all namespaces. - // - // For a Kubernetes Service, the equivalent effect can be achieved by setting - // the annotation "networking.istio.io/exportTo" to a comma-separated list - // of namespace names. - // - // NOTE: in the current release, the `exportTo` value is restricted to - // "." or "*" (i.e., the current namespace or all namespaces). - ExportTo []string `protobuf:"bytes,7,rep,name=export_to,json=exportTo,proto3" json:"export_to,omitempty"` - // The list of subject alternate names allowed for workload instances that - // implement this service. This information is used to enforce - // [secure-naming](https://istio.io/docs/concepts/security/#secure-naming). - // If specified, the proxy will verify that the server - // certificate's subject alternate name matches one of the specified values. - SubjectAltNames []string `protobuf:"bytes,8,rep,name=subject_alt_names,json=subjectAltNames,proto3" json:"subject_alt_names,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ServiceEntry) Reset() { *m = ServiceEntry{} } -func (m *ServiceEntry) String() string { return proto.CompactTextString(m) } -func (*ServiceEntry) ProtoMessage() {} -func (*ServiceEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_9220e0fa673c4bf8, []int{0} -} -func (m *ServiceEntry) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ServiceEntry.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ServiceEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceEntry.Merge(m, src) -} -func (m *ServiceEntry) XXX_Size() int { - return m.Size() -} -func (m *ServiceEntry) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceEntry.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceEntry proto.InternalMessageInfo - -func (m *ServiceEntry) GetHosts() []string { - if m != nil { - return m.Hosts - } - return nil -} - -func (m *ServiceEntry) GetAddresses() []string { - if m != nil { - return m.Addresses - } - return nil -} - -func (m *ServiceEntry) GetPorts() []*Port { - if m != nil { - return m.Ports - } - return nil -} - -func (m *ServiceEntry) GetLocation() ServiceEntry_Location { - if m != nil { - return m.Location - } - return ServiceEntry_MESH_EXTERNAL -} - -func (m *ServiceEntry) GetResolution() ServiceEntry_Resolution { - if m != nil { - return m.Resolution - } - return ServiceEntry_NONE -} - -func (m *ServiceEntry) GetEndpoints() []*ServiceEntry_Endpoint { - if m != nil { - return m.Endpoints - } - return nil -} - -func (m *ServiceEntry) GetExportTo() []string { - if m != nil { - return m.ExportTo - } - return nil -} - -func (m *ServiceEntry) GetSubjectAltNames() []string { - if m != nil { - return m.SubjectAltNames - } - return nil -} - -// Endpoint defines a network address (IP or hostname) associated with -// the mesh service. -type ServiceEntry_Endpoint struct { - // Address associated with the network endpoint without the - // port. Domain names can be used if and only if the resolution is set - // to DNS, and must be fully-qualified without wildcards. Use the form - // unix:///absolute/path/to/socket for Unix domain socket endpoints. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // Set of ports associated with the endpoint. The ports must be - // associated with a port name that was declared as part of the - // service. Do not use for `unix://` addresses. - Ports map[string]uint32 `protobuf:"bytes,2,rep,name=ports,proto3" json:"ports,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // One or more labels associated with the endpoint. - Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Network enables Istio to group endpoints resident in the same L3 - // domain/network. All endpoints in the same network are assumed to be - // directly reachable from one another. When endpoints in different - // networks cannot reach each other directly, an Istio Gateway can be - // used to establish connectivity (usually using the - // `AUTO_PASSTHROUGH` mode in a Gateway Server). This is - // an advanced configuration used typically for spanning an Istio mesh - // over multiple clusters. - Network string `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` - // The locality associated with the endpoint. A locality corresponds - // to a failure domain (e.g., country/region/zone). Arbitrary failure - // domain hierarchies can be represented by separating each - // encapsulating failure domain by /. For example, the locality of an - // an endpoint in US, in US-East-1 region, within availability zone - // az-1, in data center rack r11 can be represented as - // us/us-east-1/az-1/r11. Istio will configure the sidecar to route to - // endpoints within the same locality as the sidecar. If none of the - // endpoints in the locality are available, endpoints parent locality - // (but within the same network ID) will be chosen. For example, if - // there are two endpoints in same network (networkID "n1"), say e1 - // with locality us/us-east-1/az-1/r11 and e2 with locality - // us/us-east-1/az-2/r12, a sidecar from us/us-east-1/az-1/r11 locality - // will prefer e1 from the same locality over e2 from a different - // locality. Endpoint e2 could be the IP associated with a gateway - // (that bridges networks n1 and n2), or the IP associated with a - // standard service endpoint. - Locality string `protobuf:"bytes,5,opt,name=locality,proto3" json:"locality,omitempty"` - // The load balancing weight associated with the endpoint. Endpoints - // with higher weights will receive proportionally higher traffic. - Weight uint32 `protobuf:"varint,6,opt,name=weight,proto3" json:"weight,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ServiceEntry_Endpoint) Reset() { *m = ServiceEntry_Endpoint{} } -func (m *ServiceEntry_Endpoint) String() string { return proto.CompactTextString(m) } -func (*ServiceEntry_Endpoint) ProtoMessage() {} -func (*ServiceEntry_Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_9220e0fa673c4bf8, []int{0, 0} -} -func (m *ServiceEntry_Endpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceEntry_Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ServiceEntry_Endpoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ServiceEntry_Endpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceEntry_Endpoint.Merge(m, src) -} -func (m *ServiceEntry_Endpoint) XXX_Size() int { - return m.Size() -} -func (m *ServiceEntry_Endpoint) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceEntry_Endpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceEntry_Endpoint proto.InternalMessageInfo - -func (m *ServiceEntry_Endpoint) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *ServiceEntry_Endpoint) GetPorts() map[string]uint32 { - if m != nil { - return m.Ports - } - return nil -} - -func (m *ServiceEntry_Endpoint) GetLabels() map[string]string { - if m != nil { - return m.Labels - } - return nil -} - -func (m *ServiceEntry_Endpoint) GetNetwork() string { - if m != nil { - return m.Network - } - return "" -} - -func (m *ServiceEntry_Endpoint) GetLocality() string { - if m != nil { - return m.Locality - } - return "" -} - -func (m *ServiceEntry_Endpoint) GetWeight() uint32 { - if m != nil { - return m.Weight - } - return 0 -} - -func init() { - proto.RegisterEnum("istio.networking.v1alpha3.ServiceEntry_Location", ServiceEntry_Location_name, ServiceEntry_Location_value) - proto.RegisterEnum("istio.networking.v1alpha3.ServiceEntry_Resolution", ServiceEntry_Resolution_name, ServiceEntry_Resolution_value) - proto.RegisterType((*ServiceEntry)(nil), "istio.networking.v1alpha3.ServiceEntry") - proto.RegisterType((*ServiceEntry_Endpoint)(nil), "istio.networking.v1alpha3.ServiceEntry.Endpoint") - proto.RegisterMapType((map[string]string)(nil), "istio.networking.v1alpha3.ServiceEntry.Endpoint.LabelsEntry") - proto.RegisterMapType((map[string]uint32)(nil), "istio.networking.v1alpha3.ServiceEntry.Endpoint.PortsEntry") -} - -func init() { - proto.RegisterFile("networking/v1alpha3/service_entry.proto", fileDescriptor_9220e0fa673c4bf8) -} - -var fileDescriptor_9220e0fa673c4bf8 = []byte{ - // 558 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x6e, 0xd3, 0x30, - 0x14, 0x5e, 0x92, 0x35, 0x4d, 0xce, 0x18, 0x74, 0x16, 0x42, 0x5e, 0x80, 0x2d, 0xec, 0x86, 0x0a, - 0xa4, 0x74, 0x6c, 0x37, 0x63, 0x70, 0xd3, 0x41, 0x24, 0x26, 0x95, 0x00, 0x69, 0x25, 0x10, 0x37, - 0x91, 0xdb, 0x9a, 0xd6, 0xcc, 0xc4, 0x55, 0xec, 0xb6, 0xf4, 0x41, 0x78, 0x19, 0x9e, 0x80, 0x4b, - 0x1e, 0x61, 0xea, 0x93, 0xa0, 0x3a, 0x49, 0xdb, 0x8b, 0x01, 0xdb, 0x5d, 0xce, 0x67, 0x7f, 0xdf, - 0xf9, 0xf9, 0x8e, 0x03, 0x8f, 0x53, 0xaa, 0xa6, 0x22, 0xbb, 0x60, 0xe9, 0xa0, 0x31, 0x79, 0x46, - 0xf8, 0x68, 0x48, 0x8e, 0x1b, 0x92, 0x66, 0x13, 0xd6, 0xa3, 0x09, 0x4d, 0x55, 0x36, 0x0b, 0x46, - 0x99, 0x50, 0x02, 0xed, 0x32, 0xa9, 0x98, 0x08, 0x56, 0xd7, 0x83, 0xf2, 0xba, 0xb7, 0x3f, 0x10, - 0x62, 0xc0, 0x69, 0x83, 0x8c, 0x58, 0xe3, 0x0b, 0xa3, 0xbc, 0x9f, 0x74, 0xe9, 0x90, 0x4c, 0x98, - 0xc8, 0x72, 0xae, 0xf7, 0xe8, 0xaa, 0x24, 0x03, 0xa2, 0xe8, 0x94, 0x14, 0xf2, 0x07, 0x3f, 0xab, - 0x70, 0xab, 0x9d, 0xa7, 0x0d, 0x17, 0x59, 0xd1, 0x2e, 0x54, 0x86, 0x42, 0x2a, 0x89, 0x0d, 0xdf, - 0xaa, 0xbb, 0x67, 0xd6, 0x65, 0xd3, 0x8c, 0x73, 0x04, 0x3d, 0x00, 0x97, 0xf4, 0xfb, 0x19, 0x95, - 0x92, 0x4a, 0x6c, 0x2e, 0x8e, 0xe3, 0x15, 0x80, 0x4e, 0xa1, 0x32, 0x12, 0x99, 0x92, 0xd8, 0xf2, - 0xad, 0xfa, 0xd6, 0xd1, 0x7e, 0xf0, 0xd7, 0xc2, 0x83, 0xf7, 0x22, 0x53, 0x85, 0xb2, 0xa6, 0xa0, - 0x16, 0x38, 0x5c, 0xf4, 0x88, 0x62, 0x22, 0xc5, 0x9b, 0xbe, 0x51, 0xbf, 0x7d, 0x74, 0xf8, 0x0f, - 0xfa, 0x7a, 0xbd, 0x41, 0xab, 0xe0, 0xc5, 0x4b, 0x05, 0xf4, 0x11, 0x20, 0xa3, 0x52, 0xf0, 0xb1, - 0xd6, 0xab, 0x68, 0xbd, 0xa3, 0xeb, 0xea, 0xc5, 0x4b, 0x66, 0x5e, 0xe1, 0x9a, 0x14, 0x8a, 0xc0, - 0xa5, 0x69, 0x7f, 0x24, 0x58, 0xaa, 0x24, 0xb6, 0x75, 0x9b, 0xd7, 0xae, 0x33, 0x2c, 0x88, 0xf1, - 0x4a, 0x02, 0xdd, 0x07, 0x97, 0x7e, 0x5f, 0x4c, 0x20, 0x51, 0x02, 0x57, 0xf5, 0x40, 0x9d, 0x1c, - 0xe8, 0x08, 0xf4, 0x04, 0x76, 0xe4, 0xb8, 0xfb, 0x95, 0xf6, 0x54, 0x42, 0xb8, 0x4a, 0x52, 0xf2, - 0x8d, 0x4a, 0xec, 0xe8, 0x4b, 0x77, 0x8a, 0x83, 0x26, 0x57, 0xd1, 0x02, 0xf6, 0x7e, 0x58, 0xe0, - 0x94, 0x09, 0xd0, 0x43, 0xa8, 0x16, 0xae, 0x60, 0xc3, 0x37, 0x4a, 0x0f, 0x4b, 0x0c, 0x7d, 0x28, - 0x7d, 0x32, 0x75, 0x03, 0x2f, 0x6e, 0xda, 0x80, 0x76, 0x4f, 0x6a, 0xac, 0xb4, 0xaf, 0x03, 0x36, - 0x27, 0x5d, 0xca, 0x4b, 0xef, 0x5f, 0xde, 0x58, 0xb3, 0xa5, 0xe9, 0xb9, 0x68, 0xa1, 0x85, 0x30, - 0x54, 0x0b, 0x01, 0xbd, 0x13, 0x6e, 0x5c, 0x86, 0xc8, 0xcb, 0xd7, 0x85, 0x33, 0x35, 0xd3, 0xf6, - 0xba, 0xf1, 0x32, 0x46, 0xf7, 0xc0, 0x9e, 0x52, 0x36, 0x18, 0x2a, 0x6c, 0xfb, 0x46, 0x7d, 0x3b, - 0x2e, 0x22, 0xef, 0x04, 0x60, 0x55, 0x38, 0xaa, 0x81, 0x75, 0x41, 0x67, 0xf9, 0x7c, 0xe2, 0xc5, - 0x27, 0xba, 0x0b, 0x95, 0x09, 0xe1, 0x63, 0x8a, 0x4d, 0x4d, 0xcb, 0x83, 0x53, 0xf3, 0xc4, 0xf0, - 0x9e, 0xc3, 0xd6, 0x5a, 0x79, 0xff, 0xa3, 0xba, 0x6b, 0xd4, 0x83, 0x43, 0x70, 0xca, 0xfd, 0x44, - 0x3b, 0xb0, 0xfd, 0x36, 0x6c, 0xbf, 0x49, 0xc2, 0x4f, 0x9d, 0x30, 0x8e, 0x9a, 0xad, 0xda, 0xc6, - 0x12, 0x3a, 0x8f, 0x0a, 0xc8, 0x38, 0x78, 0x0a, 0xb0, 0xda, 0x40, 0xe4, 0xc0, 0x66, 0xf4, 0x2e, - 0x0a, 0x6b, 0x1b, 0x08, 0xc0, 0x6e, 0x77, 0x9a, 0x9d, 0xf3, 0x57, 0x35, 0x03, 0x55, 0xc1, 0x7a, - 0x1d, 0xb5, 0x6b, 0xe6, 0x59, 0xf0, 0x6b, 0xbe, 0x67, 0xfc, 0x9e, 0xef, 0x19, 0x97, 0xf3, 0x3d, - 0xe3, 0xb3, 0x9f, 0x0f, 0x9d, 0x09, 0xfd, 0x43, 0xb8, 0xe2, 0xe9, 0x77, 0x6d, 0xfd, 0xe6, 0x8f, - 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x56, 0x61, 0xed, 0x81, 0x7d, 0x04, 0x00, 0x00, -} - -func (m *ServiceEntry) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceEntry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.SubjectAltNames) > 0 { - for iNdEx := len(m.SubjectAltNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SubjectAltNames[iNdEx]) - copy(dAtA[i:], m.SubjectAltNames[iNdEx]) - i = encodeVarintServiceEntry(dAtA, i, uint64(len(m.SubjectAltNames[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(m.ExportTo) > 0 { - for iNdEx := len(m.ExportTo) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExportTo[iNdEx]) - copy(dAtA[i:], m.ExportTo[iNdEx]) - i = encodeVarintServiceEntry(dAtA, i, uint64(len(m.ExportTo[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.Endpoints) > 0 { - for iNdEx := len(m.Endpoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Endpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintServiceEntry(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.Resolution != 0 { - i = encodeVarintServiceEntry(dAtA, i, uint64(m.Resolution)) - i-- - dAtA[i] = 0x28 - } - if m.Location != 0 { - i = encodeVarintServiceEntry(dAtA, i, uint64(m.Location)) - i-- - dAtA[i] = 0x20 - } - if len(m.Ports) > 0 { - for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintServiceEntry(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintServiceEntry(dAtA, i, uint64(len(m.Addresses[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Hosts) > 0 { - for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Hosts[iNdEx]) - copy(dAtA[i:], m.Hosts[iNdEx]) - i = encodeVarintServiceEntry(dAtA, i, uint64(len(m.Hosts[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ServiceEntry_Endpoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceEntry_Endpoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceEntry_Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Weight != 0 { - i = encodeVarintServiceEntry(dAtA, i, uint64(m.Weight)) - i-- - dAtA[i] = 0x30 - } - if len(m.Locality) > 0 { - i -= len(m.Locality) - copy(dAtA[i:], m.Locality) - i = encodeVarintServiceEntry(dAtA, i, uint64(len(m.Locality))) - i-- - dAtA[i] = 0x2a - } - if len(m.Network) > 0 { - i -= len(m.Network) - copy(dAtA[i:], m.Network) - i = encodeVarintServiceEntry(dAtA, i, uint64(len(m.Network))) - i-- - dAtA[i] = 0x22 - } - if len(m.Labels) > 0 { - for k := range m.Labels { - v := m.Labels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintServiceEntry(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintServiceEntry(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintServiceEntry(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Ports) > 0 { - for k := range m.Ports { - v := m.Ports[k] - baseI := i - i = encodeVarintServiceEntry(dAtA, i, uint64(v)) - i-- - dAtA[i] = 0x10 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintServiceEntry(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintServiceEntry(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintServiceEntry(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintServiceEntry(dAtA []byte, offset int, v uint64) int { - offset -= sovServiceEntry(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ServiceEntry) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Hosts) > 0 { - for _, s := range m.Hosts { - l = len(s) - n += 1 + l + sovServiceEntry(uint64(l)) - } - } - if len(m.Addresses) > 0 { - for _, s := range m.Addresses { - l = len(s) - n += 1 + l + sovServiceEntry(uint64(l)) - } - } - if len(m.Ports) > 0 { - for _, e := range m.Ports { - l = e.Size() - n += 1 + l + sovServiceEntry(uint64(l)) - } - } - if m.Location != 0 { - n += 1 + sovServiceEntry(uint64(m.Location)) - } - if m.Resolution != 0 { - n += 1 + sovServiceEntry(uint64(m.Resolution)) - } - if len(m.Endpoints) > 0 { - for _, e := range m.Endpoints { - l = e.Size() - n += 1 + l + sovServiceEntry(uint64(l)) - } - } - if len(m.ExportTo) > 0 { - for _, s := range m.ExportTo { - l = len(s) - n += 1 + l + sovServiceEntry(uint64(l)) - } - } - if len(m.SubjectAltNames) > 0 { - for _, s := range m.SubjectAltNames { - l = len(s) - n += 1 + l + sovServiceEntry(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ServiceEntry_Endpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovServiceEntry(uint64(l)) - } - if len(m.Ports) > 0 { - for k, v := range m.Ports { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovServiceEntry(uint64(len(k))) + 1 + sovServiceEntry(uint64(v)) - n += mapEntrySize + 1 + sovServiceEntry(uint64(mapEntrySize)) - } - } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovServiceEntry(uint64(len(k))) + 1 + len(v) + sovServiceEntry(uint64(len(v))) - n += mapEntrySize + 1 + sovServiceEntry(uint64(mapEntrySize)) - } - } - l = len(m.Network) - if l > 0 { - n += 1 + l + sovServiceEntry(uint64(l)) - } - l = len(m.Locality) - if l > 0 { - n += 1 + l + sovServiceEntry(uint64(l)) - } - if m.Weight != 0 { - n += 1 + sovServiceEntry(uint64(m.Weight)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovServiceEntry(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozServiceEntry(x uint64) (n int) { - return sovServiceEntry(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ServiceEntry) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthServiceEntry - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthServiceEntry - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthServiceEntry - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthServiceEntry - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthServiceEntry - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthServiceEntry - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ports = append(m.Ports, &Port{}) - if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) - } - m.Location = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Location |= ServiceEntry_Location(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Resolution", wireType) - } - m.Resolution = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Resolution |= ServiceEntry_Resolution(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Endpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthServiceEntry - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthServiceEntry - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Endpoints = append(m.Endpoints, &ServiceEntry_Endpoint{}) - if err := m.Endpoints[len(m.Endpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExportTo", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthServiceEntry - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthServiceEntry - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExportTo = append(m.ExportTo, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubjectAltNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthServiceEntry - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthServiceEntry - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SubjectAltNames = append(m.SubjectAltNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipServiceEntry(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthServiceEntry - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthServiceEntry - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceEntry_Endpoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Endpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthServiceEntry - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthServiceEntry - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthServiceEntry - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthServiceEntry - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Ports == nil { - m.Ports = make(map[string]uint32) - } - var mapkey string - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthServiceEntry - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthServiceEntry - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipServiceEntry(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthServiceEntry - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Ports[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthServiceEntry - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthServiceEntry - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Labels == nil { - m.Labels = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthServiceEntry - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthServiceEntry - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthServiceEntry - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthServiceEntry - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipServiceEntry(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthServiceEntry - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Labels[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthServiceEntry - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthServiceEntry - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Network = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Locality", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthServiceEntry - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthServiceEntry - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Locality = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) - } - m.Weight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Weight |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipServiceEntry(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthServiceEntry - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthServiceEntry - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipServiceEntry(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthServiceEntry - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthServiceEntry - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowServiceEntry - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipServiceEntry(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthServiceEntry - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthServiceEntry = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowServiceEntry = fmt.Errorf("proto: integer overflow") -) diff --git a/pkg/inject/api/networking/v1alpha3/service_entry_deepcopy.gen.go b/pkg/inject/api/networking/v1alpha3/service_entry_deepcopy.gen.go deleted file mode 100644 index 0db9d69d..00000000 --- a/pkg/inject/api/networking/v1alpha3/service_entry_deepcopy.gen.go +++ /dev/null @@ -1,647 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networking/v1alpha3/service_entry.proto - -// `ServiceEntry` enables adding additional entries into Istio's internal -// service registry, so that auto-discovered services in the mesh can -// access/route to these manually specified services. A service entry -// describes the properties of a service (DNS name, VIPs, ports, protocols, -// endpoints). These services could be external to the mesh (e.g., web -// APIs) or mesh-internal services that are not part of the platform's -// service registry (e.g., a set of VMs talking to services in Kubernetes). -// -// The following example declares a few external APIs accessed by internal -// applications over HTTPS. The sidecar inspects the SNI value in the -// ClientHello message to route to the appropriate external service. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-https -// spec: -// hosts: -// - api.dropboxapi.com -// - www.googleapis.com -// - api.facebook.com -// location: MESH_EXTERNAL -// ports: -// - number: 443 -// name: https -// protocol: TLS -// resolution: DNS -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-https -// spec: -// hosts: -// - api.dropboxapi.com -// - www.googleapis.com -// - api.facebook.com -// location: MESH_EXTERNAL -// ports: -// - number: 443 -// name: https -// protocol: TLS -// resolution: DNS -// ``` -// {{}} -// {{}} -// -// The following configuration adds a set of MongoDB instances running on -// unmanaged VMs to Istio's registry, so that these services can be treated -// as any other service in the mesh. The associated DestinationRule is used -// to initiate mTLS connections to the database instances. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-mongocluster -// spec: -// hosts: -// - mymongodb.somedomain # not used -// addresses: -// - 192.192.192.192/24 # VIPs -// ports: -// - number: 27018 -// name: mongodb -// protocol: MONGO -// location: MESH_INTERNAL -// resolution: STATIC -// endpoints: -// - address: 2.2.2.2 -// - address: 3.3.3.3 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-mongocluster -// spec: -// hosts: -// - mymongodb.somedomain # not used -// addresses: -// - 192.192.192.192/24 # VIPs -// ports: -// - number: 27018 -// name: mongodb -// protocol: MONGO -// location: MESH_INTERNAL -// resolution: STATIC -// endpoints: -// - address: 2.2.2.2 -// - address: 3.3.3.3 -// ``` -// {{}} -// {{}} -// -// and the associated DestinationRule -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: mtls-mongocluster -// spec: -// host: mymongodb.somedomain -// trafficPolicy: -// tls: -// mode: MUTUAL -// clientCertificate: /etc/certs/myclientcert.pem -// privateKey: /etc/certs/client_private_key.pem -// caCertificates: /etc/certs/rootcacerts.pem -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: mtls-mongocluster -// spec: -// host: mymongodb.somedomain -// trafficPolicy: -// tls: -// mode: MUTUAL -// clientCertificate: /etc/certs/myclientcert.pem -// privateKey: /etc/certs/client_private_key.pem -// caCertificates: /etc/certs/rootcacerts.pem -// ``` -// {{}} -// {{}} -// -// The following example uses a combination of service entry and TLS -// routing in a virtual service to steer traffic based on the SNI value to -// an internal egress firewall. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-redirect -// spec: -// hosts: -// - wikipedia.org -// - "*.wikipedia.org" -// location: MESH_EXTERNAL -// ports: -// - number: 443 -// name: https -// protocol: TLS -// resolution: NONE -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-redirect -// spec: -// hosts: -// - wikipedia.org -// - "*.wikipedia.org" -// location: MESH_EXTERNAL -// ports: -// - number: 443 -// name: https -// protocol: TLS -// resolution: NONE -// ``` -// {{}} -// {{}} -// -// And the associated VirtualService to route based on the SNI value. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: tls-routing -// spec: -// hosts: -// - wikipedia.org -// - "*.wikipedia.org" -// tls: -// - match: -// - sniHosts: -// - wikipedia.org -// - "*.wikipedia.org" -// route: -// - destination: -// host: internal-egress-firewall.ns1.svc.cluster.local -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: tls-routing -// spec: -// hosts: -// - wikipedia.org -// - "*.wikipedia.org" -// tls: -// - match: -// - sniHosts: -// - wikipedia.org -// - "*.wikipedia.org" -// route: -// - destination: -// host: internal-egress-firewall.ns1.svc.cluster.local -// ``` -// {{}} -// {{}} -// -// The virtual service with TLS match serves to override the default SNI -// match. In the absence of a virtual service, traffic will be forwarded to -// the wikipedia domains. -// -// The following example demonstrates the use of a dedicated egress gateway -// through which all external service traffic is forwarded. -// The 'exportTo' field allows for control over the visibility of a service -// declaration to other namespaces in the mesh. By default, a service is exported -// to all namespaces. The following example restricts the visibility to the -// current namespace, represented by ".", so that it cannot be used by other -// namespaces. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-httpbin -// namespace : egress -// spec: -// hosts: -// - httpbin.com -// exportTo: -// - "." -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: DNS -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-httpbin -// namespace : egress -// spec: -// hosts: -// - httpbin.com -// exportTo: -// - "." -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: DNS -// ``` -// {{}} -// {{}} -// -// Define a gateway to handle all egress traffic. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: Gateway -// metadata: -// name: istio-egressgateway -// namespace: istio-system -// spec: -// selector: -// istio: egressgateway -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - "*" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: Gateway -// metadata: -// name: istio-egressgateway -// namespace: istio-system -// spec: -// selector: -// istio: egressgateway -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - "*" -// ``` -// {{}} -// {{}} -// -// And the associated `VirtualService` to route from the sidecar to the -// gateway service (`istio-egressgateway.istio-system.svc.cluster.local`), as -// well as route from the gateway to the external service. Note that the -// virtual service is exported to all namespaces enabling them to route traffic -// through the gateway to the external service. Forcing traffic to go through -// a managed middle proxy like this is a common practice. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: gateway-routing -// namespace: egress -// spec: -// hosts: -// - httpbin.com -// exportTo: -// - "*" -// gateways: -// - mesh -// - istio-egressgateway -// http: -// - match: -// - port: 80 -// gateways: -// - mesh -// route: -// - destination: -// host: istio-egressgateway.istio-system.svc.cluster.local -// - match: -// - port: 80 -// gateways: -// - istio-egressgateway -// route: -// - destination: -// host: httpbin.com -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: gateway-routing -// namespace: egress -// spec: -// hosts: -// - httpbin.com -// exportTo: -// - "*" -// gateways: -// - mesh -// - istio-egressgateway -// http: -// - match: -// - port: 80 -// gateways: -// - mesh -// route: -// - destination: -// host: istio-egressgateway.istio-system.svc.cluster.local -// - match: -// - port: 80 -// gateways: -// - istio-egressgateway -// route: -// - destination: -// host: httpbin.com -// ``` -// {{}} -// {{}} -// -// The following example demonstrates the use of wildcards in the hosts for -// external services. If the connection has to be routed to the IP address -// requested by the application (i.e. application resolves DNS and attempts -// to connect to a specific IP), the discovery mode must be set to `NONE`. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-wildcard-example -// spec: -// hosts: -// - "*.bar.com" -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: NONE -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-wildcard-example -// spec: -// hosts: -// - "*.bar.com" -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: NONE -// ``` -// {{}} -// {{}} -// -// The following example demonstrates a service that is available via a -// Unix Domain Socket on the host of the client. The resolution must be -// set to STATIC to use Unix address endpoints. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: unix-domain-socket-example -// spec: -// hosts: -// - "example.unix.local" -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: STATIC -// endpoints: -// - address: unix:///var/run/example/socket -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: unix-domain-socket-example -// spec: -// hosts: -// - "example.unix.local" -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: STATIC -// endpoints: -// - address: unix:///var/run/example/socket -// ``` -// {{}} -// {{}} -// -// For HTTP-based services, it is possible to create a `VirtualService` -// backed by multiple DNS addressable endpoints. In such a scenario, the -// application can use the `HTTP_PROXY` environment variable to transparently -// reroute API calls for the `VirtualService` to a chosen backend. For -// example, the following configuration creates a non-existent external -// service called foo.bar.com backed by three domains: us.foo.bar.com:8080, -// uk.foo.bar.com:9080, and in.foo.bar.com:7080 -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-dns -// spec: -// hosts: -// - foo.bar.com -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: DNS -// endpoints: -// - address: us.foo.bar.com -// ports: -// https: 8080 -// - address: uk.foo.bar.com -// ports: -// https: 9080 -// - address: in.foo.bar.com -// ports: -// https: 7080 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-dns -// spec: -// hosts: -// - foo.bar.com -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: DNS -// endpoints: -// - address: us.foo.bar.com -// ports: -// https: 8080 -// - address: uk.foo.bar.com -// ports: -// https: 9080 -// - address: in.foo.bar.com -// ports: -// https: 7080 -// ``` -// {{}} -// {{}} -// -// With `HTTP_PROXY=http://localhost/`, calls from the application to -// `http://foo.bar.com` will be load balanced across the three domains -// specified above. In other words, a call to `http://foo.bar.com/baz` would -// be translated to `http://uk.foo.bar.com/baz`. -// -// The following example illustrates the usage of a `ServiceEntry` -// containing a subject alternate name -// whose format conforms to the [SPIFFE standard](https://github.com/spiffe/spiffe/blob/master/standards/SPIFFE-ID.md): -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: httpbin -// namespace : httpbin-ns -// spec: -// hosts: -// - httpbin.com -// location: MESH_INTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: STATIC -// endpoints: -// - address: 2.2.2.2 -// - address: 3.3.3.3 -// subjectAltNames: -// - "spiffe://cluster.local/ns/httpbin-ns/sa/httpbin-service-account" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: httpbin -// namespace : httpbin-ns -// spec: -// hosts: -// - httpbin.com -// location: MESH_INTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: STATIC -// endpoints: -// - address: 2.2.2.2 -// - address: 3.3.3.3 -// subjectAltNames: -// - "spiffe://cluster.local/ns/httpbin-ns/sa/httpbin-service-account" -// ``` -// {{}} -// {{}} -// - -package v1alpha3 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - _ "github.com/polarismesh/polaris-controller/pkg/inject/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// DeepCopyInto supports using ServiceEntry within kubernetes types, where deepcopy-gen is used. -func (in *ServiceEntry) DeepCopyInto(out *ServiceEntry) { - p := proto.Clone(in).(*ServiceEntry) - *out = *p -} diff --git a/pkg/inject/api/networking/v1alpha3/service_entry_json.gen.go b/pkg/inject/api/networking/v1alpha3/service_entry_json.gen.go deleted file mode 100644 index e172af6e..00000000 --- a/pkg/inject/api/networking/v1alpha3/service_entry_json.gen.go +++ /dev/null @@ -1,670 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networking/v1alpha3/service_entry.proto - -// `ServiceEntry` enables adding additional entries into Istio's internal -// service registry, so that auto-discovered services in the mesh can -// access/route to these manually specified services. A service entry -// describes the properties of a service (DNS name, VIPs, ports, protocols, -// endpoints). These services could be external to the mesh (e.g., web -// APIs) or mesh-internal services that are not part of the platform's -// service registry (e.g., a set of VMs talking to services in Kubernetes). -// -// The following example declares a few external APIs accessed by internal -// applications over HTTPS. The sidecar inspects the SNI value in the -// ClientHello message to route to the appropriate external service. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-https -// spec: -// hosts: -// - api.dropboxapi.com -// - www.googleapis.com -// - api.facebook.com -// location: MESH_EXTERNAL -// ports: -// - number: 443 -// name: https -// protocol: TLS -// resolution: DNS -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-https -// spec: -// hosts: -// - api.dropboxapi.com -// - www.googleapis.com -// - api.facebook.com -// location: MESH_EXTERNAL -// ports: -// - number: 443 -// name: https -// protocol: TLS -// resolution: DNS -// ``` -// {{}} -// {{}} -// -// The following configuration adds a set of MongoDB instances running on -// unmanaged VMs to Istio's registry, so that these services can be treated -// as any other service in the mesh. The associated DestinationRule is used -// to initiate mTLS connections to the database instances. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-mongocluster -// spec: -// hosts: -// - mymongodb.somedomain # not used -// addresses: -// - 192.192.192.192/24 # VIPs -// ports: -// - number: 27018 -// name: mongodb -// protocol: MONGO -// location: MESH_INTERNAL -// resolution: STATIC -// endpoints: -// - address: 2.2.2.2 -// - address: 3.3.3.3 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-mongocluster -// spec: -// hosts: -// - mymongodb.somedomain # not used -// addresses: -// - 192.192.192.192/24 # VIPs -// ports: -// - number: 27018 -// name: mongodb -// protocol: MONGO -// location: MESH_INTERNAL -// resolution: STATIC -// endpoints: -// - address: 2.2.2.2 -// - address: 3.3.3.3 -// ``` -// {{}} -// {{}} -// -// and the associated DestinationRule -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: mtls-mongocluster -// spec: -// host: mymongodb.somedomain -// trafficPolicy: -// tls: -// mode: MUTUAL -// clientCertificate: /etc/certs/myclientcert.pem -// privateKey: /etc/certs/client_private_key.pem -// caCertificates: /etc/certs/rootcacerts.pem -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: mtls-mongocluster -// spec: -// host: mymongodb.somedomain -// trafficPolicy: -// tls: -// mode: MUTUAL -// clientCertificate: /etc/certs/myclientcert.pem -// privateKey: /etc/certs/client_private_key.pem -// caCertificates: /etc/certs/rootcacerts.pem -// ``` -// {{}} -// {{}} -// -// The following example uses a combination of service entry and TLS -// routing in a virtual service to steer traffic based on the SNI value to -// an internal egress firewall. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-redirect -// spec: -// hosts: -// - wikipedia.org -// - "*.wikipedia.org" -// location: MESH_EXTERNAL -// ports: -// - number: 443 -// name: https -// protocol: TLS -// resolution: NONE -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-redirect -// spec: -// hosts: -// - wikipedia.org -// - "*.wikipedia.org" -// location: MESH_EXTERNAL -// ports: -// - number: 443 -// name: https -// protocol: TLS -// resolution: NONE -// ``` -// {{}} -// {{}} -// -// And the associated VirtualService to route based on the SNI value. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: tls-routing -// spec: -// hosts: -// - wikipedia.org -// - "*.wikipedia.org" -// tls: -// - match: -// - sniHosts: -// - wikipedia.org -// - "*.wikipedia.org" -// route: -// - destination: -// host: internal-egress-firewall.ns1.svc.cluster.local -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: tls-routing -// spec: -// hosts: -// - wikipedia.org -// - "*.wikipedia.org" -// tls: -// - match: -// - sniHosts: -// - wikipedia.org -// - "*.wikipedia.org" -// route: -// - destination: -// host: internal-egress-firewall.ns1.svc.cluster.local -// ``` -// {{}} -// {{}} -// -// The virtual service with TLS match serves to override the default SNI -// match. In the absence of a virtual service, traffic will be forwarded to -// the wikipedia domains. -// -// The following example demonstrates the use of a dedicated egress gateway -// through which all external service traffic is forwarded. -// The 'exportTo' field allows for control over the visibility of a service -// declaration to other namespaces in the mesh. By default, a service is exported -// to all namespaces. The following example restricts the visibility to the -// current namespace, represented by ".", so that it cannot be used by other -// namespaces. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-httpbin -// namespace : egress -// spec: -// hosts: -// - httpbin.com -// exportTo: -// - "." -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: DNS -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-httpbin -// namespace : egress -// spec: -// hosts: -// - httpbin.com -// exportTo: -// - "." -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: DNS -// ``` -// {{}} -// {{}} -// -// Define a gateway to handle all egress traffic. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: Gateway -// metadata: -// name: istio-egressgateway -// namespace: istio-system -// spec: -// selector: -// istio: egressgateway -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - "*" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: Gateway -// metadata: -// name: istio-egressgateway -// namespace: istio-system -// spec: -// selector: -// istio: egressgateway -// servers: -// - port: -// number: 80 -// name: http -// protocol: HTTP -// hosts: -// - "*" -// ``` -// {{}} -// {{}} -// -// And the associated `VirtualService` to route from the sidecar to the -// gateway service (`istio-egressgateway.istio-system.svc.cluster.local`), as -// well as route from the gateway to the external service. Note that the -// virtual service is exported to all namespaces enabling them to route traffic -// through the gateway to the external service. Forcing traffic to go through -// a managed middle proxy like this is a common practice. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: gateway-routing -// namespace: egress -// spec: -// hosts: -// - httpbin.com -// exportTo: -// - "*" -// gateways: -// - mesh -// - istio-egressgateway -// http: -// - match: -// - port: 80 -// gateways: -// - mesh -// route: -// - destination: -// host: istio-egressgateway.istio-system.svc.cluster.local -// - match: -// - port: 80 -// gateways: -// - istio-egressgateway -// route: -// - destination: -// host: httpbin.com -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: gateway-routing -// namespace: egress -// spec: -// hosts: -// - httpbin.com -// exportTo: -// - "*" -// gateways: -// - mesh -// - istio-egressgateway -// http: -// - match: -// - port: 80 -// gateways: -// - mesh -// route: -// - destination: -// host: istio-egressgateway.istio-system.svc.cluster.local -// - match: -// - port: 80 -// gateways: -// - istio-egressgateway -// route: -// - destination: -// host: httpbin.com -// ``` -// {{}} -// {{}} -// -// The following example demonstrates the use of wildcards in the hosts for -// external services. If the connection has to be routed to the IP address -// requested by the application (i.e. application resolves DNS and attempts -// to connect to a specific IP), the discovery mode must be set to `NONE`. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-wildcard-example -// spec: -// hosts: -// - "*.bar.com" -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: NONE -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-wildcard-example -// spec: -// hosts: -// - "*.bar.com" -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: NONE -// ``` -// {{}} -// {{}} -// -// The following example demonstrates a service that is available via a -// Unix Domain Socket on the host of the client. The resolution must be -// set to STATIC to use Unix address endpoints. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: unix-domain-socket-example -// spec: -// hosts: -// - "example.unix.local" -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: STATIC -// endpoints: -// - address: unix:///var/run/example/socket -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: unix-domain-socket-example -// spec: -// hosts: -// - "example.unix.local" -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: STATIC -// endpoints: -// - address: unix:///var/run/example/socket -// ``` -// {{}} -// {{}} -// -// For HTTP-based services, it is possible to create a `VirtualService` -// backed by multiple DNS addressable endpoints. In such a scenario, the -// application can use the `HTTP_PROXY` environment variable to transparently -// reroute API calls for the `VirtualService` to a chosen backend. For -// example, the following configuration creates a non-existent external -// service called foo.bar.com backed by three domains: us.foo.bar.com:8080, -// uk.foo.bar.com:9080, and in.foo.bar.com:7080 -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-dns -// spec: -// hosts: -// - foo.bar.com -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: DNS -// endpoints: -// - address: us.foo.bar.com -// ports: -// https: 8080 -// - address: uk.foo.bar.com -// ports: -// https: 9080 -// - address: in.foo.bar.com -// ports: -// https: 7080 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-dns -// spec: -// hosts: -// - foo.bar.com -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: DNS -// endpoints: -// - address: us.foo.bar.com -// ports: -// https: 8080 -// - address: uk.foo.bar.com -// ports: -// https: 9080 -// - address: in.foo.bar.com -// ports: -// https: 7080 -// ``` -// {{}} -// {{}} -// -// With `HTTP_PROXY=http://localhost/`, calls from the application to -// `http://foo.bar.com` will be load balanced across the three domains -// specified above. In other words, a call to `http://foo.bar.com/baz` would -// be translated to `http://uk.foo.bar.com/baz`. -// -// The following example illustrates the usage of a `ServiceEntry` -// containing a subject alternate name -// whose format conforms to the [SPIFFE standard](https://github.com/spiffe/spiffe/blob/master/standards/SPIFFE-ID.md): -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: httpbin -// namespace : httpbin-ns -// spec: -// hosts: -// - httpbin.com -// location: MESH_INTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: STATIC -// endpoints: -// - address: 2.2.2.2 -// - address: 3.3.3.3 -// subjectAltNames: -// - "spiffe://cluster.local/ns/httpbin-ns/sa/httpbin-service-account" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: httpbin -// namespace : httpbin-ns -// spec: -// hosts: -// - httpbin.com -// location: MESH_INTERNAL -// ports: -// - number: 80 -// name: http -// protocol: HTTP -// resolution: STATIC -// endpoints: -// - address: 2.2.2.2 -// - address: 3.3.3.3 -// subjectAltNames: -// - "spiffe://cluster.local/ns/httpbin-ns/sa/httpbin-service-account" -// ``` -// {{}} -// {{}} -// - -package v1alpha3 - -import ( - bytes "bytes" - fmt "fmt" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - proto "github.com/gogo/protobuf/proto" - _ "github.com/polarismesh/polaris-controller/pkg/inject/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// MarshalJSON is a custom marshaler for ServiceEntry -func (this *ServiceEntry) MarshalJSON() ([]byte, error) { - str, err := ServiceEntryMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for ServiceEntry -func (this *ServiceEntry) UnmarshalJSON(b []byte) error { - return ServiceEntryUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for ServiceEntry_Endpoint -func (this *ServiceEntry_Endpoint) MarshalJSON() ([]byte, error) { - str, err := ServiceEntryMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for ServiceEntry_Endpoint -func (this *ServiceEntry_Endpoint) UnmarshalJSON(b []byte) error { - return ServiceEntryUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -var ( - ServiceEntryMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{} - ServiceEntryUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{} -) diff --git a/pkg/inject/api/networking/v1alpha3/virtual_service.pb.go b/pkg/inject/api/networking/v1alpha3/virtual_service.pb.go deleted file mode 100644 index 5145bbce..00000000 --- a/pkg/inject/api/networking/v1alpha3/virtual_service.pb.go +++ /dev/null @@ -1,10333 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networking/v1alpha3/virtual_service.proto - -// Configuration affecting traffic routing. Here are a few terms useful to define -// in the context of traffic routing. -// -// `Service` a unit of application behavior bound to a unique name in a -// service registry. Services consist of multiple network *endpoints* -// implemented by workload instances running on pods, containers, VMs etc. -// -// `Service versions (a.k.a. subsets)` - In a continuous deployment -// scenario, for a given service, there can be distinct subsets of -// instances running different variants of the application binary. These -// variants are not necessarily different API versions. They could be -// iterative changes to the same service, deployed in different -// environments (prod, staging, dev, etc.). Common scenarios where this -// occurs include A/B testing, canary rollouts, etc. The choice of a -// particular version can be decided based on various criterion (headers, -// url, etc.) and/or by weights assigned to each version. Each service has -// a default version consisting of all its instances. -// -// `Source` - A downstream client calling a service. -// -// `Host` - The address used by a client when attempting to connect to a -// service. -// -// `Access model` - Applications address only the destination service -// (Host) without knowledge of individual service versions (subsets). The -// actual choice of the version is determined by the proxy/sidecar, enabling the -// application code to decouple itself from the evolution of dependent -// services. -// -// A `VirtualService` defines a set of traffic routing rules to apply when a host is -// addressed. Each routing rule defines matching criteria for traffic of a specific -// protocol. If the traffic is matched, then it is sent to a named destination service -// (or subset/version of it) defined in the registry. -// -// The source of traffic can also be matched in a routing rule. This allows routing -// to be customized for specific client contexts. -// -// The following example on Kubernetes, routes all HTTP traffic by default to -// pods of the reviews service with label "version: v1". In addition, -// HTTP requests with path starting with /wpcatalog/ or /consumercatalog/ will -// be rewritten to /newcatalog and sent to pods with label "version: v2". -// -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: reviews-route -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// http: -// - name: "reviews-v2-routes" -// match: -// - uri: -// prefix: "/wpcatalog" -// - uri: -// prefix: "/consumercatalog" -// rewrite: -// uri: "/newcatalog" -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v2 -// - name: "reviews-v1-route" -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v1 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: reviews-route -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// http: -// - name: "reviews-v2-routes" -// match: -// - uri: -// prefix: "/wpcatalog" -// - uri: -// prefix: "/consumercatalog" -// rewrite: -// uri: "/newcatalog" -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v2 -// - name: "reviews-v1-route" -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v1 -// ``` -// {{}} -// {{}} -// -// A subset/version of a route destination is identified with a reference -// to a named service subset which must be declared in a corresponding -// `DestinationRule`. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: reviews-destination -// spec: -// host: reviews.prod.svc.cluster.local -// subsets: -// - name: v1 -// labels: -// version: v1 -// - name: v2 -// labels: -// version: v2 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: reviews-destination -// spec: -// host: reviews.prod.svc.cluster.local -// subsets: -// - name: v1 -// labels: -// version: v1 -// - name: v2 -// labels: -// version: v2 -// ``` -// {{}} -// {{}} -// - -package v1alpha3 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - io "io" - _ "github.com/polarismesh/polaris-controller/pkg/inject/googleapis/google/api" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Configuration affecting traffic routing. -// -// -// -// -type VirtualService struct { - // The destination hosts to which traffic is being sent. Could - // be a DNS name with wildcard prefix or an IP address. Depending on the - // platform, short-names can also be used instead of a FQDN (i.e. has no - // dots in the name). In such a scenario, the FQDN of the host would be - // derived based on the underlying platform. - // - // A single VirtualService can be used to describe all the traffic - // properties of the corresponding hosts, including those for multiple - // HTTP and TCP ports. Alternatively, the traffic properties of a host - // can be defined using more than one VirtualService, with certain - // caveats. Refer to the - // [Operations Guide](https://istio.io/docs/ops/best-practices/traffic-management/#split-virtual-services) - // for details. - // - // *Note for Kubernetes users*: When short names are used (e.g. "reviews" - // instead of "reviews.default.svc.cluster.local"), Istio will interpret - // the short name based on the namespace of the rule, not the service. A - // rule in the "default" namespace containing a host "reviews" will be - // interpreted as "reviews.default.svc.cluster.local", irrespective of - // the actual namespace associated with the reviews service. _To avoid - // potential misconfigurations, it is recommended to always use fully - // qualified domain names over short names._ - // - // The hosts field applies to both HTTP and TCP services. Service inside - // the mesh, i.e., those found in the service registry, must always be - // referred to using their alphanumeric names. IP addresses are allowed - // only for services defined via the Gateway. - Hosts []string `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty"` - // The names of gateways and sidecars that should apply these routes. - // Gateways in other namespaces may be referred to by - // `/`; specifying a gateway with no - // namespace qualifier is the same as specifying the VirtualService's - // namespace. A single VirtualService is used for sidecars inside the mesh as - // well as for one or more gateways. The selection condition imposed by this - // field can be overridden using the source field in the match conditions - // of protocol-specific routes. The reserved word `mesh` is used to imply - // all the sidecars in the mesh. When this field is omitted, the default - // gateway (`mesh`) will be used, which would apply the rule to all - // sidecars in the mesh. If a list of gateway names is provided, the - // rules will apply only to the gateways. To apply the rules to both - // gateways and sidecars, specify `mesh` as one of the gateway names. - Gateways []string `protobuf:"bytes,2,rep,name=gateways,proto3" json:"gateways,omitempty"` - // An ordered list of route rules for HTTP traffic. HTTP routes will be - // applied to platform service ports named 'http-*'/'http2-*'/'grpc-*', gateway - // ports with protocol HTTP/HTTP2/GRPC/ TLS-terminated-HTTPS and service - // entry ports using HTTP/HTTP2/GRPC protocols. The first rule matching - // an incoming request is used. - Http []*HTTPRoute `protobuf:"bytes,3,rep,name=http,proto3" json:"http,omitempty"` - // An ordered list of route rule for non-terminated TLS & HTTPS - // traffic. Routing is typically performed using the SNI value presented - // by the ClientHello message. TLS routes will be applied to platform - // service ports named 'https-*', 'tls-*', unterminated gateway ports using - // HTTPS/TLS protocols (i.e. with "passthrough" TLS mode) and service - // entry ports using HTTPS/TLS protocols. The first rule matching an - // incoming request is used. NOTE: Traffic 'https-*' or 'tls-*' ports - // without associated virtual service will be treated as opaque TCP - // traffic. - Tls []*TLSRoute `protobuf:"bytes,5,rep,name=tls,proto3" json:"tls,omitempty"` - // An ordered list of route rules for opaque TCP traffic. TCP routes will - // be applied to any port that is not a HTTP or TLS port. The first rule - // matching an incoming request is used. - Tcp []*TCPRoute `protobuf:"bytes,4,rep,name=tcp,proto3" json:"tcp,omitempty"` - // A list of namespaces to which this virtual service is exported. Exporting a - // virtual service allows it to be used by sidecars and gateways defined in - // other namespaces. This feature provides a mechanism for service owners - // and mesh administrators to control the visibility of virtual services - // across namespace boundaries. - // - // If no namespaces are specified then the virtual service is exported to all - // namespaces by default. - // - // The value "." is reserved and defines an export to the same namespace that - // the virtual service is declared in. Similarly the value "*" is reserved and - // defines an export to all namespaces. - // - // NOTE: in the current release, the `exportTo` value is restricted to - // "." or "*" (i.e., the current namespace or all namespaces). - ExportTo []string `protobuf:"bytes,6,rep,name=export_to,json=exportTo,proto3" json:"export_to,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VirtualService) Reset() { *m = VirtualService{} } -func (m *VirtualService) String() string { return proto.CompactTextString(m) } -func (*VirtualService) ProtoMessage() {} -func (*VirtualService) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{0} -} -func (m *VirtualService) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VirtualService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VirtualService.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VirtualService) XXX_Merge(src proto.Message) { - xxx_messageInfo_VirtualService.Merge(m, src) -} -func (m *VirtualService) XXX_Size() int { - return m.Size() -} -func (m *VirtualService) XXX_DiscardUnknown() { - xxx_messageInfo_VirtualService.DiscardUnknown(m) -} - -var xxx_messageInfo_VirtualService proto.InternalMessageInfo - -func (m *VirtualService) GetHosts() []string { - if m != nil { - return m.Hosts - } - return nil -} - -func (m *VirtualService) GetGateways() []string { - if m != nil { - return m.Gateways - } - return nil -} - -func (m *VirtualService) GetHttp() []*HTTPRoute { - if m != nil { - return m.Http - } - return nil -} - -func (m *VirtualService) GetTls() []*TLSRoute { - if m != nil { - return m.Tls - } - return nil -} - -func (m *VirtualService) GetTcp() []*TCPRoute { - if m != nil { - return m.Tcp - } - return nil -} - -func (m *VirtualService) GetExportTo() []string { - if m != nil { - return m.ExportTo - } - return nil -} - -// Destination indicates the network addressable service to which the -// request/connection will be sent after processing a routing rule. The -// destination.host should unambiguously refer to a service in the service -// registry. Istio's service registry is composed of all the services found -// in the platform's service registry (e.g., Kubernetes services, Consul -// services), as well as services declared through the -// [ServiceEntry](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry) resource. -// -// *Note for Kubernetes users*: When short names are used (e.g. "reviews" -// instead of "reviews.default.svc.cluster.local"), Istio will interpret -// the short name based on the namespace of the rule, not the service. A -// rule in the "default" namespace containing a host "reviews will be -// interpreted as "reviews.default.svc.cluster.local", irrespective of the -// actual namespace associated with the reviews service. _To avoid potential -// misconfigurations, it is recommended to always use fully qualified -// domain names over short names._ -// -// The following Kubernetes example routes all traffic by default to pods -// of the reviews service with label "version: v1" (i.e., subset v1), and -// some to subset v2, in a Kubernetes environment. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: reviews-route -// namespace: foo -// spec: -// hosts: -// - reviews # interpreted as reviews.foo.svc.cluster.local -// http: -// - match: -// - uri: -// prefix: "/wpcatalog" -// - uri: -// prefix: "/consumercatalog" -// rewrite: -// uri: "/newcatalog" -// route: -// - destination: -// host: reviews # interpreted as reviews.foo.svc.cluster.local -// subset: v2 -// - route: -// - destination: -// host: reviews # interpreted as reviews.foo.svc.cluster.local -// subset: v1 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: reviews-route -// namespace: foo -// spec: -// hosts: -// - reviews # interpreted as reviews.foo.svc.cluster.local -// http: -// - match: -// - uri: -// prefix: "/wpcatalog" -// - uri: -// prefix: "/consumercatalog" -// rewrite: -// uri: "/newcatalog" -// route: -// - destination: -// host: reviews # interpreted as reviews.foo.svc.cluster.local -// subset: v2 -// - route: -// - destination: -// host: reviews # interpreted as reviews.foo.svc.cluster.local -// subset: v1 -// ``` -// {{}} -// {{}} -// -// And the associated DestinationRule -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: reviews-destination -// namespace: foo -// spec: -// host: reviews # interpreted as reviews.foo.svc.cluster.local -// subsets: -// - name: v1 -// labels: -// version: v1 -// - name: v2 -// labels: -// version: v2 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: reviews-destination -// namespace: foo -// spec: -// host: reviews # interpreted as reviews.foo.svc.cluster.local -// subsets: -// - name: v1 -// labels: -// version: v1 -// - name: v2 -// labels: -// version: v2 -// ``` -// {{}} -// {{}} -// -// The following VirtualService sets a timeout of 5s for all calls to -// productpage.prod.svc.cluster.local service in Kubernetes. Notice that -// there are no subsets defined in this rule. Istio will fetch all -// instances of productpage.prod.svc.cluster.local service from the service -// registry and populate the sidecar's load balancing pool. Also, notice -// that this rule is set in the istio-system namespace but uses the fully -// qualified domain name of the productpage service, -// productpage.prod.svc.cluster.local. Therefore the rule's namespace does -// not have an impact in resolving the name of the productpage service. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: my-productpage-rule -// namespace: istio-system -// spec: -// hosts: -// - productpage.prod.svc.cluster.local # ignores rule namespace -// http: -// - timeout: 5s -// route: -// - destination: -// host: productpage.prod.svc.cluster.local -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: my-productpage-rule -// namespace: istio-system -// spec: -// hosts: -// - productpage.prod.svc.cluster.local # ignores rule namespace -// http: -// - timeout: 5s -// route: -// - destination: -// host: productpage.prod.svc.cluster.local -// ``` -// {{}} -// {{}} -// -// To control routing for traffic bound to services outside the mesh, external -// services must first be added to Istio's internal service registry using the -// ServiceEntry resource. VirtualServices can then be defined to control traffic -// bound to these external services. For example, the following rules define a -// Service for wikipedia.org and set a timeout of 5s for HTTP requests. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: ServiceEntry -// metadata: -// name: external-svc-wikipedia -// spec: -// hosts: -// - wikipedia.org -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: example-http -// protocol: HTTP -// resolution: DNS -// -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: my-wiki-rule -// spec: -// hosts: -// - wikipedia.org -// http: -// - timeout: 5s -// route: -// - destination: -// host: wikipedia.org -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: ServiceEntry -// metadata: -// name: external-svc-wikipedia -// spec: -// hosts: -// - wikipedia.org -// location: MESH_EXTERNAL -// ports: -// - number: 80 -// name: example-http -// protocol: HTTP -// resolution: DNS -// -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: my-wiki-rule -// spec: -// hosts: -// - wikipedia.org -// http: -// - timeout: 5s -// route: -// - destination: -// host: wikipedia.org -// ``` -// {{}} -// {{}} -// -type Destination struct { - // The name of a service from the service registry. Service - // names are looked up from the platform's service registry (e.g., - // Kubernetes services, Consul services, etc.) and from the hosts - // declared by [ServiceEntry](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Traffic forwarded to - // destinations that are not found in either of the two, will be dropped. - // - // *Note for Kubernetes users*: When short names are used (e.g. "reviews" - // instead of "reviews.default.svc.cluster.local"), Istio will interpret - // the short name based on the namespace of the rule, not the service. A - // rule in the "default" namespace containing a host "reviews will be - // interpreted as "reviews.default.svc.cluster.local", irrespective of - // the actual namespace associated with the reviews service. To avoid - // potential misconfiguration, it is recommended to always use fully - // qualified domain names over short names. - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - // The name of a subset within the service. Applicable only to services - // within the mesh. The subset must be defined in a corresponding - // DestinationRule. - Subset string `protobuf:"bytes,2,opt,name=subset,proto3" json:"subset,omitempty"` - // Specifies the port on the host that is being addressed. If a service - // exposes only a single port it is not required to explicitly select the - // port. - Port *PortSelector `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Destination) Reset() { *m = Destination{} } -func (m *Destination) String() string { return proto.CompactTextString(m) } -func (*Destination) ProtoMessage() {} -func (*Destination) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{1} -} -func (m *Destination) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Destination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Destination.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Destination) XXX_Merge(src proto.Message) { - xxx_messageInfo_Destination.Merge(m, src) -} -func (m *Destination) XXX_Size() int { - return m.Size() -} -func (m *Destination) XXX_DiscardUnknown() { - xxx_messageInfo_Destination.DiscardUnknown(m) -} - -var xxx_messageInfo_Destination proto.InternalMessageInfo - -func (m *Destination) GetHost() string { - if m != nil { - return m.Host - } - return "" -} - -func (m *Destination) GetSubset() string { - if m != nil { - return m.Subset - } - return "" -} - -func (m *Destination) GetPort() *PortSelector { - if m != nil { - return m.Port - } - return nil -} - -// Describes match conditions and actions for routing HTTP/1.1, HTTP2, and -// gRPC traffic. See VirtualService for usage examples. -type HTTPRoute struct { - // The name assigned to the route for debugging purposes. The - // route's name will be concatenated with the match's name and will - // be logged in the access logs for requests matching this - // route/match. - Name string `protobuf:"bytes,17,opt,name=name,proto3" json:"name,omitempty"` - // Match conditions to be satisfied for the rule to be - // activated. All conditions inside a single match block have AND - // semantics, while the list of match blocks have OR semantics. The rule - // is matched if any one of the match blocks succeed. - Match []*HTTPMatchRequest `protobuf:"bytes,1,rep,name=match,proto3" json:"match,omitempty"` - // A HTTP rule can either redirect or forward (default) traffic. The - // forwarding target can be one of several versions of a service (see - // glossary in beginning of document). Weights associated with the - // service version determine the proportion of traffic it receives. - Route []*HTTPRouteDestination `protobuf:"bytes,2,rep,name=route,proto3" json:"route,omitempty"` - // A HTTP rule can either redirect or forward (default) traffic. If - // traffic passthrough option is specified in the rule, - // route/redirect will be ignored. The redirect primitive can be used to - // send a HTTP 301 redirect to a different URI or Authority. - Redirect *HTTPRedirect `protobuf:"bytes,3,opt,name=redirect,proto3" json:"redirect,omitempty"` - // Rewrite HTTP URIs and Authority headers. Rewrite cannot be used with - // Redirect primitive. Rewrite will be performed before forwarding. - Rewrite *HTTPRewrite `protobuf:"bytes,4,opt,name=rewrite,proto3" json:"rewrite,omitempty"` - // Timeout for HTTP requests. - Timeout *types.Duration `protobuf:"bytes,6,opt,name=timeout,proto3" json:"timeout,omitempty"` - // Retry policy for HTTP requests. - Retries *HTTPRetry `protobuf:"bytes,7,opt,name=retries,proto3" json:"retries,omitempty"` - // Fault injection policy to apply on HTTP traffic at the client side. - // Note that timeouts or retries will not be enabled when faults are - // enabled on the client side. - Fault *HTTPFaultInjection `protobuf:"bytes,8,opt,name=fault,proto3" json:"fault,omitempty"` - // Mirror HTTP traffic to a another destination in addition to forwarding - // the requests to the intended destination. Mirrored traffic is on a - // best effort basis where the sidecar/gateway will not wait for the - // mirrored cluster to respond before returning the response from the - // original destination. Statistics will be generated for the mirrored - // destination. - Mirror *Destination `protobuf:"bytes,9,opt,name=mirror,proto3" json:"mirror,omitempty"` - // Percentage of the traffic to be mirrored by the `mirror` field. - // Use of integer `mirror_percent` value is deprecated. Use the - // double `mirror_percentage` field instead - MirrorPercent *types.UInt32Value `protobuf:"bytes,18,opt,name=mirror_percent,json=mirrorPercent,proto3" json:"mirror_percent,omitempty"` // Deprecated: Do not use. - // Percentage of the traffic to be mirrored by the `mirror` field. - // If this field is absent, all the traffic (100%) will be mirrored. - // Max value is 100. - MirrorPercentage *Percent `protobuf:"bytes,19,opt,name=mirror_percentage,json=mirrorPercentage,proto3" json:"mirror_percentage,omitempty"` - // Cross-Origin Resource Sharing policy (CORS). Refer to - // [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) - // for further details about cross origin resource sharing. - CorsPolicy *CorsPolicy `protobuf:"bytes,10,opt,name=cors_policy,json=corsPolicy,proto3" json:"cors_policy,omitempty"` - // Header manipulation rules - Headers *Headers `protobuf:"bytes,16,opt,name=headers,proto3" json:"headers,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HTTPRoute) Reset() { *m = HTTPRoute{} } -func (m *HTTPRoute) String() string { return proto.CompactTextString(m) } -func (*HTTPRoute) ProtoMessage() {} -func (*HTTPRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{2} -} -func (m *HTTPRoute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HTTPRoute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HTTPRoute) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPRoute.Merge(m, src) -} -func (m *HTTPRoute) XXX_Size() int { - return m.Size() -} -func (m *HTTPRoute) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPRoute.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPRoute proto.InternalMessageInfo - -func (m *HTTPRoute) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *HTTPRoute) GetMatch() []*HTTPMatchRequest { - if m != nil { - return m.Match - } - return nil -} - -func (m *HTTPRoute) GetRoute() []*HTTPRouteDestination { - if m != nil { - return m.Route - } - return nil -} - -func (m *HTTPRoute) GetRedirect() *HTTPRedirect { - if m != nil { - return m.Redirect - } - return nil -} - -func (m *HTTPRoute) GetRewrite() *HTTPRewrite { - if m != nil { - return m.Rewrite - } - return nil -} - -func (m *HTTPRoute) GetTimeout() *types.Duration { - if m != nil { - return m.Timeout - } - return nil -} - -func (m *HTTPRoute) GetRetries() *HTTPRetry { - if m != nil { - return m.Retries - } - return nil -} - -func (m *HTTPRoute) GetFault() *HTTPFaultInjection { - if m != nil { - return m.Fault - } - return nil -} - -func (m *HTTPRoute) GetMirror() *Destination { - if m != nil { - return m.Mirror - } - return nil -} - -// Deprecated: Do not use. -func (m *HTTPRoute) GetMirrorPercent() *types.UInt32Value { - if m != nil { - return m.MirrorPercent - } - return nil -} - -func (m *HTTPRoute) GetMirrorPercentage() *Percent { - if m != nil { - return m.MirrorPercentage - } - return nil -} - -func (m *HTTPRoute) GetCorsPolicy() *CorsPolicy { - if m != nil { - return m.CorsPolicy - } - return nil -} - -func (m *HTTPRoute) GetHeaders() *Headers { - if m != nil { - return m.Headers - } - return nil -} - -type Headers struct { - // Header manipulation rules to apply before forwarding a request - // to the destination service - Request *Headers_HeaderOperations `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` - // Header manipulation rules to apply before returning a response - // to the caller - Response *Headers_HeaderOperations `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Headers) Reset() { *m = Headers{} } -func (m *Headers) String() string { return proto.CompactTextString(m) } -func (*Headers) ProtoMessage() {} -func (*Headers) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{3} -} -func (m *Headers) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Headers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Headers.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Headers) XXX_Merge(src proto.Message) { - xxx_messageInfo_Headers.Merge(m, src) -} -func (m *Headers) XXX_Size() int { - return m.Size() -} -func (m *Headers) XXX_DiscardUnknown() { - xxx_messageInfo_Headers.DiscardUnknown(m) -} - -var xxx_messageInfo_Headers proto.InternalMessageInfo - -func (m *Headers) GetRequest() *Headers_HeaderOperations { - if m != nil { - return m.Request - } - return nil -} - -func (m *Headers) GetResponse() *Headers_HeaderOperations { - if m != nil { - return m.Response - } - return nil -} - -// HeaderOperations Describes the header manipulations to apply -type Headers_HeaderOperations struct { - // Overwrite the headers specified by key with the given values - Set map[string]string `protobuf:"bytes,1,rep,name=set,proto3" json:"set,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Append the given values to the headers specified by keys - // (will create a comma-separated list of values) - Add map[string]string `protobuf:"bytes,2,rep,name=add,proto3" json:"add,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Remove a the specified headers - Remove []string `protobuf:"bytes,3,rep,name=remove,proto3" json:"remove,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Headers_HeaderOperations) Reset() { *m = Headers_HeaderOperations{} } -func (m *Headers_HeaderOperations) String() string { return proto.CompactTextString(m) } -func (*Headers_HeaderOperations) ProtoMessage() {} -func (*Headers_HeaderOperations) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{3, 0} -} -func (m *Headers_HeaderOperations) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Headers_HeaderOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Headers_HeaderOperations.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Headers_HeaderOperations) XXX_Merge(src proto.Message) { - xxx_messageInfo_Headers_HeaderOperations.Merge(m, src) -} -func (m *Headers_HeaderOperations) XXX_Size() int { - return m.Size() -} -func (m *Headers_HeaderOperations) XXX_DiscardUnknown() { - xxx_messageInfo_Headers_HeaderOperations.DiscardUnknown(m) -} - -var xxx_messageInfo_Headers_HeaderOperations proto.InternalMessageInfo - -func (m *Headers_HeaderOperations) GetSet() map[string]string { - if m != nil { - return m.Set - } - return nil -} - -func (m *Headers_HeaderOperations) GetAdd() map[string]string { - if m != nil { - return m.Add - } - return nil -} - -func (m *Headers_HeaderOperations) GetRemove() []string { - if m != nil { - return m.Remove - } - return nil -} - -// Describes match conditions and actions for routing unterminated TLS -// traffic (TLS/HTTPS) The following routing rule forwards unterminated TLS -// traffic arriving at port 443 of gateway called "mygateway" to internal -// services in the mesh based on the SNI value. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: bookinfo-sni -// spec: -// hosts: -// - "*.bookinfo.com" -// gateways: -// - mygateway -// tls: -// - match: -// - port: 443 -// sniHosts: -// - login.bookinfo.com -// route: -// - destination: -// host: login.prod.svc.cluster.local -// - match: -// - port: 443 -// sniHosts: -// - reviews.bookinfo.com -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: bookinfo-sni -// spec: -// hosts: -// - "*.bookinfo.com" -// gateways: -// - mygateway -// tls: -// - match: -// - port: 443 -// sniHosts: -// - login.bookinfo.com -// route: -// - destination: -// host: login.prod.svc.cluster.local -// - match: -// - port: 443 -// sniHosts: -// - reviews.bookinfo.com -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// ``` -// {{}} -// {{}} -type TLSRoute struct { - // Match conditions to be satisfied for the rule to be - // activated. All conditions inside a single match block have AND - // semantics, while the list of match blocks have OR semantics. The rule - // is matched if any one of the match blocks succeed. - Match []*TLSMatchAttributes `protobuf:"bytes,1,rep,name=match,proto3" json:"match,omitempty"` - // The destination to which the connection should be forwarded to. - Route []*RouteDestination `protobuf:"bytes,2,rep,name=route,proto3" json:"route,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TLSRoute) Reset() { *m = TLSRoute{} } -func (m *TLSRoute) String() string { return proto.CompactTextString(m) } -func (*TLSRoute) ProtoMessage() {} -func (*TLSRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{4} -} -func (m *TLSRoute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TLSRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TLSRoute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TLSRoute) XXX_Merge(src proto.Message) { - xxx_messageInfo_TLSRoute.Merge(m, src) -} -func (m *TLSRoute) XXX_Size() int { - return m.Size() -} -func (m *TLSRoute) XXX_DiscardUnknown() { - xxx_messageInfo_TLSRoute.DiscardUnknown(m) -} - -var xxx_messageInfo_TLSRoute proto.InternalMessageInfo - -func (m *TLSRoute) GetMatch() []*TLSMatchAttributes { - if m != nil { - return m.Match - } - return nil -} - -func (m *TLSRoute) GetRoute() []*RouteDestination { - if m != nil { - return m.Route - } - return nil -} - -// Describes match conditions and actions for routing TCP traffic. The -// following routing rule forwards traffic arriving at port 27017 for -// mongo.prod.svc.cluster.local to another Mongo server on port 5555. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: bookinfo-Mongo -// spec: -// hosts: -// - mongo.prod.svc.cluster.local -// tcp: -// - match: -// - port: 27017 -// route: -// - destination: -// host: mongo.backup.svc.cluster.local -// port: -// number: 5555 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: bookinfo-Mongo -// spec: -// hosts: -// - mongo.prod.svc.cluster.local -// tcp: -// - match: -// - port: 27017 -// route: -// - destination: -// host: mongo.backup.svc.cluster.local -// port: -// number: 5555 -// ``` -// {{}} -// {{}} -type TCPRoute struct { - // Match conditions to be satisfied for the rule to be - // activated. All conditions inside a single match block have AND - // semantics, while the list of match blocks have OR semantics. The rule - // is matched if any one of the match blocks succeed. - Match []*L4MatchAttributes `protobuf:"bytes,1,rep,name=match,proto3" json:"match,omitempty"` - // The destination to which the connection should be forwarded to. - Route []*RouteDestination `protobuf:"bytes,2,rep,name=route,proto3" json:"route,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TCPRoute) Reset() { *m = TCPRoute{} } -func (m *TCPRoute) String() string { return proto.CompactTextString(m) } -func (*TCPRoute) ProtoMessage() {} -func (*TCPRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{5} -} -func (m *TCPRoute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TCPRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TCPRoute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TCPRoute) XXX_Merge(src proto.Message) { - xxx_messageInfo_TCPRoute.Merge(m, src) -} -func (m *TCPRoute) XXX_Size() int { - return m.Size() -} -func (m *TCPRoute) XXX_DiscardUnknown() { - xxx_messageInfo_TCPRoute.DiscardUnknown(m) -} - -var xxx_messageInfo_TCPRoute proto.InternalMessageInfo - -func (m *TCPRoute) GetMatch() []*L4MatchAttributes { - if m != nil { - return m.Match - } - return nil -} - -func (m *TCPRoute) GetRoute() []*RouteDestination { - if m != nil { - return m.Route - } - return nil -} - -// HttpMatchRequest specifies a set of criterion to be met in order for the -// rule to be applied to the HTTP request. For example, the following -// restricts the rule to match only requests where the URL path -// starts with /ratings/v2/ and the request contains a custom `end-user` header -// with value `jason`. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: ratings-route -// spec: -// hosts: -// - ratings.prod.svc.cluster.local -// http: -// - match: -// - headers: -// end-user: -// exact: jason -// uri: -// prefix: "/ratings/v2/" -// ignoreUriCase: true -// route: -// - destination: -// host: ratings.prod.svc.cluster.local -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: ratings-route -// spec: -// hosts: -// - ratings.prod.svc.cluster.local -// http: -// - match: -// - headers: -// end-user: -// exact: jason -// uri: -// prefix: "/ratings/v2/" -// ignoreUriCase: true -// route: -// - destination: -// host: ratings.prod.svc.cluster.local -// ``` -// {{}} -// {{}} -// -// HTTPMatchRequest CANNOT be empty. -type HTTPMatchRequest struct { - // The name assigned to a match. The match's name will be - // concatenated with the parent route's name and will be logged in - // the access logs for requests matching this route. - Name string `protobuf:"bytes,11,opt,name=name,proto3" json:"name,omitempty"` - // URI to match - // values are case-sensitive and formatted as follows: - // - // - `exact: "value"` for exact string match - // - // - `prefix: "value"` for prefix-based match - // - // - `regex: "value"` for ECMAscript style regex-based match - // - // **Note:** Case-insensitive matching could be enabled via the - // `ignore_uri_case` flag. - Uri *StringMatch `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` - // URI Scheme - // values are case-sensitive and formatted as follows: - // - // - `exact: "value"` for exact string match - // - // - `prefix: "value"` for prefix-based match - // - // - `regex: "value"` for ECMAscript style regex-based match - // - Scheme *StringMatch `protobuf:"bytes,2,opt,name=scheme,proto3" json:"scheme,omitempty"` - // HTTP Method - // values are case-sensitive and formatted as follows: - // - // - `exact: "value"` for exact string match - // - // - `prefix: "value"` for prefix-based match - // - // - `regex: "value"` for ECMAscript style regex-based match - // - Method *StringMatch `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` - // HTTP Authority - // values are case-sensitive and formatted as follows: - // - // - `exact: "value"` for exact string match - // - // - `prefix: "value"` for prefix-based match - // - // - `regex: "value"` for ECMAscript style regex-based match - // - Authority *StringMatch `protobuf:"bytes,4,opt,name=authority,proto3" json:"authority,omitempty"` - // The header keys must be lowercase and use hyphen as the separator, - // e.g. _x-request-id_. - // - // Header values are case-sensitive and formatted as follows: - // - // - `exact: "value"` for exact string match - // - // - `prefix: "value"` for prefix-based match - // - // - `regex: "value"` for ECMAscript style regex-based match - // - // **Note:** The keys `uri`, `scheme`, `method`, and `authority` will be ignored. - Headers map[string]*StringMatch `protobuf:"bytes,5,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Specifies the ports on the host that is being addressed. Many services - // only expose a single port or label ports with the protocols they support, - // in these cases it is not required to explicitly select the port. - Port uint32 `protobuf:"varint,6,opt,name=port,proto3" json:"port,omitempty"` - // One or more labels that constrain the applicability of a rule to - // workloads with the given labels. If the VirtualService has a list of - // gateways specified in the top-level `gateways` field, it must include the reserved gateway - // `mesh` for this field to be applicable. - SourceLabels map[string]string `protobuf:"bytes,7,rep,name=source_labels,json=sourceLabels,proto3" json:"source_labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Names of gateways where the rule should be applied. Gateway names - // in the top-level `gateways` field of the VirtualService (if any) are overridden. The gateway - // match is independent of sourceLabels. - Gateways []string `protobuf:"bytes,8,rep,name=gateways,proto3" json:"gateways,omitempty"` - // Query parameters for matching. - // - // Ex: - // - For a query parameter like "?key=true", the map key would be "key" and - // the string match could be defined as `exact: "true"`. - // - For a query parameter like "?key", the map key would be "key" and the - // string match could be defined as `exact: ""`. - // - For a query parameter like "?key=123", the map key would be "key" and the - // string match could be defined as `regex: "\d+$"`. Note that this - // configuration will only match values like "123" but not "a123" or "123a". - // - // **Note:** `prefix` matching is currently not supported. - QueryParams map[string]*StringMatch `protobuf:"bytes,9,rep,name=query_params,json=queryParams,proto3" json:"query_params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Flag to specify whether the URI matching should be case-insensitive. - // - // **Note:** The case will be ignored only in the case of `exact` and `prefix` - // URI matches. - IgnoreUriCase bool `protobuf:"varint,10,opt,name=ignore_uri_case,json=ignoreUriCase,proto3" json:"ignore_uri_case,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HTTPMatchRequest) Reset() { *m = HTTPMatchRequest{} } -func (m *HTTPMatchRequest) String() string { return proto.CompactTextString(m) } -func (*HTTPMatchRequest) ProtoMessage() {} -func (*HTTPMatchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{6} -} -func (m *HTTPMatchRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPMatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HTTPMatchRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HTTPMatchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPMatchRequest.Merge(m, src) -} -func (m *HTTPMatchRequest) XXX_Size() int { - return m.Size() -} -func (m *HTTPMatchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPMatchRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPMatchRequest proto.InternalMessageInfo - -func (m *HTTPMatchRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *HTTPMatchRequest) GetUri() *StringMatch { - if m != nil { - return m.Uri - } - return nil -} - -func (m *HTTPMatchRequest) GetScheme() *StringMatch { - if m != nil { - return m.Scheme - } - return nil -} - -func (m *HTTPMatchRequest) GetMethod() *StringMatch { - if m != nil { - return m.Method - } - return nil -} - -func (m *HTTPMatchRequest) GetAuthority() *StringMatch { - if m != nil { - return m.Authority - } - return nil -} - -func (m *HTTPMatchRequest) GetHeaders() map[string]*StringMatch { - if m != nil { - return m.Headers - } - return nil -} - -func (m *HTTPMatchRequest) GetPort() uint32 { - if m != nil { - return m.Port - } - return 0 -} - -func (m *HTTPMatchRequest) GetSourceLabels() map[string]string { - if m != nil { - return m.SourceLabels - } - return nil -} - -func (m *HTTPMatchRequest) GetGateways() []string { - if m != nil { - return m.Gateways - } - return nil -} - -func (m *HTTPMatchRequest) GetQueryParams() map[string]*StringMatch { - if m != nil { - return m.QueryParams - } - return nil -} - -func (m *HTTPMatchRequest) GetIgnoreUriCase() bool { - if m != nil { - return m.IgnoreUriCase - } - return false -} - -// Each routing rule is associated with one or more service versions (see -// glossary in beginning of document). Weights associated with the version -// determine the proportion of traffic it receives. For example, the -// following rule will route 25% of traffic for the "reviews" service to -// instances with the "v2" tag and the remaining traffic (i.e., 75%) to -// "v1". -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: reviews-route -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// http: -// - route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v2 -// weight: 25 -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v1 -// weight: 75 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: reviews-route -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// http: -// - route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v2 -// weight: 25 -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v1 -// weight: 75 -// ``` -// {{}} -// {{}} -// -// And the associated DestinationRule -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: reviews-destination -// spec: -// host: reviews.prod.svc.cluster.local -// subsets: -// - name: v1 -// labels: -// version: v1 -// - name: v2 -// labels: -// version: v2 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: reviews-destination -// spec: -// host: reviews.prod.svc.cluster.local -// subsets: -// - name: v1 -// labels: -// version: v1 -// - name: v2 -// labels: -// version: v2 -// ``` -// {{}} -// {{}} -// -// Traffic can also be split across two entirely different services without -// having to define new subsets. For example, the following rule forwards 25% of -// traffic to reviews.com to dev.reviews.com -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: reviews-route-two-domains -// spec: -// hosts: -// - reviews.com -// http: -// - route: -// - destination: -// host: dev.reviews.com -// weight: 25 -// - destination: -// host: reviews.com -// weight: 75 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: reviews-route-two-domains -// spec: -// hosts: -// - reviews.com -// http: -// - route: -// - destination: -// host: dev.reviews.com -// weight: 25 -// - destination: -// host: reviews.com -// weight: 75 -// ``` -// {{}} -// {{}} -// -type HTTPRouteDestination struct { - // Destination uniquely identifies the instances of a service - // to which the request/connection should be forwarded to. - Destination *Destination `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` - // The proportion of traffic to be forwarded to the service - // version. (0-100). Sum of weights across destinations SHOULD BE == 100. - // If there is only one destination in a rule, the weight value is assumed to - // be 100. - Weight int32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` - // Header manipulation rules - Headers *Headers `protobuf:"bytes,7,opt,name=headers,proto3" json:"headers,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HTTPRouteDestination) Reset() { *m = HTTPRouteDestination{} } -func (m *HTTPRouteDestination) String() string { return proto.CompactTextString(m) } -func (*HTTPRouteDestination) ProtoMessage() {} -func (*HTTPRouteDestination) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{7} -} -func (m *HTTPRouteDestination) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPRouteDestination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HTTPRouteDestination.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HTTPRouteDestination) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPRouteDestination.Merge(m, src) -} -func (m *HTTPRouteDestination) XXX_Size() int { - return m.Size() -} -func (m *HTTPRouteDestination) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPRouteDestination.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPRouteDestination proto.InternalMessageInfo - -func (m *HTTPRouteDestination) GetDestination() *Destination { - if m != nil { - return m.Destination - } - return nil -} - -func (m *HTTPRouteDestination) GetWeight() int32 { - if m != nil { - return m.Weight - } - return 0 -} - -func (m *HTTPRouteDestination) GetHeaders() *Headers { - if m != nil { - return m.Headers - } - return nil -} - -// L4 routing rule weighted destination. -type RouteDestination struct { - // Destination uniquely identifies the instances of a service - // to which the request/connection should be forwarded to. - Destination *Destination `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` - // The proportion of traffic to be forwarded to the service - // version. If there is only one destination in a rule, all traffic will be - // routed to it irrespective of the weight. - Weight int32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteDestination) Reset() { *m = RouteDestination{} } -func (m *RouteDestination) String() string { return proto.CompactTextString(m) } -func (*RouteDestination) ProtoMessage() {} -func (*RouteDestination) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{8} -} -func (m *RouteDestination) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RouteDestination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RouteDestination.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RouteDestination) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteDestination.Merge(m, src) -} -func (m *RouteDestination) XXX_Size() int { - return m.Size() -} -func (m *RouteDestination) XXX_DiscardUnknown() { - xxx_messageInfo_RouteDestination.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteDestination proto.InternalMessageInfo - -func (m *RouteDestination) GetDestination() *Destination { - if m != nil { - return m.Destination - } - return nil -} - -func (m *RouteDestination) GetWeight() int32 { - if m != nil { - return m.Weight - } - return 0 -} - -// L4 connection match attributes. Note that L4 connection matching support -// is incomplete. -type L4MatchAttributes struct { - // IPv4 or IPv6 ip addresses of destination with optional subnet. E.g., - // a.b.c.d/xx form or just a.b.c.d. - DestinationSubnets []string `protobuf:"bytes,1,rep,name=destination_subnets,json=destinationSubnets,proto3" json:"destination_subnets,omitempty"` - // Specifies the port on the host that is being addressed. Many services - // only expose a single port or label ports with the protocols they support, - // in these cases it is not required to explicitly select the port. - Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - // IPv4 or IPv6 ip address of source with optional subnet. E.g., a.b.c.d/xx - // form or just a.b.c.d - // $hide_from_docs - SourceSubnet string `protobuf:"bytes,3,opt,name=source_subnet,json=sourceSubnet,proto3" json:"source_subnet,omitempty"` - // One or more labels that constrain the applicability of a rule to - // workloads with the given labels. If the VirtualService has a list of - // gateways specified in the top-level `gateways` field, it should include the reserved gateway - // `mesh` in order for this field to be applicable. - SourceLabels map[string]string `protobuf:"bytes,4,rep,name=source_labels,json=sourceLabels,proto3" json:"source_labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Names of gateways where the rule should be applied. Gateway names - // in the top-level `gateways` field of the VirtualService (if any) are overridden. The gateway - // match is independent of sourceLabels. - Gateways []string `protobuf:"bytes,5,rep,name=gateways,proto3" json:"gateways,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *L4MatchAttributes) Reset() { *m = L4MatchAttributes{} } -func (m *L4MatchAttributes) String() string { return proto.CompactTextString(m) } -func (*L4MatchAttributes) ProtoMessage() {} -func (*L4MatchAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{9} -} -func (m *L4MatchAttributes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *L4MatchAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_L4MatchAttributes.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *L4MatchAttributes) XXX_Merge(src proto.Message) { - xxx_messageInfo_L4MatchAttributes.Merge(m, src) -} -func (m *L4MatchAttributes) XXX_Size() int { - return m.Size() -} -func (m *L4MatchAttributes) XXX_DiscardUnknown() { - xxx_messageInfo_L4MatchAttributes.DiscardUnknown(m) -} - -var xxx_messageInfo_L4MatchAttributes proto.InternalMessageInfo - -func (m *L4MatchAttributes) GetDestinationSubnets() []string { - if m != nil { - return m.DestinationSubnets - } - return nil -} - -func (m *L4MatchAttributes) GetPort() uint32 { - if m != nil { - return m.Port - } - return 0 -} - -func (m *L4MatchAttributes) GetSourceSubnet() string { - if m != nil { - return m.SourceSubnet - } - return "" -} - -func (m *L4MatchAttributes) GetSourceLabels() map[string]string { - if m != nil { - return m.SourceLabels - } - return nil -} - -func (m *L4MatchAttributes) GetGateways() []string { - if m != nil { - return m.Gateways - } - return nil -} - -// TLS connection match attributes. -type TLSMatchAttributes struct { - // SNI (server name indicator) to match on. Wildcard prefixes - // can be used in the SNI value, e.g., *.com will match foo.example.com - // as well as example.com. An SNI value must be a subset (i.e., fall - // within the domain) of the corresponding virtual serivce's hosts. - SniHosts []string `protobuf:"bytes,1,rep,name=sni_hosts,json=sniHosts,proto3" json:"sni_hosts,omitempty"` - // IPv4 or IPv6 ip addresses of destination with optional subnet. E.g., - // a.b.c.d/xx form or just a.b.c.d. - DestinationSubnets []string `protobuf:"bytes,2,rep,name=destination_subnets,json=destinationSubnets,proto3" json:"destination_subnets,omitempty"` - // Specifies the port on the host that is being addressed. Many services - // only expose a single port or label ports with the protocols they - // support, in these cases it is not required to explicitly select the - // port. - Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` - // One or more labels that constrain the applicability of a rule to - // workloads with the given labels. If the VirtualService has a list of - // gateways specified in the top-level `gateways` field, it should include the reserved gateway - // `mesh` in order for this field to be applicable. - SourceLabels map[string]string `protobuf:"bytes,5,rep,name=source_labels,json=sourceLabels,proto3" json:"source_labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Names of gateways where the rule should be applied. Gateway names - // in the top-level `gateways` field of the VirtualService (if any) are overridden. The gateway - // match is independent of sourceLabels. - Gateways []string `protobuf:"bytes,6,rep,name=gateways,proto3" json:"gateways,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TLSMatchAttributes) Reset() { *m = TLSMatchAttributes{} } -func (m *TLSMatchAttributes) String() string { return proto.CompactTextString(m) } -func (*TLSMatchAttributes) ProtoMessage() {} -func (*TLSMatchAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{10} -} -func (m *TLSMatchAttributes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TLSMatchAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TLSMatchAttributes.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TLSMatchAttributes) XXX_Merge(src proto.Message) { - xxx_messageInfo_TLSMatchAttributes.Merge(m, src) -} -func (m *TLSMatchAttributes) XXX_Size() int { - return m.Size() -} -func (m *TLSMatchAttributes) XXX_DiscardUnknown() { - xxx_messageInfo_TLSMatchAttributes.DiscardUnknown(m) -} - -var xxx_messageInfo_TLSMatchAttributes proto.InternalMessageInfo - -func (m *TLSMatchAttributes) GetSniHosts() []string { - if m != nil { - return m.SniHosts - } - return nil -} - -func (m *TLSMatchAttributes) GetDestinationSubnets() []string { - if m != nil { - return m.DestinationSubnets - } - return nil -} - -func (m *TLSMatchAttributes) GetPort() uint32 { - if m != nil { - return m.Port - } - return 0 -} - -func (m *TLSMatchAttributes) GetSourceLabels() map[string]string { - if m != nil { - return m.SourceLabels - } - return nil -} - -func (m *TLSMatchAttributes) GetGateways() []string { - if m != nil { - return m.Gateways - } - return nil -} - -// HTTPRedirect can be used to send a 301 redirect response to the caller, -// where the Authority/Host and the URI in the response can be swapped with -// the specified values. For example, the following rule redirects -// requests for /v1/getProductRatings API on the ratings service to -// /v1/bookRatings provided by the bookratings service. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: ratings-route -// spec: -// hosts: -// - ratings.prod.svc.cluster.local -// http: -// - match: -// - uri: -// exact: /v1/getProductRatings -// redirect: -// uri: /v1/bookRatings -// authority: newratings.default.svc.cluster.local -// ... -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: ratings-route -// spec: -// hosts: -// - ratings.prod.svc.cluster.local -// http: -// - match: -// - uri: -// exact: /v1/getProductRatings -// redirect: -// uri: /v1/bookRatings -// authority: newratings.default.svc.cluster.local -// ... -// ``` -// {{}} -// {{}} -// -type HTTPRedirect struct { - // On a redirect, overwrite the Path portion of the URL with this - // value. Note that the entire path will be replaced, irrespective of the - // request URI being matched as an exact path or prefix. - Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` - // On a redirect, overwrite the Authority/Host portion of the URL with - // this value. - Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` - // On a redirect, Specifies the HTTP status code to use in the redirect - // response. The default response code is MOVED_PERMANENTLY (301). - RedirectCode uint32 `protobuf:"varint,3,opt,name=redirect_code,json=redirectCode,proto3" json:"redirect_code,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HTTPRedirect) Reset() { *m = HTTPRedirect{} } -func (m *HTTPRedirect) String() string { return proto.CompactTextString(m) } -func (*HTTPRedirect) ProtoMessage() {} -func (*HTTPRedirect) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{11} -} -func (m *HTTPRedirect) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPRedirect) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HTTPRedirect.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HTTPRedirect) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPRedirect.Merge(m, src) -} -func (m *HTTPRedirect) XXX_Size() int { - return m.Size() -} -func (m *HTTPRedirect) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPRedirect.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPRedirect proto.InternalMessageInfo - -func (m *HTTPRedirect) GetUri() string { - if m != nil { - return m.Uri - } - return "" -} - -func (m *HTTPRedirect) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *HTTPRedirect) GetRedirectCode() uint32 { - if m != nil { - return m.RedirectCode - } - return 0 -} - -// HTTPRewrite can be used to rewrite specific parts of a HTTP request -// before forwarding the request to the destination. Rewrite primitive can -// be used only with HTTPRouteDestination. The following example -// demonstrates how to rewrite the URL prefix for api call (/ratings) to -// ratings service before making the actual API call. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: ratings-route -// spec: -// hosts: -// - ratings.prod.svc.cluster.local -// http: -// - match: -// - uri: -// prefix: /ratings -// rewrite: -// uri: /v1/bookRatings -// route: -// - destination: -// host: ratings.prod.svc.cluster.local -// subset: v1 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: ratings-route -// spec: -// hosts: -// - ratings.prod.svc.cluster.local -// http: -// - match: -// - uri: -// prefix: /ratings -// rewrite: -// uri: /v1/bookRatings -// route: -// - destination: -// host: ratings.prod.svc.cluster.local -// subset: v1 -// ``` -// {{}} -// {{}} -// -type HTTPRewrite struct { - // rewrite the path (or the prefix) portion of the URI with this - // value. If the original URI was matched based on prefix, the value - // provided in this field will replace the corresponding matched prefix. - Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` - // rewrite the Authority/Host header with this value. - Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HTTPRewrite) Reset() { *m = HTTPRewrite{} } -func (m *HTTPRewrite) String() string { return proto.CompactTextString(m) } -func (*HTTPRewrite) ProtoMessage() {} -func (*HTTPRewrite) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{12} -} -func (m *HTTPRewrite) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPRewrite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HTTPRewrite.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HTTPRewrite) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPRewrite.Merge(m, src) -} -func (m *HTTPRewrite) XXX_Size() int { - return m.Size() -} -func (m *HTTPRewrite) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPRewrite.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPRewrite proto.InternalMessageInfo - -func (m *HTTPRewrite) GetUri() string { - if m != nil { - return m.Uri - } - return "" -} - -func (m *HTTPRewrite) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -// Describes how to match a given string in HTTP headers. Match is -// case-sensitive. -type StringMatch struct { - // Types that are valid to be assigned to MatchType: - // *StringMatch_Exact - // *StringMatch_Prefix - // *StringMatch_Regex - MatchType isStringMatch_MatchType `protobuf_oneof:"match_type"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StringMatch) Reset() { *m = StringMatch{} } -func (m *StringMatch) String() string { return proto.CompactTextString(m) } -func (*StringMatch) ProtoMessage() {} -func (*StringMatch) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{13} -} -func (m *StringMatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StringMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StringMatch.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StringMatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_StringMatch.Merge(m, src) -} -func (m *StringMatch) XXX_Size() int { - return m.Size() -} -func (m *StringMatch) XXX_DiscardUnknown() { - xxx_messageInfo_StringMatch.DiscardUnknown(m) -} - -var xxx_messageInfo_StringMatch proto.InternalMessageInfo - -type isStringMatch_MatchType interface { - isStringMatch_MatchType() - MarshalTo([]byte) (int, error) - Size() int -} - -type StringMatch_Exact struct { - Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"` -} -type StringMatch_Prefix struct { - Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"` -} -type StringMatch_Regex struct { - Regex string `protobuf:"bytes,3,opt,name=regex,proto3,oneof"` -} - -func (*StringMatch_Exact) isStringMatch_MatchType() {} -func (*StringMatch_Prefix) isStringMatch_MatchType() {} -func (*StringMatch_Regex) isStringMatch_MatchType() {} - -func (m *StringMatch) GetMatchType() isStringMatch_MatchType { - if m != nil { - return m.MatchType - } - return nil -} - -func (m *StringMatch) GetExact() string { - if x, ok := m.GetMatchType().(*StringMatch_Exact); ok { - return x.Exact - } - return "" -} - -func (m *StringMatch) GetPrefix() string { - if x, ok := m.GetMatchType().(*StringMatch_Prefix); ok { - return x.Prefix - } - return "" -} - -func (m *StringMatch) GetRegex() string { - if x, ok := m.GetMatchType().(*StringMatch_Regex); ok { - return x.Regex - } - return "" -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*StringMatch) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*StringMatch_Exact)(nil), - (*StringMatch_Prefix)(nil), - (*StringMatch_Regex)(nil), - } -} - -// Describes the retry policy to use when a HTTP request fails. For -// example, the following rule sets the maximum number of retries to 3 when -// calling ratings:v1 service, with a 2s timeout per retry attempt. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: ratings-route -// spec: -// hosts: -// - ratings.prod.svc.cluster.local -// http: -// - route: -// - destination: -// host: ratings.prod.svc.cluster.local -// subset: v1 -// retries: -// attempts: 3 -// perTryTimeout: 2s -// retryOn: gateway-error,connect-failure,refused-stream -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: ratings-route -// spec: -// hosts: -// - ratings.prod.svc.cluster.local -// http: -// - route: -// - destination: -// host: ratings.prod.svc.cluster.local -// subset: v1 -// retries: -// attempts: 3 -// perTryTimeout: 2s -// retryOn: gateway-error,connect-failure,refused-stream -// ``` -// {{}} -// {{}} -// -type HTTPRetry struct { - // Number of retries for a given request. The interval - // between retries will be determined automatically (25ms+). Actual - // number of retries attempted depends on the request `timeout` of the - // [HTTP route](https://istio.io/docs/reference/config/networking/virtual-service/#HTTPRoute). - Attempts int32 `protobuf:"varint,1,opt,name=attempts,proto3" json:"attempts,omitempty"` - // Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms. - PerTryTimeout *types.Duration `protobuf:"bytes,2,opt,name=per_try_timeout,json=perTryTimeout,proto3" json:"per_try_timeout,omitempty"` - // Specifies the conditions under which retry takes place. - // One or more policies can be specified using a ‘,’ delimited list. - // See the [retry policies](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-on) - // and [gRPC retry policies](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-grpc-on) for more details. - RetryOn string `protobuf:"bytes,3,opt,name=retry_on,json=retryOn,proto3" json:"retry_on,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HTTPRetry) Reset() { *m = HTTPRetry{} } -func (m *HTTPRetry) String() string { return proto.CompactTextString(m) } -func (*HTTPRetry) ProtoMessage() {} -func (*HTTPRetry) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{14} -} -func (m *HTTPRetry) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPRetry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HTTPRetry.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HTTPRetry) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPRetry.Merge(m, src) -} -func (m *HTTPRetry) XXX_Size() int { - return m.Size() -} -func (m *HTTPRetry) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPRetry.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPRetry proto.InternalMessageInfo - -func (m *HTTPRetry) GetAttempts() int32 { - if m != nil { - return m.Attempts - } - return 0 -} - -func (m *HTTPRetry) GetPerTryTimeout() *types.Duration { - if m != nil { - return m.PerTryTimeout - } - return nil -} - -func (m *HTTPRetry) GetRetryOn() string { - if m != nil { - return m.RetryOn - } - return "" -} - -// Describes the Cross-Origin Resource Sharing (CORS) policy, for a given -// service. Refer to [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) -// for further details about cross origin resource sharing. For example, -// the following rule restricts cross origin requests to those originating -// from example.com domain using HTTP POST/GET, and sets the -// `Access-Control-Allow-Credentials` header to false. In addition, it only -// exposes `X-Foo-bar` header and sets an expiry period of 1 day. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: ratings-route -// spec: -// hosts: -// - ratings.prod.svc.cluster.local -// http: -// - route: -// - destination: -// host: ratings.prod.svc.cluster.local -// subset: v1 -// corsPolicy: -// allowOrigin: -// - example.com -// allowMethods: -// - POST -// - GET -// allowCredentials: false -// allowHeaders: -// - X-Foo-Bar -// maxAge: "24h" -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: ratings-route -// spec: -// hosts: -// - ratings.prod.svc.cluster.local -// http: -// - route: -// - destination: -// host: ratings.prod.svc.cluster.local -// subset: v1 -// corsPolicy: -// allowOrigin: -// - example.com -// allowMethods: -// - POST -// - GET -// allowCredentials: false -// allowHeaders: -// - X-Foo-Bar -// maxAge: "24h" -// ``` -// {{}} -// {{}} -// -type CorsPolicy struct { - // The list of origins that are allowed to perform CORS requests. The - // content will be serialized into the Access-Control-Allow-Origin - // header. Wildcard * will allow all origins. - // $hide_from_docs - AllowOrigin []string `protobuf:"bytes,1,rep,name=allow_origin,json=allowOrigin,proto3" json:"allow_origin,omitempty"` // Deprecated: Do not use. - // String patterns that match allowed origins. - // An origin is allowed if any of the string matchers match. - // If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client. - AllowOrigins []*StringMatch `protobuf:"bytes,7,rep,name=allow_origins,json=allowOrigins,proto3" json:"allow_origins,omitempty"` - // List of HTTP methods allowed to access the resource. The content will - // be serialized into the Access-Control-Allow-Methods header. - AllowMethods []string `protobuf:"bytes,2,rep,name=allow_methods,json=allowMethods,proto3" json:"allow_methods,omitempty"` - // List of HTTP headers that can be used when requesting the - // resource. Serialized to Access-Control-Allow-Headers header. - AllowHeaders []string `protobuf:"bytes,3,rep,name=allow_headers,json=allowHeaders,proto3" json:"allow_headers,omitempty"` - // A white list of HTTP headers that the browsers are allowed to - // access. Serialized into Access-Control-Expose-Headers header. - ExposeHeaders []string `protobuf:"bytes,4,rep,name=expose_headers,json=exposeHeaders,proto3" json:"expose_headers,omitempty"` - // Specifies how long the results of a preflight request can be - // cached. Translates to the `Access-Control-Max-Age` header. - MaxAge *types.Duration `protobuf:"bytes,5,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` - // Indicates whether the caller is allowed to send the actual request - // (not the preflight) using credentials. Translates to - // `Access-Control-Allow-Credentials` header. - AllowCredentials *types.BoolValue `protobuf:"bytes,6,opt,name=allow_credentials,json=allowCredentials,proto3" json:"allow_credentials,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CorsPolicy) Reset() { *m = CorsPolicy{} } -func (m *CorsPolicy) String() string { return proto.CompactTextString(m) } -func (*CorsPolicy) ProtoMessage() {} -func (*CorsPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{15} -} -func (m *CorsPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CorsPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CorsPolicy.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CorsPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_CorsPolicy.Merge(m, src) -} -func (m *CorsPolicy) XXX_Size() int { - return m.Size() -} -func (m *CorsPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_CorsPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_CorsPolicy proto.InternalMessageInfo - -// Deprecated: Do not use. -func (m *CorsPolicy) GetAllowOrigin() []string { - if m != nil { - return m.AllowOrigin - } - return nil -} - -func (m *CorsPolicy) GetAllowOrigins() []*StringMatch { - if m != nil { - return m.AllowOrigins - } - return nil -} - -func (m *CorsPolicy) GetAllowMethods() []string { - if m != nil { - return m.AllowMethods - } - return nil -} - -func (m *CorsPolicy) GetAllowHeaders() []string { - if m != nil { - return m.AllowHeaders - } - return nil -} - -func (m *CorsPolicy) GetExposeHeaders() []string { - if m != nil { - return m.ExposeHeaders - } - return nil -} - -func (m *CorsPolicy) GetMaxAge() *types.Duration { - if m != nil { - return m.MaxAge - } - return nil -} - -func (m *CorsPolicy) GetAllowCredentials() *types.BoolValue { - if m != nil { - return m.AllowCredentials - } - return nil -} - -// HTTPFaultInjection can be used to specify one or more faults to inject -// while forwarding HTTP requests to the destination specified in a route. -// Fault specification is part of a VirtualService rule. Faults include -// aborting the Http request from downstream service, and/or delaying -// proxying of requests. A fault rule MUST HAVE delay or abort or both. -// -// *Note:* Delay and abort faults are independent of one another, even if -// both are specified simultaneously. -type HTTPFaultInjection struct { - // Delay requests before forwarding, emulating various failures such as - // network issues, overloaded upstream service, etc. - Delay *HTTPFaultInjection_Delay `protobuf:"bytes,1,opt,name=delay,proto3" json:"delay,omitempty"` - // Abort Http request attempts and return error codes back to downstream - // service, giving the impression that the upstream service is faulty. - Abort *HTTPFaultInjection_Abort `protobuf:"bytes,2,opt,name=abort,proto3" json:"abort,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HTTPFaultInjection) Reset() { *m = HTTPFaultInjection{} } -func (m *HTTPFaultInjection) String() string { return proto.CompactTextString(m) } -func (*HTTPFaultInjection) ProtoMessage() {} -func (*HTTPFaultInjection) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{16} -} -func (m *HTTPFaultInjection) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPFaultInjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HTTPFaultInjection.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HTTPFaultInjection) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPFaultInjection.Merge(m, src) -} -func (m *HTTPFaultInjection) XXX_Size() int { - return m.Size() -} -func (m *HTTPFaultInjection) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPFaultInjection.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPFaultInjection proto.InternalMessageInfo - -func (m *HTTPFaultInjection) GetDelay() *HTTPFaultInjection_Delay { - if m != nil { - return m.Delay - } - return nil -} - -func (m *HTTPFaultInjection) GetAbort() *HTTPFaultInjection_Abort { - if m != nil { - return m.Abort - } - return nil -} - -// Delay specification is used to inject latency into the request -// forwarding path. The following example will introduce a 5 second delay -// in 1 out of every 1000 requests to the "v1" version of the "reviews" -// service from all pods with label env: prod -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: reviews-route -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// http: -// - match: -// - sourceLabels: -// env: prod -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v1 -// fault: -// delay: -// percentage: -// value: 0.1 -// fixedDelay: 5s -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: reviews-route -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// http: -// - match: -// - sourceLabels: -// env: prod -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v1 -// fault: -// delay: -// percentage: -// value: 0.1 -// fixedDelay: 5s -// ``` -// {{}} -// {{}} -// -// The _fixedDelay_ field is used to indicate the amount of delay in seconds. -// The optional _percentage_ field can be used to only delay a certain -// percentage of requests. If left unspecified, all request will be delayed. -type HTTPFaultInjection_Delay struct { - // Percentage of requests on which the delay will be injected (0-100). - // Use of integer `percent` value is deprecated. Use the double `percentage` - // field instead. - Percent int32 `protobuf:"varint,1,opt,name=percent,proto3" json:"percent,omitempty"` // Deprecated: Do not use. - // Types that are valid to be assigned to HttpDelayType: - // *HTTPFaultInjection_Delay_FixedDelay - // *HTTPFaultInjection_Delay_ExponentialDelay - HttpDelayType isHTTPFaultInjection_Delay_HttpDelayType `protobuf_oneof:"http_delay_type"` - // Percentage of requests on which the delay will be injected. - Percentage *Percent `protobuf:"bytes,5,opt,name=percentage,proto3" json:"percentage,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HTTPFaultInjection_Delay) Reset() { *m = HTTPFaultInjection_Delay{} } -func (m *HTTPFaultInjection_Delay) String() string { return proto.CompactTextString(m) } -func (*HTTPFaultInjection_Delay) ProtoMessage() {} -func (*HTTPFaultInjection_Delay) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{16, 0} -} -func (m *HTTPFaultInjection_Delay) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPFaultInjection_Delay) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HTTPFaultInjection_Delay.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HTTPFaultInjection_Delay) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPFaultInjection_Delay.Merge(m, src) -} -func (m *HTTPFaultInjection_Delay) XXX_Size() int { - return m.Size() -} -func (m *HTTPFaultInjection_Delay) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPFaultInjection_Delay.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPFaultInjection_Delay proto.InternalMessageInfo - -type isHTTPFaultInjection_Delay_HttpDelayType interface { - isHTTPFaultInjection_Delay_HttpDelayType() - MarshalTo([]byte) (int, error) - Size() int -} - -type HTTPFaultInjection_Delay_FixedDelay struct { - FixedDelay *types.Duration `protobuf:"bytes,2,opt,name=fixed_delay,json=fixedDelay,proto3,oneof"` -} -type HTTPFaultInjection_Delay_ExponentialDelay struct { - ExponentialDelay *types.Duration `protobuf:"bytes,3,opt,name=exponential_delay,json=exponentialDelay,proto3,oneof"` -} - -func (*HTTPFaultInjection_Delay_FixedDelay) isHTTPFaultInjection_Delay_HttpDelayType() {} -func (*HTTPFaultInjection_Delay_ExponentialDelay) isHTTPFaultInjection_Delay_HttpDelayType() {} - -func (m *HTTPFaultInjection_Delay) GetHttpDelayType() isHTTPFaultInjection_Delay_HttpDelayType { - if m != nil { - return m.HttpDelayType - } - return nil -} - -// Deprecated: Do not use. -func (m *HTTPFaultInjection_Delay) GetPercent() int32 { - if m != nil { - return m.Percent - } - return 0 -} - -func (m *HTTPFaultInjection_Delay) GetFixedDelay() *types.Duration { - if x, ok := m.GetHttpDelayType().(*HTTPFaultInjection_Delay_FixedDelay); ok { - return x.FixedDelay - } - return nil -} - -func (m *HTTPFaultInjection_Delay) GetExponentialDelay() *types.Duration { - if x, ok := m.GetHttpDelayType().(*HTTPFaultInjection_Delay_ExponentialDelay); ok { - return x.ExponentialDelay - } - return nil -} - -func (m *HTTPFaultInjection_Delay) GetPercentage() *Percent { - if m != nil { - return m.Percentage - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*HTTPFaultInjection_Delay) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*HTTPFaultInjection_Delay_FixedDelay)(nil), - (*HTTPFaultInjection_Delay_ExponentialDelay)(nil), - } -} - -// Abort specification is used to prematurely abort a request with a -// pre-specified error code. The following example will return an HTTP 400 -// error code for 1 out of every 1000 requests to the "ratings" service "v1". -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: ratings-route -// spec: -// hosts: -// - ratings.prod.svc.cluster.local -// http: -// - route: -// - destination: -// host: ratings.prod.svc.cluster.local -// subset: v1 -// fault: -// abort: -// percentage: -// value: 0.1 -// httpStatus: 400 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: ratings-route -// spec: -// hosts: -// - ratings.prod.svc.cluster.local -// http: -// - route: -// - destination: -// host: ratings.prod.svc.cluster.local -// subset: v1 -// fault: -// abort: -// percentage: -// value: 0.1 -// httpStatus: 400 -// ``` -// {{}} -// {{}} -// -// The _httpStatus_ field is used to indicate the HTTP status code to -// return to the caller. The optional _percentage_ field can be used to only -// abort a certain percentage of requests. If not specified, all requests are -// aborted. -type HTTPFaultInjection_Abort struct { - // Types that are valid to be assigned to ErrorType: - // *HTTPFaultInjection_Abort_HttpStatus - // *HTTPFaultInjection_Abort_GrpcStatus - // *HTTPFaultInjection_Abort_Http2Error - ErrorType isHTTPFaultInjection_Abort_ErrorType `protobuf_oneof:"error_type"` - // Percentage of requests to be aborted with the error code provided. - Percentage *Percent `protobuf:"bytes,5,opt,name=percentage,proto3" json:"percentage,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HTTPFaultInjection_Abort) Reset() { *m = HTTPFaultInjection_Abort{} } -func (m *HTTPFaultInjection_Abort) String() string { return proto.CompactTextString(m) } -func (*HTTPFaultInjection_Abort) ProtoMessage() {} -func (*HTTPFaultInjection_Abort) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{16, 1} -} -func (m *HTTPFaultInjection_Abort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HTTPFaultInjection_Abort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HTTPFaultInjection_Abort.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HTTPFaultInjection_Abort) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTTPFaultInjection_Abort.Merge(m, src) -} -func (m *HTTPFaultInjection_Abort) XXX_Size() int { - return m.Size() -} -func (m *HTTPFaultInjection_Abort) XXX_DiscardUnknown() { - xxx_messageInfo_HTTPFaultInjection_Abort.DiscardUnknown(m) -} - -var xxx_messageInfo_HTTPFaultInjection_Abort proto.InternalMessageInfo - -type isHTTPFaultInjection_Abort_ErrorType interface { - isHTTPFaultInjection_Abort_ErrorType() - MarshalTo([]byte) (int, error) - Size() int -} - -type HTTPFaultInjection_Abort_HttpStatus struct { - HttpStatus int32 `protobuf:"varint,2,opt,name=http_status,json=httpStatus,proto3,oneof"` -} -type HTTPFaultInjection_Abort_GrpcStatus struct { - GrpcStatus string `protobuf:"bytes,3,opt,name=grpc_status,json=grpcStatus,proto3,oneof"` -} -type HTTPFaultInjection_Abort_Http2Error struct { - Http2Error string `protobuf:"bytes,4,opt,name=http2_error,json=http2Error,proto3,oneof"` -} - -func (*HTTPFaultInjection_Abort_HttpStatus) isHTTPFaultInjection_Abort_ErrorType() {} -func (*HTTPFaultInjection_Abort_GrpcStatus) isHTTPFaultInjection_Abort_ErrorType() {} -func (*HTTPFaultInjection_Abort_Http2Error) isHTTPFaultInjection_Abort_ErrorType() {} - -func (m *HTTPFaultInjection_Abort) GetErrorType() isHTTPFaultInjection_Abort_ErrorType { - if m != nil { - return m.ErrorType - } - return nil -} - -func (m *HTTPFaultInjection_Abort) GetHttpStatus() int32 { - if x, ok := m.GetErrorType().(*HTTPFaultInjection_Abort_HttpStatus); ok { - return x.HttpStatus - } - return 0 -} - -func (m *HTTPFaultInjection_Abort) GetGrpcStatus() string { - if x, ok := m.GetErrorType().(*HTTPFaultInjection_Abort_GrpcStatus); ok { - return x.GrpcStatus - } - return "" -} - -func (m *HTTPFaultInjection_Abort) GetHttp2Error() string { - if x, ok := m.GetErrorType().(*HTTPFaultInjection_Abort_Http2Error); ok { - return x.Http2Error - } - return "" -} - -func (m *HTTPFaultInjection_Abort) GetPercentage() *Percent { - if m != nil { - return m.Percentage - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*HTTPFaultInjection_Abort) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*HTTPFaultInjection_Abort_HttpStatus)(nil), - (*HTTPFaultInjection_Abort_GrpcStatus)(nil), - (*HTTPFaultInjection_Abort_Http2Error)(nil), - } -} - -// PortSelector specifies the number of a port to be used for -// matching or selection for final routing. -type PortSelector struct { - // Valid port number - Number uint32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PortSelector) Reset() { *m = PortSelector{} } -func (m *PortSelector) String() string { return proto.CompactTextString(m) } -func (*PortSelector) ProtoMessage() {} -func (*PortSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{17} -} -func (m *PortSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PortSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PortSelector.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PortSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_PortSelector.Merge(m, src) -} -func (m *PortSelector) XXX_Size() int { - return m.Size() -} -func (m *PortSelector) XXX_DiscardUnknown() { - xxx_messageInfo_PortSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_PortSelector proto.InternalMessageInfo - -func (m *PortSelector) GetNumber() uint32 { - if m != nil { - return m.Number - } - return 0 -} - -// Percent specifies a percentage in the range of [0.0, 100.0]. -type Percent struct { - Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Percent) Reset() { *m = Percent{} } -func (m *Percent) String() string { return proto.CompactTextString(m) } -func (*Percent) ProtoMessage() {} -func (*Percent) Descriptor() ([]byte, []int) { - return fileDescriptor_e85a9a4fa9c17a22, []int{18} -} -func (m *Percent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Percent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Percent.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Percent) XXX_Merge(src proto.Message) { - xxx_messageInfo_Percent.Merge(m, src) -} -func (m *Percent) XXX_Size() int { - return m.Size() -} -func (m *Percent) XXX_DiscardUnknown() { - xxx_messageInfo_Percent.DiscardUnknown(m) -} - -var xxx_messageInfo_Percent proto.InternalMessageInfo - -func (m *Percent) GetValue() float64 { - if m != nil { - return m.Value - } - return 0 -} - -func init() { - proto.RegisterType((*VirtualService)(nil), "istio.networking.v1alpha3.VirtualService") - proto.RegisterType((*Destination)(nil), "istio.networking.v1alpha3.Destination") - proto.RegisterType((*HTTPRoute)(nil), "istio.networking.v1alpha3.HTTPRoute") - proto.RegisterType((*Headers)(nil), "istio.networking.v1alpha3.Headers") - proto.RegisterType((*Headers_HeaderOperations)(nil), "istio.networking.v1alpha3.Headers.HeaderOperations") - proto.RegisterMapType((map[string]string)(nil), "istio.networking.v1alpha3.Headers.HeaderOperations.AddEntry") - proto.RegisterMapType((map[string]string)(nil), "istio.networking.v1alpha3.Headers.HeaderOperations.SetEntry") - proto.RegisterType((*TLSRoute)(nil), "istio.networking.v1alpha3.TLSRoute") - proto.RegisterType((*TCPRoute)(nil), "istio.networking.v1alpha3.TCPRoute") - proto.RegisterType((*HTTPMatchRequest)(nil), "istio.networking.v1alpha3.HTTPMatchRequest") - proto.RegisterMapType((map[string]*StringMatch)(nil), "istio.networking.v1alpha3.HTTPMatchRequest.HeadersEntry") - proto.RegisterMapType((map[string]*StringMatch)(nil), "istio.networking.v1alpha3.HTTPMatchRequest.QueryParamsEntry") - proto.RegisterMapType((map[string]string)(nil), "istio.networking.v1alpha3.HTTPMatchRequest.SourceLabelsEntry") - proto.RegisterType((*HTTPRouteDestination)(nil), "istio.networking.v1alpha3.HTTPRouteDestination") - proto.RegisterType((*RouteDestination)(nil), "istio.networking.v1alpha3.RouteDestination") - proto.RegisterType((*L4MatchAttributes)(nil), "istio.networking.v1alpha3.L4MatchAttributes") - proto.RegisterMapType((map[string]string)(nil), "istio.networking.v1alpha3.L4MatchAttributes.SourceLabelsEntry") - proto.RegisterType((*TLSMatchAttributes)(nil), "istio.networking.v1alpha3.TLSMatchAttributes") - proto.RegisterMapType((map[string]string)(nil), "istio.networking.v1alpha3.TLSMatchAttributes.SourceLabelsEntry") - proto.RegisterType((*HTTPRedirect)(nil), "istio.networking.v1alpha3.HTTPRedirect") - proto.RegisterType((*HTTPRewrite)(nil), "istio.networking.v1alpha3.HTTPRewrite") - proto.RegisterType((*StringMatch)(nil), "istio.networking.v1alpha3.StringMatch") - proto.RegisterType((*HTTPRetry)(nil), "istio.networking.v1alpha3.HTTPRetry") - proto.RegisterType((*CorsPolicy)(nil), "istio.networking.v1alpha3.CorsPolicy") - proto.RegisterType((*HTTPFaultInjection)(nil), "istio.networking.v1alpha3.HTTPFaultInjection") - proto.RegisterType((*HTTPFaultInjection_Delay)(nil), "istio.networking.v1alpha3.HTTPFaultInjection.Delay") - proto.RegisterType((*HTTPFaultInjection_Abort)(nil), "istio.networking.v1alpha3.HTTPFaultInjection.Abort") - proto.RegisterType((*PortSelector)(nil), "istio.networking.v1alpha3.PortSelector") - proto.RegisterType((*Percent)(nil), "istio.networking.v1alpha3.Percent") -} - -func init() { - proto.RegisterFile("networking/v1alpha3/virtual_service.proto", fileDescriptor_e85a9a4fa9c17a22) -} - -var fileDescriptor_e85a9a4fa9c17a22 = []byte{ - // 1851 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4f, 0x8f, 0x1b, 0x49, - 0x15, 0x8f, 0xff, 0xb4, 0xff, 0xbc, 0xb6, 0x13, 0x4f, 0xed, 0x2a, 0xdb, 0x31, 0x51, 0x32, 0x74, - 0x48, 0x08, 0x82, 0xf5, 0x08, 0x07, 0x50, 0x04, 0xd9, 0x2c, 0x9e, 0x49, 0x76, 0x9d, 0x21, 0x61, - 0x86, 0x9a, 0xd9, 0x3d, 0x70, 0x69, 0xb5, 0xbb, 0xdf, 0xd8, 0x4d, 0xec, 0xae, 0x4e, 0x75, 0xf5, - 0xcc, 0x58, 0x7c, 0x02, 0x10, 0x12, 0xe2, 0xc4, 0x07, 0x80, 0x4f, 0xc1, 0x85, 0x2b, 0x47, 0x24, - 0x24, 0x2e, 0x5c, 0x56, 0x39, 0x70, 0xe4, 0x33, 0xa0, 0xaa, 0xea, 0xb6, 0xdb, 0xe3, 0x64, 0x6c, - 0x87, 0x00, 0x27, 0xbb, 0x5e, 0xbd, 0xdf, 0xaf, 0xaa, 0x5e, 0x57, 0xfd, 0x5e, 0xbd, 0x82, 0x6f, - 0x85, 0x28, 0xce, 0x18, 0x7f, 0x19, 0x84, 0xc3, 0x9d, 0xd3, 0xef, 0xba, 0xe3, 0x68, 0xe4, 0x3e, - 0xd8, 0x39, 0x0d, 0xb8, 0x48, 0xdc, 0xb1, 0x13, 0x23, 0x3f, 0x0d, 0x3c, 0xec, 0x44, 0x9c, 0x09, - 0x46, 0x6e, 0x04, 0xb1, 0x08, 0x58, 0x67, 0x0e, 0xe8, 0x64, 0x80, 0xf6, 0xed, 0x21, 0x63, 0xc3, - 0x31, 0xee, 0xb8, 0x51, 0xb0, 0x73, 0x12, 0xe0, 0xd8, 0x77, 0x06, 0x38, 0x72, 0x4f, 0x03, 0xc6, - 0x35, 0xb6, 0x7d, 0x2b, 0x75, 0x50, 0xad, 0x41, 0x72, 0xb2, 0xe3, 0x27, 0xdc, 0x15, 0x01, 0x0b, - 0xdf, 0xd6, 0x7f, 0xc6, 0xdd, 0x28, 0x42, 0x1e, 0xeb, 0x7e, 0xfb, 0x37, 0x45, 0xb8, 0xfa, 0xa5, - 0x9e, 0xd5, 0x91, 0x9e, 0x14, 0xb9, 0x01, 0xc6, 0x88, 0xc5, 0x22, 0xb6, 0x0a, 0xdb, 0xa5, 0xfb, - 0xf5, 0xdd, 0xd2, 0x57, 0xbd, 0x22, 0xd5, 0x16, 0xd2, 0x86, 0xda, 0xd0, 0x15, 0x78, 0xe6, 0x4e, - 0x63, 0xab, 0x28, 0x7b, 0xe9, 0xac, 0x4d, 0x1e, 0x42, 0x79, 0x24, 0x44, 0x64, 0x95, 0xb6, 0x4b, - 0xf7, 0xcd, 0xee, 0x37, 0x3a, 0x6f, 0x5d, 0x54, 0xa7, 0x7f, 0x7c, 0x7c, 0x48, 0x59, 0x22, 0x90, - 0x2a, 0x04, 0xf9, 0x3e, 0x94, 0xc4, 0x38, 0xb6, 0x0c, 0x05, 0xbc, 0x73, 0x09, 0xf0, 0xf8, 0xf9, - 0x91, 0xc6, 0x49, 0x7f, 0x05, 0xf3, 0x22, 0xab, 0xbc, 0x1a, 0xb6, 0x77, 0x98, 0xc1, 0xbc, 0x88, - 0x7c, 0x0d, 0xea, 0x78, 0x1e, 0x31, 0x2e, 0x1c, 0xc1, 0xac, 0x8a, 0x5e, 0x84, 0x36, 0x1c, 0x33, - 0xfb, 0x97, 0x60, 0x3e, 0xc1, 0x58, 0x04, 0xa1, 0x8a, 0x21, 0xf9, 0x08, 0xca, 0x72, 0xe1, 0x56, - 0x61, 0xbb, 0x90, 0x45, 0x42, 0x19, 0xc8, 0x75, 0xa8, 0xc4, 0xc9, 0x20, 0x46, 0x61, 0x15, 0x65, - 0x17, 0x4d, 0x5b, 0xe4, 0x47, 0x50, 0x96, 0x4c, 0x56, 0x69, 0xbb, 0x70, 0xdf, 0xec, 0x7e, 0xf3, - 0x92, 0x49, 0x1d, 0x32, 0x2e, 0x8e, 0x70, 0x8c, 0x9e, 0x60, 0x9c, 0x2a, 0x90, 0xfd, 0x8f, 0x2a, - 0xd4, 0x67, 0xb1, 0x21, 0x04, 0xca, 0xa1, 0x3b, 0x41, 0x6b, 0x4b, 0x0d, 0xa0, 0xfe, 0x93, 0x1e, - 0x18, 0x13, 0x57, 0x78, 0x23, 0xf5, 0x69, 0xcc, 0xee, 0xb7, 0x57, 0x04, 0xf9, 0x85, 0xf4, 0xa5, - 0xf8, 0x2a, 0xc1, 0x58, 0x50, 0x8d, 0x24, 0x4f, 0xc1, 0xe0, 0x92, 0x5f, 0x7d, 0x3f, 0xb3, 0xbb, - 0xb3, 0xce, 0x77, 0xca, 0x85, 0x84, 0x6a, 0x34, 0xd9, 0x83, 0x1a, 0x47, 0x3f, 0xe0, 0xe8, 0xad, - 0xb3, 0x58, 0xc5, 0x94, 0xba, 0xd3, 0x19, 0x90, 0xfc, 0x18, 0xaa, 0x1c, 0xcf, 0x78, 0x20, 0xd0, - 0x2a, 0x2b, 0x8e, 0x7b, 0x2b, 0x39, 0x94, 0x37, 0xcd, 0x60, 0xe4, 0x01, 0x54, 0x45, 0x30, 0x41, - 0x96, 0x08, 0xab, 0xa2, 0x18, 0x6e, 0x74, 0xf4, 0x86, 0xef, 0x64, 0x1b, 0xbe, 0xf3, 0x24, 0x3d, - 0x10, 0x34, 0xf3, 0x24, 0x8f, 0xe5, 0xb0, 0x82, 0x07, 0x18, 0x5b, 0x55, 0x05, 0x5a, 0xb9, 0x59, - 0x51, 0xf0, 0x29, 0xcd, 0x40, 0x64, 0x0f, 0x8c, 0x13, 0x37, 0x19, 0x0b, 0xab, 0xa6, 0xd0, 0x1f, - 0xaf, 0x40, 0x7f, 0x26, 0x7d, 0x9f, 0x85, 0xbf, 0x40, 0x4f, 0x07, 0x50, 0x61, 0xc9, 0x63, 0xa8, - 0x4c, 0x02, 0xce, 0x19, 0xb7, 0xea, 0x2b, 0x97, 0x9e, 0x8f, 0x7f, 0x8a, 0x22, 0x9f, 0xc3, 0x55, - 0xfd, 0xcf, 0x89, 0x90, 0x7b, 0x18, 0x0a, 0x8b, 0x28, 0x9e, 0x9b, 0x4b, 0x01, 0xf8, 0xe2, 0x59, - 0x28, 0x1e, 0x74, 0xbf, 0x74, 0xc7, 0x09, 0xee, 0x16, 0xad, 0x02, 0x6d, 0x6a, 0xdc, 0xa1, 0x86, - 0x91, 0x03, 0xd8, 0x5a, 0x24, 0x72, 0x87, 0x68, 0x7d, 0xa0, 0xb8, 0xec, 0xcb, 0xf6, 0xaf, 0x76, - 0xa6, 0xad, 0x05, 0x36, 0x77, 0x88, 0xe4, 0x33, 0x30, 0x3d, 0xc6, 0x63, 0x27, 0x62, 0xe3, 0xc0, - 0x9b, 0x5a, 0xa0, 0xa8, 0xee, 0x5e, 0x42, 0xb5, 0xc7, 0x78, 0x7c, 0xa8, 0x9c, 0x29, 0x78, 0xb3, - 0xff, 0xe4, 0x11, 0x54, 0x47, 0xe8, 0xfa, 0xc8, 0x63, 0xab, 0xb5, 0x72, 0x3a, 0x7d, 0xed, 0x49, - 0x33, 0xc8, 0x7e, 0xb9, 0x66, 0xb4, 0x2a, 0xfb, 0xe5, 0x9a, 0xd9, 0x6a, 0xd1, 0xad, 0x33, 0x1c, - 0xc4, 0xcc, 0x7b, 0x89, 0xc2, 0x49, 0xa2, 0x21, 0x77, 0x7d, 0xa4, 0x57, 0xa5, 0x0a, 0x86, 0xbe, - 0x93, 0xba, 0xd3, 0x8f, 0x38, 0x4e, 0xd8, 0x29, 0x3a, 0x1c, 0xe3, 0x88, 0x85, 0x31, 0xce, 0x3b, - 0x52, 0xc7, 0xa5, 0x8e, 0xeb, 0x33, 0x84, 0x3a, 0x5f, 0x73, 0xfb, 0x0c, 0xb0, 0x60, 0xb7, 0xff, - 0x59, 0x82, 0x6a, 0x3a, 0x4b, 0xf2, 0x42, 0xee, 0x40, 0xd5, 0xad, 0xa4, 0xc5, 0xec, 0x3e, 0x58, - 0xbd, 0xb4, 0xf4, 0xf7, 0x20, 0x42, 0xbd, 0x9f, 0x63, 0x9a, 0x71, 0x90, 0x03, 0x79, 0x18, 0xf5, - 0xf4, 0x94, 0x1e, 0xbd, 0x23, 0xdf, 0x8c, 0xa4, 0xfd, 0xa7, 0x22, 0xb4, 0x2e, 0x76, 0x93, 0x9f, - 0x42, 0x49, 0x0a, 0x9e, 0x96, 0x9e, 0x47, 0xef, 0x30, 0x40, 0xe7, 0x08, 0xc5, 0xd3, 0x50, 0x1e, - 0x25, 0x49, 0x24, 0xf9, 0x5c, 0xdf, 0x4f, 0x75, 0xe8, 0x9d, 0xf8, 0x7a, 0xbe, 0x9f, 0xf2, 0xb9, - 0xbe, 0x2f, 0x35, 0x59, 0x7f, 0x12, 0x95, 0x82, 0xea, 0x34, 0x6d, 0xb5, 0x7f, 0x00, 0xb5, 0x6c, - 0x60, 0xd2, 0x82, 0xd2, 0x4b, 0x9c, 0x6a, 0x3d, 0xa7, 0xf2, 0x2f, 0xf9, 0x10, 0x8c, 0x53, 0x79, - 0x34, 0x52, 0x21, 0xd7, 0x8d, 0x1f, 0x16, 0x1f, 0x16, 0x24, 0x2e, 0x1b, 0x60, 0x13, 0x9c, 0xfd, - 0xfb, 0x02, 0xd4, 0xb2, 0x4c, 0x45, 0xfa, 0x8b, 0x8a, 0xfd, 0xf1, 0xe5, 0xd9, 0x4d, 0x09, 0x76, - 0x4f, 0x08, 0x1e, 0x0c, 0x12, 0x81, 0x71, 0x9a, 0x7b, 0xb5, 0x70, 0xf7, 0x16, 0x85, 0xfb, 0x32, - 0xed, 0x7f, 0x8b, 0x68, 0xdb, 0xbf, 0x93, 0x33, 0x4b, 0x93, 0x21, 0xd9, 0x5d, 0x9c, 0xd9, 0x77, - 0x2e, 0xe1, 0x7b, 0xfe, 0xbd, 0x0b, 0x13, 0x7b, 0x8f, 0x73, 0xfa, 0x63, 0x15, 0x5a, 0x17, 0x73, - 0xd5, 0x2c, 0xf7, 0x99, 0xb9, 0xdc, 0xf7, 0x10, 0x4a, 0x09, 0x0f, 0xd2, 0xf3, 0x72, 0x99, 0x5a, - 0x1e, 0x09, 0x1e, 0x84, 0x43, 0xcd, 0x27, 0x21, 0x52, 0x6a, 0x63, 0x6f, 0x84, 0x93, 0xec, 0x70, - 0xac, 0x0b, 0x4e, 0x51, 0x4a, 0xaa, 0x51, 0x8c, 0x98, 0x9f, 0x66, 0xba, 0xb5, 0xf1, 0x1a, 0x45, - 0x9e, 0x40, 0xdd, 0x4d, 0xc4, 0x88, 0xf1, 0x40, 0x4c, 0xd7, 0x48, 0x74, 0x79, 0x8a, 0x39, 0x90, - 0xd0, 0xb9, 0x1c, 0xea, 0x9b, 0xd2, 0xc3, 0x0d, 0xb2, 0x7f, 0x76, 0x86, 0xf4, 0x71, 0xc9, 0x88, - 0x64, 0x9c, 0xd5, 0x75, 0x45, 0xe6, 0xce, 0xa6, 0xbe, 0x85, 0x90, 0x01, 0x34, 0x63, 0x96, 0x70, - 0x0f, 0x9d, 0xb1, 0x3b, 0xc0, 0xb1, 0xcc, 0x91, 0x72, 0xb4, 0x4f, 0x36, 0x19, 0xed, 0x48, 0x11, - 0x3c, 0x57, 0x78, 0x3d, 0x64, 0x23, 0xce, 0x99, 0x16, 0xee, 0x91, 0xb5, 0x0b, 0xf7, 0x48, 0x07, - 0x1a, 0xaf, 0x12, 0xe4, 0x53, 0x27, 0x72, 0xb9, 0x3b, 0x89, 0xad, 0xfa, 0x6a, 0x7d, 0xb8, 0x38, - 0xfc, 0xcf, 0x24, 0xfe, 0x50, 0xc1, 0xf5, 0xe8, 0xe6, 0xab, 0xb9, 0x85, 0xdc, 0x83, 0x6b, 0xc1, - 0x30, 0x64, 0x1c, 0x9d, 0x84, 0x07, 0x8e, 0xe7, 0xc6, 0xa8, 0x72, 0x54, 0x8d, 0x36, 0xb5, 0xf9, - 0x0b, 0x1e, 0xec, 0xb9, 0x31, 0xb6, 0x07, 0xd0, 0xc8, 0x47, 0xed, 0x0d, 0x1a, 0xf0, 0x28, 0xaf, - 0x01, 0xeb, 0x7f, 0xd4, 0x9c, 0xc6, 0x7c, 0x0a, 0x5b, 0x4b, 0xb1, 0xda, 0x48, 0xa4, 0x4e, 0xa0, - 0x75, 0x71, 0xb5, 0xff, 0x8d, 0x89, 0xda, 0x7f, 0x28, 0xc2, 0x87, 0x6f, 0xba, 0x0f, 0x92, 0x17, - 0x60, 0xfa, 0xf3, 0xe6, 0x1a, 0xc7, 0x33, 0x07, 0xd6, 0xfa, 0x96, 0xc7, 0x4b, 0x11, 0x3f, 0xc3, - 0x60, 0x38, 0xd2, 0x17, 0x6b, 0x83, 0xa6, 0xad, 0xfc, 0x65, 0xa0, 0xfa, 0x2e, 0x97, 0x81, 0x52, - 0xab, 0xfa, 0x3f, 0xc8, 0xf1, 0x53, 0x68, 0xfd, 0x9f, 0x02, 0x64, 0xff, 0xb9, 0x08, 0x5b, 0x4b, - 0x3a, 0x4d, 0x76, 0xe0, 0x83, 0x1c, 0xd8, 0x89, 0x93, 0x41, 0x88, 0x59, 0x65, 0x47, 0x49, 0xae, - 0xeb, 0x48, 0xf7, 0xcc, 0x14, 0xa1, 0x98, 0x53, 0x84, 0x3b, 0x33, 0x45, 0xd0, 0x78, 0x25, 0x83, - 0xf5, 0xec, 0x48, 0x6b, 0x24, 0xf1, 0x2e, 0xca, 0x86, 0xae, 0xcb, 0x1e, 0x6f, 0x92, 0x56, 0x36, - 0xd2, 0x0d, 0x63, 0x51, 0x37, 0xfe, 0xe3, 0xa3, 0x64, 0xff, 0xad, 0x08, 0x64, 0x39, 0x07, 0x93, - 0x6d, 0xa8, 0xc7, 0x61, 0xe0, 0x2c, 0x95, 0xc4, 0xb5, 0x38, 0x0c, 0xfa, 0xaa, 0x2a, 0x7e, 0x4b, - 0x90, 0x8b, 0x2b, 0x83, 0x5c, 0xca, 0x05, 0xd9, 0xbf, 0x18, 0x3f, 0x2d, 0xf2, 0x9f, 0x6e, 0x74, - 0x61, 0xd8, 0x28, 0x80, 0x95, 0xf7, 0x1c, 0xc0, 0xfd, 0x72, 0xad, 0xdc, 0x32, 0xe8, 0xe2, 0x5e, - 0xb1, 0x3d, 0x68, 0xe4, 0xab, 0x3f, 0x49, 0x98, 0xa5, 0xf1, 0xba, 0x4e, 0xcf, 0x37, 0xf3, 0xe9, - 0x51, 0x93, 0xe6, 0xd2, 0xde, 0x1d, 0x68, 0x66, 0xf5, 0xa2, 0xe3, 0x31, 0x1f, 0xd3, 0xa0, 0x35, - 0x32, 0xe3, 0x1e, 0xf3, 0xd1, 0xfe, 0x04, 0xcc, 0x5c, 0x79, 0xb8, 0xe9, 0x18, 0x36, 0x82, 0x99, - 0x93, 0x3d, 0x72, 0x1d, 0x0c, 0x3c, 0x77, 0xbd, 0xb4, 0xec, 0xef, 0x5f, 0xa1, 0xba, 0x49, 0x2c, - 0xa8, 0x44, 0x1c, 0x4f, 0x82, 0x73, 0xcd, 0xd0, 0xbf, 0x42, 0xd3, 0xb6, 0x44, 0x70, 0x1c, 0xe2, - 0xb9, 0x3e, 0x19, 0x12, 0xa1, 0x9a, 0xbb, 0x0d, 0x00, 0x75, 0x51, 0x72, 0xc4, 0x34, 0x42, 0xfb, - 0xd7, 0x85, 0xb4, 0xbe, 0x97, 0xe5, 0x24, 0xb9, 0x0d, 0x35, 0x57, 0x08, 0x9c, 0x44, 0x6a, 0x5b, - 0x15, 0xee, 0x1b, 0xe9, 0xb6, 0xca, 0x8c, 0xa4, 0x07, 0xd7, 0x22, 0xe4, 0x8e, 0xe0, 0x53, 0x27, - 0xab, 0x71, 0x8b, 0xab, 0x6a, 0xdc, 0x66, 0x84, 0xfc, 0x98, 0x4f, 0x8f, 0xd3, 0x4a, 0xf7, 0x86, - 0x2c, 0x0c, 0x24, 0x01, 0x0b, 0xd3, 0x43, 0xab, 0x8a, 0xd8, 0xe9, 0x41, 0x68, 0xff, 0xab, 0x08, - 0x30, 0x2f, 0xbc, 0xc8, 0x5d, 0x68, 0xb8, 0xe3, 0x31, 0x3b, 0x73, 0x18, 0x0f, 0x86, 0x41, 0x98, - 0x6e, 0x74, 0x59, 0x2e, 0x9a, 0xca, 0x7e, 0xa0, 0xcc, 0xe4, 0x27, 0xd0, 0xcc, 0xbb, 0x65, 0x97, - 0x83, 0x75, 0x13, 0x4a, 0x23, 0xc7, 0x15, 0xcb, 0x4f, 0xab, 0xc9, 0xf4, 0x3d, 0x29, 0x3b, 0x31, - 0xda, 0xe9, 0x85, 0xb6, 0xcd, 0x9d, 0x32, 0xf9, 0x2f, 0xe5, 0x9c, 0xb2, 0x7a, 0xea, 0x2e, 0x5c, - 0xc5, 0xf3, 0x88, 0xcd, 0x95, 0x5b, 0xa9, 0x4f, 0x9d, 0x36, 0xb5, 0x35, 0x73, 0xeb, 0x42, 0x75, - 0xe2, 0x9e, 0x3b, 0xb2, 0xc0, 0x35, 0x56, 0x45, 0xb2, 0x32, 0x71, 0xcf, 0x7b, 0x43, 0x24, 0x9f, - 0xc3, 0x96, 0x1e, 0xdf, 0xe3, 0xe8, 0x63, 0x28, 0x02, 0x77, 0x1c, 0xa7, 0x6f, 0x0d, 0xed, 0x25, - 0xf4, 0x2e, 0x63, 0x63, 0x55, 0x68, 0xd3, 0x96, 0x02, 0xed, 0xcd, 0x31, 0xf6, 0x6f, 0x0d, 0x20, - 0xcb, 0xcf, 0x01, 0xe4, 0x19, 0x18, 0x3e, 0x8e, 0xdd, 0xe9, 0x3a, 0x85, 0xe0, 0x12, 0xba, 0xf3, - 0x44, 0x42, 0xa9, 0x66, 0x90, 0x54, 0xee, 0x20, 0x13, 0xef, 0x8d, 0xa9, 0x7a, 0x12, 0x4a, 0x35, - 0x43, 0xfb, 0x57, 0x45, 0x30, 0x14, 0x37, 0xb9, 0x09, 0xd5, 0xec, 0x81, 0x41, 0xef, 0x52, 0xb9, - 0x27, 0x32, 0x13, 0xe9, 0x81, 0x79, 0x12, 0x9c, 0xa3, 0xef, 0xe8, 0x35, 0xac, 0xda, 0x9f, 0x6a, - 0x8b, 0xf7, 0xaf, 0x50, 0x50, 0x20, 0x3d, 0x40, 0x1f, 0xb6, 0xe4, 0x57, 0x0a, 0x75, 0x9c, 0x52, - 0xa2, 0xd2, 0x0a, 0xa2, 0xfe, 0x15, 0xda, 0xca, 0xa1, 0x34, 0xd3, 0x2e, 0x40, 0xee, 0x09, 0xc3, - 0x58, 0xfb, 0x09, 0x23, 0x87, 0xda, 0xdd, 0x82, 0x6b, 0x23, 0x21, 0x22, 0x3d, 0x0d, 0x75, 0x6c, - 0xdb, 0x7f, 0x2f, 0x80, 0xa1, 0x82, 0x43, 0xee, 0x81, 0xa9, 0x3a, 0x63, 0xe1, 0x8a, 0x24, 0xd6, - 0x09, 0x78, 0xb6, 0x24, 0xd9, 0x73, 0xa4, 0x3a, 0xc8, 0xd7, 0xc1, 0x1c, 0xf2, 0xc8, 0xcb, 0xfc, - 0x32, 0x51, 0x00, 0x69, 0x9c, 0xbb, 0x48, 0x40, 0xd7, 0x41, 0xf5, 0x06, 0x54, 0xce, 0x5c, 0x94, - 0xf1, 0xa9, 0x7a, 0xe1, 0x79, 0x1f, 0xcb, 0x69, 0x00, 0xa8, 0x01, 0xd4, 0x4a, 0xf6, 0xcb, 0xb5, - 0x42, 0xab, 0x38, 0xfb, 0x78, 0x76, 0x17, 0x1a, 0xf9, 0x57, 0x48, 0x79, 0xb5, 0x08, 0x93, 0xc9, - 0x00, 0xb9, 0xfa, 0xd2, 0x4d, 0x9a, 0xb6, 0xf6, 0xcb, 0xb5, 0x62, 0xab, 0xa4, 0xab, 0x30, 0xfb, - 0x36, 0x54, 0xb3, 0x87, 0xa3, 0x59, 0x22, 0x90, 0xde, 0x85, 0x34, 0x11, 0xec, 0x76, 0xfe, 0xf2, - 0xfa, 0x56, 0xe1, 0xaf, 0xaf, 0x6f, 0x15, 0xbe, 0x7a, 0x7d, 0xab, 0xf0, 0xf3, 0x6d, 0x3d, 0xdd, - 0x80, 0xa9, 0x17, 0xec, 0x37, 0x3c, 0x89, 0x0f, 0x2a, 0xea, 0xdb, 0x3e, 0xf8, 0x77, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x78, 0xe8, 0xde, 0x88, 0x30, 0x17, 0x00, 0x00, -} - -func (m *VirtualService) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VirtualService) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VirtualService) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ExportTo) > 0 { - for iNdEx := len(m.ExportTo) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExportTo[iNdEx]) - copy(dAtA[i:], m.ExportTo[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.ExportTo[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Tls) > 0 { - for iNdEx := len(m.Tls) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tls[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.Tcp) > 0 { - for iNdEx := len(m.Tcp) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tcp[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Http) > 0 { - for iNdEx := len(m.Http) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Http[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Gateways) > 0 { - for iNdEx := len(m.Gateways) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Gateways[iNdEx]) - copy(dAtA[i:], m.Gateways[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Gateways[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Hosts) > 0 { - for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Hosts[iNdEx]) - copy(dAtA[i:], m.Hosts[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Hosts[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Destination) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Destination) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Destination) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Port != nil { - { - size, err := m.Port.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Subset) > 0 { - i -= len(m.Subset) - copy(dAtA[i:], m.Subset) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Subset))) - i-- - dAtA[i] = 0x12 - } - if len(m.Host) > 0 { - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Host))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *HTTPRoute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HTTPRoute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HTTPRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.MirrorPercentage != nil { - { - size, err := m.MirrorPercentage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - if m.MirrorPercent != nil { - { - size, err := m.MirrorPercent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if m.Headers != nil { - { - size, err := m.Headers.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if m.CorsPolicy != nil { - { - size, err := m.CorsPolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.Mirror != nil { - { - size, err := m.Mirror.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.Fault != nil { - { - size, err := m.Fault.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.Retries != nil { - { - size, err := m.Retries.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.Timeout != nil { - { - size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Rewrite != nil { - { - size, err := m.Rewrite.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Redirect != nil { - { - size, err := m.Redirect.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Route) > 0 { - for iNdEx := len(m.Route) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Route[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Match) > 0 { - for iNdEx := len(m.Match) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Match[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Headers) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Headers) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Headers) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Response != nil { - { - size, err := m.Response.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Request != nil { - { - size, err := m.Request.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Headers_HeaderOperations) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Headers_HeaderOperations) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Headers_HeaderOperations) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Remove) > 0 { - for iNdEx := len(m.Remove) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Remove[iNdEx]) - copy(dAtA[i:], m.Remove[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Remove[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Add) > 0 { - for k := range m.Add { - v := m.Add[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintVirtualService(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintVirtualService(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintVirtualService(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Set) > 0 { - for k := range m.Set { - v := m.Set[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintVirtualService(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintVirtualService(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintVirtualService(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TLSRoute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TLSRoute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TLSRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Route) > 0 { - for iNdEx := len(m.Route) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Route[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Match) > 0 { - for iNdEx := len(m.Match) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Match[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TCPRoute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TCPRoute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TCPRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Route) > 0 { - for iNdEx := len(m.Route) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Route[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Match) > 0 { - for iNdEx := len(m.Match) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Match[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *HTTPMatchRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HTTPMatchRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HTTPMatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x5a - } - if m.IgnoreUriCase { - i-- - if m.IgnoreUriCase { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if len(m.QueryParams) > 0 { - for k := range m.QueryParams { - v := m.QueryParams[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintVirtualService(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintVirtualService(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x4a - } - } - if len(m.Gateways) > 0 { - for iNdEx := len(m.Gateways) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Gateways[iNdEx]) - copy(dAtA[i:], m.Gateways[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Gateways[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(m.SourceLabels) > 0 { - for k := range m.SourceLabels { - v := m.SourceLabels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintVirtualService(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintVirtualService(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintVirtualService(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x3a - } - } - if m.Port != 0 { - i = encodeVarintVirtualService(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x30 - } - if len(m.Headers) > 0 { - for k := range m.Headers { - v := m.Headers[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintVirtualService(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintVirtualService(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if m.Authority != nil { - { - size, err := m.Authority.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Method != nil { - { - size, err := m.Method.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Scheme != nil { - { - size, err := m.Scheme.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Uri != nil { - { - size, err := m.Uri.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *HTTPRouteDestination) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HTTPRouteDestination) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HTTPRouteDestination) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Headers != nil { - { - size, err := m.Headers.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.Weight != 0 { - i = encodeVarintVirtualService(dAtA, i, uint64(m.Weight)) - i-- - dAtA[i] = 0x10 - } - if m.Destination != nil { - { - size, err := m.Destination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RouteDestination) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteDestination) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouteDestination) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Weight != 0 { - i = encodeVarintVirtualService(dAtA, i, uint64(m.Weight)) - i-- - dAtA[i] = 0x10 - } - if m.Destination != nil { - { - size, err := m.Destination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *L4MatchAttributes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *L4MatchAttributes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *L4MatchAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Gateways) > 0 { - for iNdEx := len(m.Gateways) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Gateways[iNdEx]) - copy(dAtA[i:], m.Gateways[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Gateways[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.SourceLabels) > 0 { - for k := range m.SourceLabels { - v := m.SourceLabels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintVirtualService(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintVirtualService(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintVirtualService(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.SourceSubnet) > 0 { - i -= len(m.SourceSubnet) - copy(dAtA[i:], m.SourceSubnet) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.SourceSubnet))) - i-- - dAtA[i] = 0x1a - } - if m.Port != 0 { - i = encodeVarintVirtualService(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x10 - } - if len(m.DestinationSubnets) > 0 { - for iNdEx := len(m.DestinationSubnets) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DestinationSubnets[iNdEx]) - copy(dAtA[i:], m.DestinationSubnets[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.DestinationSubnets[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TLSMatchAttributes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TLSMatchAttributes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TLSMatchAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Gateways) > 0 { - for iNdEx := len(m.Gateways) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Gateways[iNdEx]) - copy(dAtA[i:], m.Gateways[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Gateways[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.SourceLabels) > 0 { - for k := range m.SourceLabels { - v := m.SourceLabels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintVirtualService(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintVirtualService(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintVirtualService(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if m.Port != 0 { - i = encodeVarintVirtualService(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x18 - } - if len(m.DestinationSubnets) > 0 { - for iNdEx := len(m.DestinationSubnets) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DestinationSubnets[iNdEx]) - copy(dAtA[i:], m.DestinationSubnets[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.DestinationSubnets[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.SniHosts) > 0 { - for iNdEx := len(m.SniHosts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SniHosts[iNdEx]) - copy(dAtA[i:], m.SniHosts[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.SniHosts[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *HTTPRedirect) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HTTPRedirect) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HTTPRedirect) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.RedirectCode != 0 { - i = encodeVarintVirtualService(dAtA, i, uint64(m.RedirectCode)) - i-- - dAtA[i] = 0x18 - } - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0x12 - } - if len(m.Uri) > 0 { - i -= len(m.Uri) - copy(dAtA[i:], m.Uri) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Uri))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *HTTPRewrite) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HTTPRewrite) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HTTPRewrite) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0x12 - } - if len(m.Uri) > 0 { - i -= len(m.Uri) - copy(dAtA[i:], m.Uri) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Uri))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StringMatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StringMatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StringMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.MatchType != nil { - { - size := m.MatchType.Size() - i -= size - if _, err := m.MatchType.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *StringMatch_Exact) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *StringMatch_Exact) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Exact) - copy(dAtA[i:], m.Exact) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Exact))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} -func (m *StringMatch_Prefix) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *StringMatch_Prefix) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Prefix) - copy(dAtA[i:], m.Prefix) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Prefix))) - i-- - dAtA[i] = 0x12 - return len(dAtA) - i, nil -} -func (m *StringMatch_Regex) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *StringMatch_Regex) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Regex) - copy(dAtA[i:], m.Regex) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Regex))) - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil -} -func (m *HTTPRetry) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HTTPRetry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HTTPRetry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.RetryOn) > 0 { - i -= len(m.RetryOn) - copy(dAtA[i:], m.RetryOn) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.RetryOn))) - i-- - dAtA[i] = 0x1a - } - if m.PerTryTimeout != nil { - { - size, err := m.PerTryTimeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Attempts != 0 { - i = encodeVarintVirtualService(dAtA, i, uint64(m.Attempts)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CorsPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CorsPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CorsPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.AllowOrigins) > 0 { - for iNdEx := len(m.AllowOrigins) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AllowOrigins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.AllowCredentials != nil { - { - size, err := m.AllowCredentials.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.MaxAge != nil { - { - size, err := m.MaxAge.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.ExposeHeaders) > 0 { - for iNdEx := len(m.ExposeHeaders) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExposeHeaders[iNdEx]) - copy(dAtA[i:], m.ExposeHeaders[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.ExposeHeaders[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.AllowHeaders) > 0 { - for iNdEx := len(m.AllowHeaders) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AllowHeaders[iNdEx]) - copy(dAtA[i:], m.AllowHeaders[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.AllowHeaders[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.AllowMethods) > 0 { - for iNdEx := len(m.AllowMethods) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AllowMethods[iNdEx]) - copy(dAtA[i:], m.AllowMethods[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.AllowMethods[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.AllowOrigin) > 0 { - for iNdEx := len(m.AllowOrigin) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AllowOrigin[iNdEx]) - copy(dAtA[i:], m.AllowOrigin[iNdEx]) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.AllowOrigin[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *HTTPFaultInjection) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HTTPFaultInjection) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HTTPFaultInjection) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Abort != nil { - { - size, err := m.Abort.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Delay != nil { - { - size, err := m.Delay.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *HTTPFaultInjection_Delay) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HTTPFaultInjection_Delay) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HTTPFaultInjection_Delay) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Percentage != nil { - { - size, err := m.Percentage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.HttpDelayType != nil { - { - size := m.HttpDelayType.Size() - i -= size - if _, err := m.HttpDelayType.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Percent != 0 { - i = encodeVarintVirtualService(dAtA, i, uint64(m.Percent)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *HTTPFaultInjection_Delay_FixedDelay) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *HTTPFaultInjection_Delay_FixedDelay) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.FixedDelay != nil { - { - size, err := m.FixedDelay.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *HTTPFaultInjection_Delay_ExponentialDelay) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *HTTPFaultInjection_Delay_ExponentialDelay) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ExponentialDelay != nil { - { - size, err := m.ExponentialDelay.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *HTTPFaultInjection_Abort) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HTTPFaultInjection_Abort) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HTTPFaultInjection_Abort) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Percentage != nil { - { - size, err := m.Percentage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVirtualService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.ErrorType != nil { - { - size := m.ErrorType.Size() - i -= size - if _, err := m.ErrorType.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *HTTPFaultInjection_Abort_HttpStatus) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *HTTPFaultInjection_Abort_HttpStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintVirtualService(dAtA, i, uint64(m.HttpStatus)) - i-- - dAtA[i] = 0x10 - return len(dAtA) - i, nil -} -func (m *HTTPFaultInjection_Abort_GrpcStatus) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *HTTPFaultInjection_Abort_GrpcStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.GrpcStatus) - copy(dAtA[i:], m.GrpcStatus) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.GrpcStatus))) - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil -} -func (m *HTTPFaultInjection_Abort_Http2Error) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *HTTPFaultInjection_Abort_Http2Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Http2Error) - copy(dAtA[i:], m.Http2Error) - i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Http2Error))) - i-- - dAtA[i] = 0x22 - return len(dAtA) - i, nil -} -func (m *PortSelector) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PortSelector) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PortSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Number != 0 { - i = encodeVarintVirtualService(dAtA, i, uint64(m.Number)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Percent) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Percent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Percent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func encodeVarintVirtualService(dAtA []byte, offset int, v uint64) int { - offset -= sovVirtualService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *VirtualService) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Hosts) > 0 { - for _, s := range m.Hosts { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.Gateways) > 0 { - for _, s := range m.Gateways { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.Http) > 0 { - for _, e := range m.Http { - l = e.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.Tcp) > 0 { - for _, e := range m.Tcp { - l = e.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.Tls) > 0 { - for _, e := range m.Tls { - l = e.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.ExportTo) > 0 { - for _, s := range m.ExportTo { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Destination) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Host) - if l > 0 { - n += 1 + l + sovVirtualService(uint64(l)) - } - l = len(m.Subset) - if l > 0 { - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Port != nil { - l = m.Port.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HTTPRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Match) > 0 { - for _, e := range m.Match { - l = e.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.Route) > 0 { - for _, e := range m.Route { - l = e.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if m.Redirect != nil { - l = m.Redirect.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Rewrite != nil { - l = m.Rewrite.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Timeout != nil { - l = m.Timeout.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Retries != nil { - l = m.Retries.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Fault != nil { - l = m.Fault.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Mirror != nil { - l = m.Mirror.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.CorsPolicy != nil { - l = m.CorsPolicy.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Headers != nil { - l = m.Headers.Size() - n += 2 + l + sovVirtualService(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 2 + l + sovVirtualService(uint64(l)) - } - if m.MirrorPercent != nil { - l = m.MirrorPercent.Size() - n += 2 + l + sovVirtualService(uint64(l)) - } - if m.MirrorPercentage != nil { - l = m.MirrorPercentage.Size() - n += 2 + l + sovVirtualService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Headers) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - l = m.Request.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Response != nil { - l = m.Response.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Headers_HeaderOperations) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Set) > 0 { - for k, v := range m.Set { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovVirtualService(uint64(len(k))) + 1 + len(v) + sovVirtualService(uint64(len(v))) - n += mapEntrySize + 1 + sovVirtualService(uint64(mapEntrySize)) - } - } - if len(m.Add) > 0 { - for k, v := range m.Add { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovVirtualService(uint64(len(k))) + 1 + len(v) + sovVirtualService(uint64(len(v))) - n += mapEntrySize + 1 + sovVirtualService(uint64(mapEntrySize)) - } - } - if len(m.Remove) > 0 { - for _, s := range m.Remove { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TLSRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Match) > 0 { - for _, e := range m.Match { - l = e.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.Route) > 0 { - for _, e := range m.Route { - l = e.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TCPRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Match) > 0 { - for _, e := range m.Match { - l = e.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.Route) > 0 { - for _, e := range m.Route { - l = e.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HTTPMatchRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Uri != nil { - l = m.Uri.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Scheme != nil { - l = m.Scheme.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Method != nil { - l = m.Method.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Authority != nil { - l = m.Authority.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if len(m.Headers) > 0 { - for k, v := range m.Headers { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovVirtualService(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovVirtualService(uint64(len(k))) + l - n += mapEntrySize + 1 + sovVirtualService(uint64(mapEntrySize)) - } - } - if m.Port != 0 { - n += 1 + sovVirtualService(uint64(m.Port)) - } - if len(m.SourceLabels) > 0 { - for k, v := range m.SourceLabels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovVirtualService(uint64(len(k))) + 1 + len(v) + sovVirtualService(uint64(len(v))) - n += mapEntrySize + 1 + sovVirtualService(uint64(mapEntrySize)) - } - } - if len(m.Gateways) > 0 { - for _, s := range m.Gateways { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.QueryParams) > 0 { - for k, v := range m.QueryParams { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovVirtualService(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovVirtualService(uint64(len(k))) + l - n += mapEntrySize + 1 + sovVirtualService(uint64(mapEntrySize)) - } - } - if m.IgnoreUriCase { - n += 2 - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HTTPRouteDestination) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Destination != nil { - l = m.Destination.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Weight != 0 { - n += 1 + sovVirtualService(uint64(m.Weight)) - } - if m.Headers != nil { - l = m.Headers.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RouteDestination) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Destination != nil { - l = m.Destination.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Weight != 0 { - n += 1 + sovVirtualService(uint64(m.Weight)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *L4MatchAttributes) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DestinationSubnets) > 0 { - for _, s := range m.DestinationSubnets { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if m.Port != 0 { - n += 1 + sovVirtualService(uint64(m.Port)) - } - l = len(m.SourceSubnet) - if l > 0 { - n += 1 + l + sovVirtualService(uint64(l)) - } - if len(m.SourceLabels) > 0 { - for k, v := range m.SourceLabels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovVirtualService(uint64(len(k))) + 1 + len(v) + sovVirtualService(uint64(len(v))) - n += mapEntrySize + 1 + sovVirtualService(uint64(mapEntrySize)) - } - } - if len(m.Gateways) > 0 { - for _, s := range m.Gateways { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TLSMatchAttributes) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SniHosts) > 0 { - for _, s := range m.SniHosts { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.DestinationSubnets) > 0 { - for _, s := range m.DestinationSubnets { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if m.Port != 0 { - n += 1 + sovVirtualService(uint64(m.Port)) - } - if len(m.SourceLabels) > 0 { - for k, v := range m.SourceLabels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovVirtualService(uint64(len(k))) + 1 + len(v) + sovVirtualService(uint64(len(v))) - n += mapEntrySize + 1 + sovVirtualService(uint64(mapEntrySize)) - } - } - if len(m.Gateways) > 0 { - for _, s := range m.Gateways { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HTTPRedirect) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Uri) - if l > 0 { - n += 1 + l + sovVirtualService(uint64(l)) - } - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.RedirectCode != 0 { - n += 1 + sovVirtualService(uint64(m.RedirectCode)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HTTPRewrite) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Uri) - if l > 0 { - n += 1 + l + sovVirtualService(uint64(l)) - } - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StringMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MatchType != nil { - n += m.MatchType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StringMatch_Exact) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Exact) - n += 1 + l + sovVirtualService(uint64(l)) - return n -} -func (m *StringMatch_Prefix) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Prefix) - n += 1 + l + sovVirtualService(uint64(l)) - return n -} -func (m *StringMatch_Regex) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Regex) - n += 1 + l + sovVirtualService(uint64(l)) - return n -} -func (m *HTTPRetry) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Attempts != 0 { - n += 1 + sovVirtualService(uint64(m.Attempts)) - } - if m.PerTryTimeout != nil { - l = m.PerTryTimeout.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - l = len(m.RetryOn) - if l > 0 { - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CorsPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AllowOrigin) > 0 { - for _, s := range m.AllowOrigin { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.AllowMethods) > 0 { - for _, s := range m.AllowMethods { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.AllowHeaders) > 0 { - for _, s := range m.AllowHeaders { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if len(m.ExposeHeaders) > 0 { - for _, s := range m.ExposeHeaders { - l = len(s) - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if m.MaxAge != nil { - l = m.MaxAge.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.AllowCredentials != nil { - l = m.AllowCredentials.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if len(m.AllowOrigins) > 0 { - for _, e := range m.AllowOrigins { - l = e.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HTTPFaultInjection) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Delay != nil { - l = m.Delay.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.Abort != nil { - l = m.Abort.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HTTPFaultInjection_Delay) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Percent != 0 { - n += 1 + sovVirtualService(uint64(m.Percent)) - } - if m.HttpDelayType != nil { - n += m.HttpDelayType.Size() - } - if m.Percentage != nil { - l = m.Percentage.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HTTPFaultInjection_Delay_FixedDelay) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FixedDelay != nil { - l = m.FixedDelay.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - return n -} -func (m *HTTPFaultInjection_Delay_ExponentialDelay) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ExponentialDelay != nil { - l = m.ExponentialDelay.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - return n -} -func (m *HTTPFaultInjection_Abort) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ErrorType != nil { - n += m.ErrorType.Size() - } - if m.Percentage != nil { - l = m.Percentage.Size() - n += 1 + l + sovVirtualService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HTTPFaultInjection_Abort_HttpStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovVirtualService(uint64(m.HttpStatus)) - return n -} -func (m *HTTPFaultInjection_Abort_GrpcStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.GrpcStatus) - n += 1 + l + sovVirtualService(uint64(l)) - return n -} -func (m *HTTPFaultInjection_Abort_Http2Error) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Http2Error) - n += 1 + l + sovVirtualService(uint64(l)) - return n -} -func (m *PortSelector) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Number != 0 { - n += 1 + sovVirtualService(uint64(m.Number)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Percent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != 0 { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovVirtualService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozVirtualService(x uint64) (n int) { - return sovVirtualService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *VirtualService) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VirtualService: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VirtualService: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Gateways = append(m.Gateways, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Http = append(m.Http, &HTTPRoute{}) - if err := m.Http[len(m.Http)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tcp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tcp = append(m.Tcp, &TCPRoute{}) - if err := m.Tcp[len(m.Tcp)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tls", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tls = append(m.Tls, &TLSRoute{}) - if err := m.Tls[len(m.Tls)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExportTo", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExportTo = append(m.ExportTo, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Destination) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Destination: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Destination: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subset", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subset = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Port == nil { - m.Port = &PortSelector{} - } - if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HTTPRoute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HTTPRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HTTPRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Match", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Match = append(m.Match, &HTTPMatchRequest{}) - if err := m.Match[len(m.Match)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Route = append(m.Route, &HTTPRouteDestination{}) - if err := m.Route[len(m.Route)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Redirect", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Redirect == nil { - m.Redirect = &HTTPRedirect{} - } - if err := m.Redirect.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rewrite", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Rewrite == nil { - m.Rewrite = &HTTPRewrite{} - } - if err := m.Rewrite.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Timeout == nil { - m.Timeout = &types.Duration{} - } - if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Retries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Retries == nil { - m.Retries = &HTTPRetry{} - } - if err := m.Retries.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fault", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fault == nil { - m.Fault = &HTTPFaultInjection{} - } - if err := m.Fault.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mirror", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Mirror == nil { - m.Mirror = &Destination{} - } - if err := m.Mirror.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CorsPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CorsPolicy == nil { - m.CorsPolicy = &CorsPolicy{} - } - if err := m.CorsPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Headers == nil { - m.Headers = &Headers{} - } - if err := m.Headers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MirrorPercent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MirrorPercent == nil { - m.MirrorPercent = &types.UInt32Value{} - } - if err := m.MirrorPercent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MirrorPercentage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MirrorPercentage == nil { - m.MirrorPercentage = &Percent{} - } - if err := m.MirrorPercentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Headers) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Headers: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Headers: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Request == nil { - m.Request = &Headers_HeaderOperations{} - } - if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Response == nil { - m.Response = &Headers_HeaderOperations{} - } - if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Headers_HeaderOperations) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeaderOperations: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeaderOperations: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Set == nil { - m.Set = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthVirtualService - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthVirtualService - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthVirtualService - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthVirtualService - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Set[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Add", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Add == nil { - m.Add = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthVirtualService - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthVirtualService - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthVirtualService - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthVirtualService - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Add[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Remove", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Remove = append(m.Remove, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TLSRoute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TLSRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TLSRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Match", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Match = append(m.Match, &TLSMatchAttributes{}) - if err := m.Match[len(m.Match)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Route = append(m.Route, &RouteDestination{}) - if err := m.Route[len(m.Route)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TCPRoute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TCPRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TCPRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Match", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Match = append(m.Match, &L4MatchAttributes{}) - if err := m.Match[len(m.Match)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Route = append(m.Route, &RouteDestination{}) - if err := m.Route[len(m.Route)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HTTPMatchRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HTTPMatchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HTTPMatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Uri == nil { - m.Uri = &StringMatch{} - } - if err := m.Uri.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scheme", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Scheme == nil { - m.Scheme = &StringMatch{} - } - if err := m.Scheme.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Method == nil { - m.Method = &StringMatch{} - } - if err := m.Method.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Authority == nil { - m.Authority = &StringMatch{} - } - if err := m.Authority.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Headers == nil { - m.Headers = make(map[string]*StringMatch) - } - var mapkey string - var mapvalue *StringMatch - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthVirtualService - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthVirtualService - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthVirtualService - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &StringMatch{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Headers[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceLabels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourceLabels == nil { - m.SourceLabels = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthVirtualService - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthVirtualService - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthVirtualService - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthVirtualService - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.SourceLabels[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Gateways = append(m.Gateways, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.QueryParams == nil { - m.QueryParams = make(map[string]*StringMatch) - } - var mapkey string - var mapvalue *StringMatch - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthVirtualService - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthVirtualService - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthVirtualService - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &StringMatch{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.QueryParams[mapkey] = mapvalue - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IgnoreUriCase", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IgnoreUriCase = bool(v != 0) - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HTTPRouteDestination) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HTTPRouteDestination: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HTTPRouteDestination: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Destination == nil { - m.Destination = &Destination{} - } - if err := m.Destination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) - } - m.Weight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Weight |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Headers == nil { - m.Headers = &Headers{} - } - if err := m.Headers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteDestination) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteDestination: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteDestination: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Destination == nil { - m.Destination = &Destination{} - } - if err := m.Destination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) - } - m.Weight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Weight |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *L4MatchAttributes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: L4MatchAttributes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: L4MatchAttributes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationSubnets", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationSubnets = append(m.DestinationSubnets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceSubnet", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SourceSubnet = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceLabels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourceLabels == nil { - m.SourceLabels = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthVirtualService - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthVirtualService - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthVirtualService - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthVirtualService - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.SourceLabels[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Gateways = append(m.Gateways, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TLSMatchAttributes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TLSMatchAttributes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TLSMatchAttributes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SniHosts", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SniHosts = append(m.SniHosts, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationSubnets", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationSubnets = append(m.DestinationSubnets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceLabels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourceLabels == nil { - m.SourceLabels = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthVirtualService - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthVirtualService - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthVirtualService - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthVirtualService - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.SourceLabels[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Gateways = append(m.Gateways, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HTTPRedirect) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HTTPRedirect: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HTTPRedirect: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Uri = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RedirectCode", wireType) - } - m.RedirectCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RedirectCode |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HTTPRewrite) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HTTPRewrite: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HTTPRewrite: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Uri = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StringMatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StringMatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StringMatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exact", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MatchType = &StringMatch_Exact{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MatchType = &StringMatch_Prefix{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Regex", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MatchType = &StringMatch_Regex{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HTTPRetry) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HTTPRetry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HTTPRetry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Attempts", wireType) - } - m.Attempts = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Attempts |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PerTryTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PerTryTimeout == nil { - m.PerTryTimeout = &types.Duration{} - } - if err := m.PerTryTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryOn", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetryOn = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CorsPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CorsPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CorsPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowOrigin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowOrigin = append(m.AllowOrigin, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowMethods", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowMethods = append(m.AllowMethods, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowHeaders", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowHeaders = append(m.AllowHeaders, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExposeHeaders", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExposeHeaders = append(m.ExposeHeaders, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxAge", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxAge == nil { - m.MaxAge = &types.Duration{} - } - if err := m.MaxAge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowCredentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AllowCredentials == nil { - m.AllowCredentials = &types.BoolValue{} - } - if err := m.AllowCredentials.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowOrigins", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowOrigins = append(m.AllowOrigins, &StringMatch{}) - if err := m.AllowOrigins[len(m.AllowOrigins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HTTPFaultInjection) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HTTPFaultInjection: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HTTPFaultInjection: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delay", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Delay == nil { - m.Delay = &HTTPFaultInjection_Delay{} - } - if err := m.Delay.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Abort", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Abort == nil { - m.Abort = &HTTPFaultInjection_Abort{} - } - if err := m.Abort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HTTPFaultInjection_Delay) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Delay: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Delay: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Percent", wireType) - } - m.Percent = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Percent |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FixedDelay", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Duration{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.HttpDelayType = &HTTPFaultInjection_Delay_FixedDelay{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExponentialDelay", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Duration{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.HttpDelayType = &HTTPFaultInjection_Delay_ExponentialDelay{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Percentage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Percentage == nil { - m.Percentage = &Percent{} - } - if err := m.Percentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HTTPFaultInjection_Abort) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Abort: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Abort: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HttpStatus", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ErrorType = &HTTPFaultInjection_Abort_HttpStatus{v} - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrpcStatus", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorType = &HTTPFaultInjection_Abort_GrpcStatus{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Http2Error", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorType = &HTTPFaultInjection_Abort_Http2Error{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Percentage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthVirtualService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthVirtualService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Percentage == nil { - m.Percentage = &Percent{} - } - if err := m.Percentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PortSelector) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PortSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PortSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - m.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Number |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Percent) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowVirtualService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Percent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Percent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipVirtualService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthVirtualService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipVirtualService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVirtualService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVirtualService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVirtualService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthVirtualService - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthVirtualService - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVirtualService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipVirtualService(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthVirtualService - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthVirtualService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowVirtualService = fmt.Errorf("proto: integer overflow") -) diff --git a/pkg/inject/api/networking/v1alpha3/virtual_service_deepcopy.gen.go b/pkg/inject/api/networking/v1alpha3/virtual_service_deepcopy.gen.go deleted file mode 100644 index 639a3175..00000000 --- a/pkg/inject/api/networking/v1alpha3/virtual_service_deepcopy.gen.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networking/v1alpha3/virtual_service.proto - -// Configuration affecting traffic routing. Here are a few terms useful to define -// in the context of traffic routing. -// -// `Service` a unit of application behavior bound to a unique name in a -// service registry. Services consist of multiple network *endpoints* -// implemented by workload instances running on pods, containers, VMs etc. -// -// `Service versions (a.k.a. subsets)` - In a continuous deployment -// scenario, for a given service, there can be distinct subsets of -// instances running different variants of the application binary. These -// variants are not necessarily different API versions. They could be -// iterative changes to the same service, deployed in different -// environments (prod, staging, dev, etc.). Common scenarios where this -// occurs include A/B testing, canary rollouts, etc. The choice of a -// particular version can be decided based on various criterion (headers, -// url, etc.) and/or by weights assigned to each version. Each service has -// a default version consisting of all its instances. -// -// `Source` - A downstream client calling a service. -// -// `Host` - The address used by a client when attempting to connect to a -// service. -// -// `Access model` - Applications address only the destination service -// (Host) without knowledge of individual service versions (subsets). The -// actual choice of the version is determined by the proxy/sidecar, enabling the -// application code to decouple itself from the evolution of dependent -// services. -// -// A `VirtualService` defines a set of traffic routing rules to apply when a host is -// addressed. Each routing rule defines matching criteria for traffic of a specific -// protocol. If the traffic is matched, then it is sent to a named destination service -// (or subset/version of it) defined in the registry. -// -// The source of traffic can also be matched in a routing rule. This allows routing -// to be customized for specific client contexts. -// -// The following example on Kubernetes, routes all HTTP traffic by default to -// pods of the reviews service with label "version: v1". In addition, -// HTTP requests with path starting with /wpcatalog/ or /consumercatalog/ will -// be rewritten to /newcatalog and sent to pods with label "version: v2". -// -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: reviews-route -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// http: -// - name: "reviews-v2-routes" -// match: -// - uri: -// prefix: "/wpcatalog" -// - uri: -// prefix: "/consumercatalog" -// rewrite: -// uri: "/newcatalog" -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v2 -// - name: "reviews-v1-route" -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v1 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: reviews-route -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// http: -// - name: "reviews-v2-routes" -// match: -// - uri: -// prefix: "/wpcatalog" -// - uri: -// prefix: "/consumercatalog" -// rewrite: -// uri: "/newcatalog" -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v2 -// - name: "reviews-v1-route" -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v1 -// ``` -// {{}} -// {{}} -// -// A subset/version of a route destination is identified with a reference -// to a named service subset which must be declared in a corresponding -// `DestinationRule`. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: reviews-destination -// spec: -// host: reviews.prod.svc.cluster.local -// subsets: -// - name: v1 -// labels: -// version: v1 -// - name: v2 -// labels: -// version: v2 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: reviews-destination -// spec: -// host: reviews.prod.svc.cluster.local -// subsets: -// - name: v1 -// labels: -// version: v1 -// - name: v2 -// labels: -// version: v2 -// ``` -// {{}} -// {{}} -// - -package v1alpha3 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - _ "github.com/polarismesh/polaris-controller/pkg/inject/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// DeepCopyInto supports using VirtualService within kubernetes types, where deepcopy-gen is used. -func (in *VirtualService) DeepCopyInto(out *VirtualService) { - p := proto.Clone(in).(*VirtualService) - *out = *p -} diff --git a/pkg/inject/api/networking/v1alpha3/virtual_service_json.gen.go b/pkg/inject/api/networking/v1alpha3/virtual_service_json.gen.go deleted file mode 100644 index 535e46e3..00000000 --- a/pkg/inject/api/networking/v1alpha3/virtual_service_json.gen.go +++ /dev/null @@ -1,414 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networking/v1alpha3/virtual_service.proto - -// Configuration affecting traffic routing. Here are a few terms useful to define -// in the context of traffic routing. -// -// `Service` a unit of application behavior bound to a unique name in a -// service registry. Services consist of multiple network *endpoints* -// implemented by workload instances running on pods, containers, VMs etc. -// -// `Service versions (a.k.a. subsets)` - In a continuous deployment -// scenario, for a given service, there can be distinct subsets of -// instances running different variants of the application binary. These -// variants are not necessarily different API versions. They could be -// iterative changes to the same service, deployed in different -// environments (prod, staging, dev, etc.). Common scenarios where this -// occurs include A/B testing, canary rollouts, etc. The choice of a -// particular version can be decided based on various criterion (headers, -// url, etc.) and/or by weights assigned to each version. Each service has -// a default version consisting of all its instances. -// -// `Source` - A downstream client calling a service. -// -// `Host` - The address used by a client when attempting to connect to a -// service. -// -// `Access model` - Applications address only the destination service -// (Host) without knowledge of individual service versions (subsets). The -// actual choice of the version is determined by the proxy/sidecar, enabling the -// application code to decouple itself from the evolution of dependent -// services. -// -// A `VirtualService` defines a set of traffic routing rules to apply when a host is -// addressed. Each routing rule defines matching criteria for traffic of a specific -// protocol. If the traffic is matched, then it is sent to a named destination service -// (or subset/version of it) defined in the registry. -// -// The source of traffic can also be matched in a routing rule. This allows routing -// to be customized for specific client contexts. -// -// The following example on Kubernetes, routes all HTTP traffic by default to -// pods of the reviews service with label "version: v1". In addition, -// HTTP requests with path starting with /wpcatalog/ or /consumercatalog/ will -// be rewritten to /newcatalog and sent to pods with label "version: v2". -// -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: VirtualService -// metadata: -// name: reviews-route -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// http: -// - name: "reviews-v2-routes" -// match: -// - uri: -// prefix: "/wpcatalog" -// - uri: -// prefix: "/consumercatalog" -// rewrite: -// uri: "/newcatalog" -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v2 -// - name: "reviews-v1-route" -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v1 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: VirtualService -// metadata: -// name: reviews-route -// spec: -// hosts: -// - reviews.prod.svc.cluster.local -// http: -// - name: "reviews-v2-routes" -// match: -// - uri: -// prefix: "/wpcatalog" -// - uri: -// prefix: "/consumercatalog" -// rewrite: -// uri: "/newcatalog" -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v2 -// - name: "reviews-v1-route" -// route: -// - destination: -// host: reviews.prod.svc.cluster.local -// subset: v1 -// ``` -// {{}} -// {{}} -// -// A subset/version of a route destination is identified with a reference -// to a named service subset which must be declared in a corresponding -// `DestinationRule`. -// -// {{}} -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1alpha3 -// kind: DestinationRule -// metadata: -// name: reviews-destination -// spec: -// host: reviews.prod.svc.cluster.local -// subsets: -// - name: v1 -// labels: -// version: v1 -// - name: v2 -// labels: -// version: v2 -// ``` -// {{}} -// -// {{}} -// ```yaml -// apiVersion: networking.istio.io/v1beta1 -// kind: DestinationRule -// metadata: -// name: reviews-destination -// spec: -// host: reviews.prod.svc.cluster.local -// subsets: -// - name: v1 -// labels: -// version: v1 -// - name: v2 -// labels: -// version: v2 -// ``` -// {{}} -// {{}} -// - -package v1alpha3 - -import ( - bytes "bytes" - fmt "fmt" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - _ "github.com/polarismesh/polaris-controller/pkg/inject/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// MarshalJSON is a custom marshaler for VirtualService -func (this *VirtualService) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for VirtualService -func (this *VirtualService) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Destination -func (this *Destination) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Destination -func (this *Destination) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for HTTPRoute -func (this *HTTPRoute) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for HTTPRoute -func (this *HTTPRoute) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Headers -func (this *Headers) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Headers -func (this *Headers) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Headers_HeaderOperations -func (this *Headers_HeaderOperations) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Headers_HeaderOperations -func (this *Headers_HeaderOperations) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for TLSRoute -func (this *TLSRoute) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for TLSRoute -func (this *TLSRoute) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for TCPRoute -func (this *TCPRoute) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for TCPRoute -func (this *TCPRoute) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for HTTPMatchRequest -func (this *HTTPMatchRequest) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for HTTPMatchRequest -func (this *HTTPMatchRequest) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for HTTPRouteDestination -func (this *HTTPRouteDestination) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for HTTPRouteDestination -func (this *HTTPRouteDestination) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for RouteDestination -func (this *RouteDestination) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for RouteDestination -func (this *RouteDestination) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for L4MatchAttributes -func (this *L4MatchAttributes) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for L4MatchAttributes -func (this *L4MatchAttributes) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for TLSMatchAttributes -func (this *TLSMatchAttributes) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for TLSMatchAttributes -func (this *TLSMatchAttributes) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for HTTPRedirect -func (this *HTTPRedirect) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for HTTPRedirect -func (this *HTTPRedirect) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for HTTPRewrite -func (this *HTTPRewrite) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for HTTPRewrite -func (this *HTTPRewrite) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for StringMatch -func (this *StringMatch) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for StringMatch -func (this *StringMatch) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for HTTPRetry -func (this *HTTPRetry) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for HTTPRetry -func (this *HTTPRetry) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for CorsPolicy -func (this *CorsPolicy) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for CorsPolicy -func (this *CorsPolicy) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for HTTPFaultInjection -func (this *HTTPFaultInjection) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for HTTPFaultInjection -func (this *HTTPFaultInjection) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for HTTPFaultInjection_Delay -func (this *HTTPFaultInjection_Delay) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for HTTPFaultInjection_Delay -func (this *HTTPFaultInjection_Delay) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for HTTPFaultInjection_Abort -func (this *HTTPFaultInjection_Abort) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for HTTPFaultInjection_Abort -func (this *HTTPFaultInjection_Abort) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for PortSelector -func (this *PortSelector) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for PortSelector -func (this *PortSelector) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Percent -func (this *Percent) MarshalJSON() ([]byte, error) { - str, err := VirtualServiceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Percent -func (this *Percent) UnmarshalJSON(b []byte) error { - return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -var ( - VirtualServiceMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{} - VirtualServiceUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{} -) diff --git a/pkg/inject/googleapis/LICENSE b/pkg/inject/googleapis/LICENSE deleted file mode 100644 index 56e48aa3..00000000 --- a/pkg/inject/googleapis/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016-2020 Istio Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/pkg/inject/googleapis/google/api/annotations.pb.go b/pkg/inject/googleapis/google/api/annotations.pb.go deleted file mode 100644 index bf55829c..00000000 --- a/pkg/inject/googleapis/google/api/annotations.pb.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/api/annotations.proto - -package google_api - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -var E_Http = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MethodOptions)(nil), - ExtensionType: (*HttpRule)(nil), - Field: 72295728, - Name: "google.api.http", - Tag: "bytes,72295728,opt,name=http", - Filename: "google/api/annotations.proto", -} - -func init() { - proto.RegisterExtension(E_Http) -} - -func init() { proto.RegisterFile("google/api/annotations.proto", fileDescriptor_c591c5aa9fb79aab) } - -var fileDescriptor_c591c5aa9fb79aab = []byte{ - // 232 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, - 0xcf, 0x2b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0xc8, 0xea, 0x25, 0x16, 0x64, - 0x4a, 0x89, 0x22, 0xa9, 0xcc, 0x28, 0x29, 0x29, 0x80, 0x28, 0x91, 0x52, 0x80, 0x0a, 0x83, 0x79, - 0x49, 0xa5, 0x69, 0xfa, 0x29, 0xa9, 0xc5, 0xc9, 0x45, 0x99, 0x05, 0x25, 0xf9, 0x45, 0x10, 0x15, - 0x56, 0xde, 0x5c, 0x2c, 0x20, 0xf5, 0x42, 0x72, 0x7a, 0x50, 0xd3, 0x60, 0x4a, 0xf5, 0x7c, 0x53, - 0x4b, 0x32, 0xf2, 0x53, 0xfc, 0x0b, 0xc0, 0x56, 0x4a, 0x6c, 0x38, 0xb5, 0x47, 0x49, 0x81, 0x51, - 0x83, 0xdb, 0x48, 0x44, 0x0f, 0x61, 0xad, 0x9e, 0x47, 0x49, 0x49, 0x41, 0x50, 0x69, 0x4e, 0x6a, - 0x10, 0xd8, 0x10, 0xa7, 0xf8, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, 0xf0, 0x50, - 0x8e, 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, - 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8b, 0x47, 0x72, 0x0c, 0x1f, 0x1e, 0xc9, 0x31, 0x4e, - 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x5c, 0x7c, 0xc9, 0xf9, - 0xb9, 0x48, 0x86, 0x3a, 0x09, 0x38, 0x22, 0xbc, 0x1a, 0x00, 0x72, 0x4d, 0x00, 0xe3, 0x22, 0x26, - 0x16, 0x77, 0xc7, 0x00, 0xcf, 0x24, 0x36, 0xb0, 0xeb, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x5b, 0x05, 0x38, 0x7d, 0x19, 0x01, 0x00, 0x00, -} diff --git a/pkg/inject/googleapis/google/api/field_behavior.pb.go b/pkg/inject/googleapis/google/api/field_behavior.pb.go deleted file mode 100644 index e6320772..00000000 --- a/pkg/inject/googleapis/google/api/field_behavior.pb.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/api/field_behavior.proto - -package google_api - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - math "math" - strconv "strconv" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -type FieldBehavior int32 - -const ( - // Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED FieldBehavior = 0 - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - OPTIONAL FieldBehavior = 1 - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED FieldBehavior = 2 - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY FieldBehavior = 3 - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - INPUT_ONLY FieldBehavior = 4 - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - IMMUTABLE FieldBehavior = 5 -) - -var FieldBehavior_name = map[int32]string{ - 0: "FIELD_BEHAVIOR_UNSPECIFIED", - 1: "OPTIONAL", - 2: "REQUIRED", - 3: "OUTPUT_ONLY", - 4: "INPUT_ONLY", - 5: "IMMUTABLE", -} - -var FieldBehavior_value = map[string]int32{ - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, -} - -func (FieldBehavior) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_4648f18fd5079967, []int{0} -} - -var E_FieldBehavior = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: ([]FieldBehavior)(nil), - Field: 1052, - Name: "google.api.field_behavior", - Tag: "varint,1052,rep,name=field_behavior,enum=google.api.FieldBehavior", - Filename: "google/api/field_behavior.proto", -} - -func init() { - proto.RegisterEnum("google.api.FieldBehavior", FieldBehavior_name, FieldBehavior_value) - proto.RegisterExtension(E_FieldBehavior) -} - -func init() { proto.RegisterFile("google/api/field_behavior.proto", fileDescriptor_4648f18fd5079967) } - -var fileDescriptor_4648f18fd5079967 = []byte{ - // 325 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0x4f, 0xcb, 0x4c, 0xcd, 0x49, 0x89, 0x4f, 0x4a, 0xcd, - 0x48, 0x2c, 0xcb, 0xcc, 0x2f, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x28, 0xd0, - 0x4b, 0x2c, 0xc8, 0x94, 0x52, 0x80, 0x2a, 0x06, 0xcb, 0x24, 0x95, 0xa6, 0xe9, 0xa7, 0xa4, 0x16, - 0x27, 0x17, 0x65, 0x16, 0x94, 0xc0, 0x54, 0x6b, 0x55, 0x73, 0xf1, 0xba, 0x81, 0x4c, 0x71, 0x82, - 0x1a, 0x22, 0x24, 0xc7, 0x25, 0xe5, 0xe6, 0xe9, 0xea, 0xe3, 0x12, 0xef, 0xe4, 0xea, 0xe1, 0x18, - 0xe6, 0xe9, 0x1f, 0x14, 0x1f, 0xea, 0x17, 0x1c, 0xe0, 0xea, 0xec, 0xe9, 0xe6, 0xe9, 0xea, 0x22, - 0xc0, 0x20, 0xc4, 0xc3, 0xc5, 0xe1, 0x1f, 0x10, 0xe2, 0xe9, 0xef, 0xe7, 0xe8, 0x23, 0xc0, 0x08, - 0xe2, 0x05, 0xb9, 0x06, 0x86, 0x7a, 0x06, 0xb9, 0xba, 0x08, 0x30, 0x09, 0xf1, 0x73, 0x71, 0xfb, - 0x87, 0x86, 0x04, 0x84, 0x86, 0xc4, 0xfb, 0xfb, 0xf9, 0x44, 0x0a, 0x30, 0x0b, 0xf1, 0x71, 0x71, - 0x79, 0xfa, 0xc1, 0xf9, 0x2c, 0x42, 0xbc, 0x5c, 0x9c, 0x9e, 0xbe, 0xbe, 0xa1, 0x21, 0x8e, 0x4e, - 0x3e, 0xae, 0x02, 0xac, 0x56, 0x09, 0x5c, 0x7c, 0xa8, 0x5e, 0x10, 0x92, 0xd5, 0x83, 0xba, 0x1e, - 0xe6, 0x62, 0x3d, 0xb0, 0xeb, 0xfc, 0x0b, 0x4a, 0x32, 0xf3, 0xf3, 0x8a, 0x25, 0xe6, 0x70, 0x28, - 0x30, 0x6b, 0xf0, 0x19, 0x49, 0xea, 0x21, 0xfc, 0xa8, 0x87, 0xe2, 0xfc, 0x20, 0xde, 0x34, 0x64, - 0xae, 0x53, 0xe2, 0x85, 0x87, 0x72, 0x0c, 0x37, 0x1e, 0xca, 0x31, 0x7c, 0x78, 0x28, 0xc7, 0xd8, - 0xf0, 0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, - 0x7c, 0xf0, 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, - 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x06, 0x2e, 0xbe, 0xe4, 0xfc, 0x5c, 0x24, - 0x2b, 0x9c, 0x84, 0x50, 0xec, 0x08, 0x00, 0x39, 0x2d, 0x80, 0x71, 0x11, 0x13, 0x8b, 0xbb, 0x63, - 0x80, 0x67, 0x12, 0x1b, 0xd8, 0xa9, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x72, 0x37, - 0xaf, 0x99, 0x01, 0x00, 0x00, -} - -func (x FieldBehavior) String() string { - s, ok := FieldBehavior_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} diff --git a/pkg/inject/googleapis/google/api/http.pb.go b/pkg/inject/googleapis/google/api/http.pb.go deleted file mode 100644 index 436af02d..00000000 --- a/pkg/inject/googleapis/google/api/http.pb.go +++ /dev/null @@ -1,2197 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/api/http.proto - -package google_api - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -type Http struct { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*HttpRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - FullyDecodeReservedExpansion bool `protobuf:"varint,2,opt,name=fully_decode_reserved_expansion,json=fullyDecodeReservedExpansion,proto3" json:"fully_decode_reserved_expansion,omitempty"` -} - -func (m *Http) Reset() { *m = Http{} } -func (*Http) ProtoMessage() {} -func (*Http) Descriptor() ([]byte, []int) { - return fileDescriptor_ff9994be407cdcc9, []int{0} -} -func (m *Http) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Http) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Http.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Http) XXX_Merge(src proto.Message) { - xxx_messageInfo_Http.Merge(m, src) -} -func (m *Http) XXX_Size() int { - return m.Size() -} -func (m *Http) XXX_DiscardUnknown() { - xxx_messageInfo_Http.DiscardUnknown(m) -} - -var xxx_messageInfo_Http proto.InternalMessageInfo - -func (m *Http) GetRules() []*HttpRule { - if m != nil { - return m.Rules - } - return nil -} - -func (m *Http) GetFullyDecodeReservedExpansion() bool { - if m != nil { - return m.FullyDecodeReservedExpansion - } - return false -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -type HttpRule struct { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - // - // Types that are valid to be assigned to Pattern: - // *HttpRule_Get - // *HttpRule_Put - // *HttpRule_Post - // *HttpRule_Delete - // *HttpRule_Patch - // *HttpRule_Custom - Pattern isHttpRule_Pattern `protobuf_oneof:"pattern"` - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - ResponseBody string `protobuf:"bytes,12,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"` - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - AdditionalBindings []*HttpRule `protobuf:"bytes,11,rep,name=additional_bindings,json=additionalBindings,proto3" json:"additional_bindings,omitempty"` -} - -func (m *HttpRule) Reset() { *m = HttpRule{} } -func (*HttpRule) ProtoMessage() {} -func (*HttpRule) Descriptor() ([]byte, []int) { - return fileDescriptor_ff9994be407cdcc9, []int{1} -} -func (m *HttpRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HttpRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HttpRule.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HttpRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_HttpRule.Merge(m, src) -} -func (m *HttpRule) XXX_Size() int { - return m.Size() -} -func (m *HttpRule) XXX_DiscardUnknown() { - xxx_messageInfo_HttpRule.DiscardUnknown(m) -} - -var xxx_messageInfo_HttpRule proto.InternalMessageInfo - -type isHttpRule_Pattern interface { - isHttpRule_Pattern() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type HttpRule_Get struct { - Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"` -} -type HttpRule_Put struct { - Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"` -} -type HttpRule_Post struct { - Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"` -} -type HttpRule_Delete struct { - Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"` -} -type HttpRule_Patch struct { - Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"` -} -type HttpRule_Custom struct { - Custom *CustomHttpPattern `protobuf:"bytes,8,opt,name=custom,proto3,oneof"` -} - -func (*HttpRule_Get) isHttpRule_Pattern() {} -func (*HttpRule_Put) isHttpRule_Pattern() {} -func (*HttpRule_Post) isHttpRule_Pattern() {} -func (*HttpRule_Delete) isHttpRule_Pattern() {} -func (*HttpRule_Patch) isHttpRule_Pattern() {} -func (*HttpRule_Custom) isHttpRule_Pattern() {} - -func (m *HttpRule) GetPattern() isHttpRule_Pattern { - if m != nil { - return m.Pattern - } - return nil -} - -func (m *HttpRule) GetSelector() string { - if m != nil { - return m.Selector - } - return "" -} - -func (m *HttpRule) GetGet() string { - if x, ok := m.GetPattern().(*HttpRule_Get); ok { - return x.Get - } - return "" -} - -func (m *HttpRule) GetPut() string { - if x, ok := m.GetPattern().(*HttpRule_Put); ok { - return x.Put - } - return "" -} - -func (m *HttpRule) GetPost() string { - if x, ok := m.GetPattern().(*HttpRule_Post); ok { - return x.Post - } - return "" -} - -func (m *HttpRule) GetDelete() string { - if x, ok := m.GetPattern().(*HttpRule_Delete); ok { - return x.Delete - } - return "" -} - -func (m *HttpRule) GetPatch() string { - if x, ok := m.GetPattern().(*HttpRule_Patch); ok { - return x.Patch - } - return "" -} - -func (m *HttpRule) GetCustom() *CustomHttpPattern { - if x, ok := m.GetPattern().(*HttpRule_Custom); ok { - return x.Custom - } - return nil -} - -func (m *HttpRule) GetBody() string { - if m != nil { - return m.Body - } - return "" -} - -func (m *HttpRule) GetResponseBody() string { - if m != nil { - return m.ResponseBody - } - return "" -} - -func (m *HttpRule) GetAdditionalBindings() []*HttpRule { - if m != nil { - return m.AdditionalBindings - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*HttpRule) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*HttpRule_Get)(nil), - (*HttpRule_Put)(nil), - (*HttpRule_Post)(nil), - (*HttpRule_Delete)(nil), - (*HttpRule_Patch)(nil), - (*HttpRule_Custom)(nil), - } -} - -// A custom pattern is used for defining custom HTTP verb. -type CustomHttpPattern struct { - // The name of this custom HTTP verb. - Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` - // The path matched by this custom verb. - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` -} - -func (m *CustomHttpPattern) Reset() { *m = CustomHttpPattern{} } -func (*CustomHttpPattern) ProtoMessage() {} -func (*CustomHttpPattern) Descriptor() ([]byte, []int) { - return fileDescriptor_ff9994be407cdcc9, []int{2} -} -func (m *CustomHttpPattern) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomHttpPattern) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CustomHttpPattern.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CustomHttpPattern) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomHttpPattern.Merge(m, src) -} -func (m *CustomHttpPattern) XXX_Size() int { - return m.Size() -} -func (m *CustomHttpPattern) XXX_DiscardUnknown() { - xxx_messageInfo_CustomHttpPattern.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomHttpPattern proto.InternalMessageInfo - -func (m *CustomHttpPattern) GetKind() string { - if m != nil { - return m.Kind - } - return "" -} - -func (m *CustomHttpPattern) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -func init() { - proto.RegisterType((*Http)(nil), "google.api.Http") - proto.RegisterType((*HttpRule)(nil), "google.api.HttpRule") - proto.RegisterType((*CustomHttpPattern)(nil), "google.api.CustomHttpPattern") -} - -func init() { proto.RegisterFile("google/api/http.proto", fileDescriptor_ff9994be407cdcc9) } - -var fileDescriptor_ff9994be407cdcc9 = []byte{ - // 446 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xb1, 0x8e, 0xd3, 0x40, - 0x10, 0x86, 0xbd, 0x89, 0x93, 0x4b, 0x26, 0x07, 0x12, 0xcb, 0x81, 0x56, 0x08, 0x96, 0x28, 0x34, - 0x11, 0x45, 0x4e, 0x3a, 0x0a, 0x0a, 0x2a, 0x0c, 0x11, 0x47, 0x17, 0xb9, 0xa5, 0xb0, 0x1c, 0x7b, - 0x48, 0x2c, 0x7c, 0xde, 0x95, 0x77, 0x8c, 0x48, 0xc7, 0x23, 0xf0, 0x0c, 0x54, 0x3c, 0x0a, 0x65, - 0xca, 0x13, 0x15, 0x71, 0x1a, 0xca, 0x2b, 0x29, 0xd1, 0xae, 0x1d, 0xee, 0x24, 0x24, 0xba, 0xf9, - 0xff, 0xf9, 0x3c, 0xfe, 0x3d, 0x1e, 0xb8, 0xb7, 0x52, 0x6a, 0x95, 0xe3, 0x69, 0xac, 0xb3, 0xd3, - 0x35, 0x91, 0x9e, 0xe9, 0x52, 0x91, 0xe2, 0xd0, 0xd8, 0xb3, 0x58, 0x67, 0x93, 0x0d, 0xf8, 0xe7, - 0x44, 0x9a, 0x3f, 0x85, 0x5e, 0x59, 0xe5, 0x68, 0x04, 0x1b, 0x77, 0xa7, 0xa3, 0xb3, 0x93, 0xd9, - 0x35, 0x33, 0xb3, 0x40, 0x58, 0xe5, 0x18, 0x36, 0x08, 0x9f, 0xc3, 0xe3, 0xf7, 0x55, 0x9e, 0x6f, - 0xa2, 0x14, 0x13, 0x95, 0x62, 0x54, 0xa2, 0xc1, 0xf2, 0x23, 0xa6, 0x11, 0x7e, 0xd2, 0x71, 0x61, - 0x32, 0x55, 0x88, 0xce, 0x98, 0x4d, 0x07, 0xe1, 0x43, 0x87, 0xbd, 0x76, 0x54, 0xd8, 0x42, 0xf3, - 0x03, 0x33, 0xf9, 0xd1, 0x81, 0xc1, 0x61, 0x34, 0x7f, 0x00, 0x03, 0x83, 0x39, 0x26, 0xa4, 0x4a, - 0xc1, 0xc6, 0x6c, 0x3a, 0x0c, 0xff, 0x6a, 0xce, 0xa1, 0xbb, 0x42, 0x72, 0x33, 0x87, 0xe7, 0x5e, - 0x68, 0x85, 0xf5, 0x74, 0x45, 0xa2, 0x7b, 0xf0, 0x74, 0x45, 0xfc, 0x04, 0x7c, 0xad, 0x0c, 0x09, - 0xbf, 0x35, 0x9d, 0xe2, 0x02, 0xfa, 0x29, 0xe6, 0x48, 0x28, 0x7a, 0xad, 0xdf, 0x6a, 0x7e, 0x1f, - 0x7a, 0x3a, 0xa6, 0x64, 0x2d, 0xfa, 0x6d, 0xa3, 0x91, 0xfc, 0x39, 0xf4, 0x93, 0xca, 0x90, 0xba, - 0x10, 0x83, 0x31, 0x9b, 0x8e, 0xce, 0x1e, 0xdd, 0x5c, 0xc6, 0x2b, 0xd7, 0xb1, 0xb9, 0x17, 0x31, - 0x11, 0x96, 0x85, 0x1d, 0xd8, 0xe0, 0x9c, 0x83, 0xbf, 0x54, 0xe9, 0x46, 0x1c, 0xb9, 0x0f, 0x70, - 0x35, 0x7f, 0x02, 0xb7, 0x4a, 0x34, 0x5a, 0x15, 0x06, 0x23, 0xd7, 0x3c, 0x76, 0xcd, 0xe3, 0x83, - 0x19, 0x58, 0x68, 0x0e, 0x77, 0xe3, 0x34, 0xcd, 0x28, 0x53, 0x45, 0x9c, 0x47, 0xcb, 0xac, 0x48, - 0xb3, 0x62, 0x65, 0xc4, 0xe8, 0x3f, 0xff, 0x82, 0x5f, 0x3f, 0x10, 0xb4, 0x7c, 0x30, 0x84, 0x23, - 0xdd, 0x84, 0x9a, 0xbc, 0x80, 0x3b, 0xff, 0x24, 0xb5, 0xf9, 0x3e, 0x64, 0x45, 0xda, 0x2e, 0xd8, - 0xd5, 0xd6, 0xd3, 0x31, 0xad, 0x9b, 0xed, 0x86, 0xae, 0x0e, 0xde, 0x6d, 0x77, 0xd2, 0xbb, 0xdc, - 0x49, 0xef, 0x6a, 0x27, 0xd9, 0xe7, 0x5a, 0xb2, 0x6f, 0xb5, 0x64, 0xdf, 0x6b, 0xc9, 0xb6, 0xb5, - 0x64, 0x3f, 0x6b, 0xc9, 0x7e, 0xd5, 0xd2, 0xbb, 0xaa, 0x25, 0xfb, 0xb2, 0x97, 0xde, 0x76, 0x2f, - 0xbd, 0xcb, 0xbd, 0xf4, 0xe0, 0x76, 0xa2, 0x2e, 0x6e, 0x44, 0x0d, 0x86, 0xee, 0xd5, 0xf6, 0xe2, - 0x16, 0xec, 0x37, 0x63, 0x5f, 0x3b, 0xfe, 0x9b, 0x97, 0x8b, 0xb7, 0xcb, 0xbe, 0x3b, 0xc2, 0x67, - 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x85, 0x78, 0xc8, 0xab, 0x9d, 0x02, 0x00, 0x00, -} - -func (this *Http) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Http) - if !ok { - that2, ok := that.(Http) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Rules) != len(that1.Rules) { - return false - } - for i := range this.Rules { - if !this.Rules[i].Equal(that1.Rules[i]) { - return false - } - } - if this.FullyDecodeReservedExpansion != that1.FullyDecodeReservedExpansion { - return false - } - return true -} -func (this *HttpRule) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule) - if !ok { - that2, ok := that.(HttpRule) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Selector != that1.Selector { - return false - } - if that1.Pattern == nil { - if this.Pattern != nil { - return false - } - } else if this.Pattern == nil { - return false - } else if !this.Pattern.Equal(that1.Pattern) { - return false - } - if this.Body != that1.Body { - return false - } - if this.ResponseBody != that1.ResponseBody { - return false - } - if len(this.AdditionalBindings) != len(that1.AdditionalBindings) { - return false - } - for i := range this.AdditionalBindings { - if !this.AdditionalBindings[i].Equal(that1.AdditionalBindings[i]) { - return false - } - } - return true -} -func (this *HttpRule_Get) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule_Get) - if !ok { - that2, ok := that.(HttpRule_Get) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Get != that1.Get { - return false - } - return true -} -func (this *HttpRule_Put) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule_Put) - if !ok { - that2, ok := that.(HttpRule_Put) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Put != that1.Put { - return false - } - return true -} -func (this *HttpRule_Post) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule_Post) - if !ok { - that2, ok := that.(HttpRule_Post) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Post != that1.Post { - return false - } - return true -} -func (this *HttpRule_Delete) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule_Delete) - if !ok { - that2, ok := that.(HttpRule_Delete) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Delete != that1.Delete { - return false - } - return true -} -func (this *HttpRule_Patch) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule_Patch) - if !ok { - that2, ok := that.(HttpRule_Patch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Patch != that1.Patch { - return false - } - return true -} -func (this *HttpRule_Custom) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule_Custom) - if !ok { - that2, ok := that.(HttpRule_Custom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Custom.Equal(that1.Custom) { - return false - } - return true -} -func (this *CustomHttpPattern) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CustomHttpPattern) - if !ok { - that2, ok := that.(CustomHttpPattern) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Kind != that1.Kind { - return false - } - if this.Path != that1.Path { - return false - } - return true -} -func (this *Http) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&google_api.Http{") - if this.Rules != nil { - s = append(s, "Rules: "+fmt.Sprintf("%#v", this.Rules)+",\n") - } - s = append(s, "FullyDecodeReservedExpansion: "+fmt.Sprintf("%#v", this.FullyDecodeReservedExpansion)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *HttpRule) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&google_api.HttpRule{") - s = append(s, "Selector: "+fmt.Sprintf("%#v", this.Selector)+",\n") - if this.Pattern != nil { - s = append(s, "Pattern: "+fmt.Sprintf("%#v", this.Pattern)+",\n") - } - s = append(s, "Body: "+fmt.Sprintf("%#v", this.Body)+",\n") - s = append(s, "ResponseBody: "+fmt.Sprintf("%#v", this.ResponseBody)+",\n") - if this.AdditionalBindings != nil { - s = append(s, "AdditionalBindings: "+fmt.Sprintf("%#v", this.AdditionalBindings)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *HttpRule_Get) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&google_api.HttpRule_Get{` + - `Get:` + fmt.Sprintf("%#v", this.Get) + `}`}, ", ") - return s -} -func (this *HttpRule_Put) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&google_api.HttpRule_Put{` + - `Put:` + fmt.Sprintf("%#v", this.Put) + `}`}, ", ") - return s -} -func (this *HttpRule_Post) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&google_api.HttpRule_Post{` + - `Post:` + fmt.Sprintf("%#v", this.Post) + `}`}, ", ") - return s -} -func (this *HttpRule_Delete) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&google_api.HttpRule_Delete{` + - `Delete:` + fmt.Sprintf("%#v", this.Delete) + `}`}, ", ") - return s -} -func (this *HttpRule_Patch) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&google_api.HttpRule_Patch{` + - `Patch:` + fmt.Sprintf("%#v", this.Patch) + `}`}, ", ") - return s -} -func (this *HttpRule_Custom) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&google_api.HttpRule_Custom{` + - `Custom:` + fmt.Sprintf("%#v", this.Custom) + `}`}, ", ") - return s -} -func (this *CustomHttpPattern) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&google_api.CustomHttpPattern{") - s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\n") - s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringHttp(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *Http) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Http) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Http) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FullyDecodeReservedExpansion { - i-- - if m.FullyDecodeReservedExpansion { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Rules) > 0 { - for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHttp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *HttpRule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HttpRule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HttpRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResponseBody) > 0 { - i -= len(m.ResponseBody) - copy(dAtA[i:], m.ResponseBody) - i = encodeVarintHttp(dAtA, i, uint64(len(m.ResponseBody))) - i-- - dAtA[i] = 0x62 - } - if len(m.AdditionalBindings) > 0 { - for iNdEx := len(m.AdditionalBindings) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AdditionalBindings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHttp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if m.Pattern != nil { - { - size := m.Pattern.Size() - i -= size - if _, err := m.Pattern.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.Body) > 0 { - i -= len(m.Body) - copy(dAtA[i:], m.Body) - i = encodeVarintHttp(dAtA, i, uint64(len(m.Body))) - i-- - dAtA[i] = 0x3a - } - if len(m.Selector) > 0 { - i -= len(m.Selector) - copy(dAtA[i:], m.Selector) - i = encodeVarintHttp(dAtA, i, uint64(len(m.Selector))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *HttpRule_Get) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *HttpRule_Get) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Get) - copy(dAtA[i:], m.Get) - i = encodeVarintHttp(dAtA, i, uint64(len(m.Get))) - i-- - dAtA[i] = 0x12 - return len(dAtA) - i, nil -} -func (m *HttpRule_Put) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *HttpRule_Put) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Put) - copy(dAtA[i:], m.Put) - i = encodeVarintHttp(dAtA, i, uint64(len(m.Put))) - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil -} -func (m *HttpRule_Post) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *HttpRule_Post) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Post) - copy(dAtA[i:], m.Post) - i = encodeVarintHttp(dAtA, i, uint64(len(m.Post))) - i-- - dAtA[i] = 0x22 - return len(dAtA) - i, nil -} -func (m *HttpRule_Delete) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *HttpRule_Delete) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Delete) - copy(dAtA[i:], m.Delete) - i = encodeVarintHttp(dAtA, i, uint64(len(m.Delete))) - i-- - dAtA[i] = 0x2a - return len(dAtA) - i, nil -} -func (m *HttpRule_Patch) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *HttpRule_Patch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Patch) - copy(dAtA[i:], m.Patch) - i = encodeVarintHttp(dAtA, i, uint64(len(m.Patch))) - i-- - dAtA[i] = 0x32 - return len(dAtA) - i, nil -} -func (m *HttpRule_Custom) MarshalTo(dAtA []byte) (int, error) { - return m.MarshalToSizedBuffer(dAtA[:m.Size()]) -} - -func (m *HttpRule_Custom) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Custom != nil { - { - size, err := m.Custom.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHttp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - return len(dAtA) - i, nil -} -func (m *CustomHttpPattern) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomHttpPattern) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomHttpPattern) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Path) > 0 { - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintHttp(dAtA, i, uint64(len(m.Path))) - i-- - dAtA[i] = 0x12 - } - if len(m.Kind) > 0 { - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintHttp(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintHttp(dAtA []byte, offset int, v uint64) int { - offset -= sovHttp(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Http) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Rules) > 0 { - for _, e := range m.Rules { - l = e.Size() - n += 1 + l + sovHttp(uint64(l)) - } - } - if m.FullyDecodeReservedExpansion { - n += 2 - } - return n -} - -func (m *HttpRule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Selector) - if l > 0 { - n += 1 + l + sovHttp(uint64(l)) - } - if m.Pattern != nil { - n += m.Pattern.Size() - } - l = len(m.Body) - if l > 0 { - n += 1 + l + sovHttp(uint64(l)) - } - if len(m.AdditionalBindings) > 0 { - for _, e := range m.AdditionalBindings { - l = e.Size() - n += 1 + l + sovHttp(uint64(l)) - } - } - l = len(m.ResponseBody) - if l > 0 { - n += 1 + l + sovHttp(uint64(l)) - } - return n -} - -func (m *HttpRule_Get) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Get) - n += 1 + l + sovHttp(uint64(l)) - return n -} -func (m *HttpRule_Put) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Put) - n += 1 + l + sovHttp(uint64(l)) - return n -} -func (m *HttpRule_Post) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Post) - n += 1 + l + sovHttp(uint64(l)) - return n -} -func (m *HttpRule_Delete) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Delete) - n += 1 + l + sovHttp(uint64(l)) - return n -} -func (m *HttpRule_Patch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Patch) - n += 1 + l + sovHttp(uint64(l)) - return n -} -func (m *HttpRule_Custom) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Custom != nil { - l = m.Custom.Size() - n += 1 + l + sovHttp(uint64(l)) - } - return n -} -func (m *CustomHttpPattern) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Kind) - if l > 0 { - n += 1 + l + sovHttp(uint64(l)) - } - l = len(m.Path) - if l > 0 { - n += 1 + l + sovHttp(uint64(l)) - } - return n -} - -func sovHttp(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozHttp(x uint64) (n int) { - return sovHttp(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Http) String() string { - if this == nil { - return "nil" - } - repeatedStringForRules := "[]*HttpRule{" - for _, f := range this.Rules { - repeatedStringForRules += strings.Replace(f.String(), "HttpRule", "HttpRule", 1) + "," - } - repeatedStringForRules += "}" - s := strings.Join([]string{`&Http{`, - `Rules:` + repeatedStringForRules + `,`, - `FullyDecodeReservedExpansion:` + fmt.Sprintf("%v", this.FullyDecodeReservedExpansion) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule) String() string { - if this == nil { - return "nil" - } - repeatedStringForAdditionalBindings := "[]*HttpRule{" - for _, f := range this.AdditionalBindings { - repeatedStringForAdditionalBindings += strings.Replace(f.String(), "HttpRule", "HttpRule", 1) + "," - } - repeatedStringForAdditionalBindings += "}" - s := strings.Join([]string{`&HttpRule{`, - `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, - `Pattern:` + fmt.Sprintf("%v", this.Pattern) + `,`, - `Body:` + fmt.Sprintf("%v", this.Body) + `,`, - `AdditionalBindings:` + repeatedStringForAdditionalBindings + `,`, - `ResponseBody:` + fmt.Sprintf("%v", this.ResponseBody) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule_Get) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule_Get{`, - `Get:` + fmt.Sprintf("%v", this.Get) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule_Put) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule_Put{`, - `Put:` + fmt.Sprintf("%v", this.Put) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule_Post) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule_Post{`, - `Post:` + fmt.Sprintf("%v", this.Post) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule_Delete) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule_Delete{`, - `Delete:` + fmt.Sprintf("%v", this.Delete) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule_Patch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule_Patch{`, - `Patch:` + fmt.Sprintf("%v", this.Patch) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule_Custom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule_Custom{`, - `Custom:` + strings.Replace(fmt.Sprintf("%v", this.Custom), "CustomHttpPattern", "CustomHttpPattern", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomHttpPattern) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomHttpPattern{`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `}`, - }, "") - return s -} -func valueToStringHttp(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Http) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Http: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Http: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rules = append(m.Rules, &HttpRule{}) - if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FullyDecodeReservedExpansion", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.FullyDecodeReservedExpansion = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipHttp(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttp - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHttp - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HttpRule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HttpRule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HttpRule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Selector = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Get", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = &HttpRule_Get{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Put", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = &HttpRule_Put{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Post", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = &HttpRule_Post{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = &HttpRule_Delete{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Patch", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = &HttpRule_Patch{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Body = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Custom", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &CustomHttpPattern{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Pattern = &HttpRule_Custom{v} - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdditionalBindings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AdditionalBindings = append(m.AdditionalBindings, &HttpRule{}) - if err := m.AdditionalBindings[len(m.AdditionalBindings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseBody", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseBody = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHttp(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttp - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHttp - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomHttpPattern) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomHttpPattern: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomHttpPattern: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHttp(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttp - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHttp - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipHttp(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthHttp - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthHttp - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipHttp(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthHttp - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthHttp = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHttp = fmt.Errorf("proto: integer overflow") -) diff --git a/pkg/inject/googleapis/google/rpc/code.pb.go b/pkg/inject/googleapis/google/rpc/code.pb.go deleted file mode 100644 index bcc4e19b..00000000 --- a/pkg/inject/googleapis/google/rpc/code.pb.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/rpc/code.proto - -package google_rpc - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - math "math" - strconv "strconv" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// The canonical error codes for Google APIs. -// -// -// Sometimes multiple error codes may apply. Services should return -// the most specific error code that applies. For example, prefer -// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. -// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. -type Code int32 - -const ( - // Not an error; returned on success - // - // HTTP Mapping: 200 OK - OK Code = 0 - // The operation was cancelled, typically by the caller. - // - // HTTP Mapping: 499 Client Closed Request - CANCELLED Code = 1 - // Unknown error. For example, this error may be returned when - // a `Status` value received from another address space belongs to - // an error space that is not known in this address space. Also - // errors raised by APIs that do not return enough error information - // may be converted to this error. - // - // HTTP Mapping: 500 Internal Server Error - UNKNOWN Code = 2 - // The client specified an invalid argument. Note that this differs - // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments - // that are problematic regardless of the state of the system - // (e.g., a malformed file name). - // - // HTTP Mapping: 400 Bad Request - INVALID_ARGUMENT Code = 3 - // The deadline expired before the operation could complete. For operations - // that change the state of the system, this error may be returned - // even if the operation has completed successfully. For example, a - // successful response from a server could have been delayed long - // enough for the deadline to expire. - // - // HTTP Mapping: 504 Gateway Timeout - DEADLINE_EXCEEDED Code = 4 - // Some requested entity (e.g., file or directory) was not found. - // - // Note to server developers: if a request is denied for an entire class - // of users, such as gradual feature rollout or undocumented whitelist, - // `NOT_FOUND` may be used. If a request is denied for some users within - // a class of users, such as user-based access control, `PERMISSION_DENIED` - // must be used. - // - // HTTP Mapping: 404 Not Found - NOT_FOUND Code = 5 - // The entity that a client attempted to create (e.g., file or directory) - // already exists. - // - // HTTP Mapping: 409 Conflict - ALREADY_EXISTS Code = 6 - // The caller does not have permission to execute the specified - // operation. `PERMISSION_DENIED` must not be used for rejections - // caused by exhausting some resource (use `RESOURCE_EXHAUSTED` - // instead for those errors). `PERMISSION_DENIED` must not be - // used if the caller can not be identified (use `UNAUTHENTICATED` - // instead for those errors). This error code does not imply the - // request is valid or the requested entity exists or satisfies - // other pre-conditions. - // - // HTTP Mapping: 403 Forbidden - PERMISSION_DENIED Code = 7 - // The request does not have valid authentication credentials for the - // operation. - // - // HTTP Mapping: 401 Unauthorized - UNAUTHENTICATED Code = 16 - // Some resource has been exhausted, perhaps a per-user quota, or - // perhaps the entire file system is out of space. - // - // HTTP Mapping: 429 Too Many Requests - RESOURCE_EXHAUSTED Code = 8 - // The operation was rejected because the system is not in a state - // required for the operation's execution. For example, the directory - // to be deleted is non-empty, an rmdir operation is applied to - // a non-directory, etc. - // - // Service implementors can use the following guidelines to decide - // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: - // (a) Use `UNAVAILABLE` if the client can retry just the failing call. - // (b) Use `ABORTED` if the client should retry at a higher level - // (e.g., when a client-specified test-and-set fails, indicating the - // client should restart a read-modify-write sequence). - // (c) Use `FAILED_PRECONDITION` if the client should not retry until - // the system state has been explicitly fixed. E.g., if an "rmdir" - // fails because the directory is non-empty, `FAILED_PRECONDITION` - // should be returned since the client should not retry unless - // the files are deleted from the directory. - // - // HTTP Mapping: 400 Bad Request - FAILED_PRECONDITION Code = 9 - // The operation was aborted, typically due to a concurrency issue such as - // a sequencer check failure or transaction abort. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 409 Conflict - ABORTED Code = 10 - // The operation was attempted past the valid range. E.g., seeking or - // reading past end-of-file. - // - // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may - // be fixed if the system state changes. For example, a 32-bit file - // system will generate `INVALID_ARGUMENT` if asked to read at an - // offset that is not in the range [0,2^32-1], but it will generate - // `OUT_OF_RANGE` if asked to read from an offset past the current - // file size. - // - // There is a fair bit of overlap between `FAILED_PRECONDITION` and - // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific - // error) when it applies so that callers who are iterating through - // a space can easily look for an `OUT_OF_RANGE` error to detect when - // they are done. - // - // HTTP Mapping: 400 Bad Request - OUT_OF_RANGE Code = 11 - // The operation is not implemented or is not supported/enabled in this - // service. - // - // HTTP Mapping: 501 Not Implemented - UNIMPLEMENTED Code = 12 - // Internal errors. This means that some invariants expected by the - // underlying system have been broken. This error code is reserved - // for serious errors. - // - // HTTP Mapping: 500 Internal Server Error - INTERNAL Code = 13 - // The service is currently unavailable. This is most likely a - // transient condition, which can be corrected by retrying with - // a backoff. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 503 Service Unavailable - UNAVAILABLE Code = 14 - // Unrecoverable data loss or corruption. - // - // HTTP Mapping: 500 Internal Server Error - DATA_LOSS Code = 15 -) - -var Code_name = map[int32]string{ - 0: "OK", - 1: "CANCELLED", - 2: "UNKNOWN", - 3: "INVALID_ARGUMENT", - 4: "DEADLINE_EXCEEDED", - 5: "NOT_FOUND", - 6: "ALREADY_EXISTS", - 7: "PERMISSION_DENIED", - 16: "UNAUTHENTICATED", - 8: "RESOURCE_EXHAUSTED", - 9: "FAILED_PRECONDITION", - 10: "ABORTED", - 11: "OUT_OF_RANGE", - 12: "UNIMPLEMENTED", - 13: "INTERNAL", - 14: "UNAVAILABLE", - 15: "DATA_LOSS", -} - -var Code_value = map[string]int32{ - "OK": 0, - "CANCELLED": 1, - "UNKNOWN": 2, - "INVALID_ARGUMENT": 3, - "DEADLINE_EXCEEDED": 4, - "NOT_FOUND": 5, - "ALREADY_EXISTS": 6, - "PERMISSION_DENIED": 7, - "UNAUTHENTICATED": 16, - "RESOURCE_EXHAUSTED": 8, - "FAILED_PRECONDITION": 9, - "ABORTED": 10, - "OUT_OF_RANGE": 11, - "UNIMPLEMENTED": 12, - "INTERNAL": 13, - "UNAVAILABLE": 14, - "DATA_LOSS": 15, -} - -func (Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fe593a732623ccf0, []int{0} -} - -func init() { - proto.RegisterEnum("google.rpc.Code", Code_name, Code_value) -} - -func init() { proto.RegisterFile("google/rpc/code.proto", fileDescriptor_fe593a732623ccf0) } - -var fileDescriptor_fe593a732623ccf0 = []byte{ - // 392 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x91, 0x3f, 0x72, 0x13, 0x31, - 0x14, 0xc6, 0x77, 0x9d, 0xe0, 0xc4, 0xf2, 0xbf, 0x17, 0x85, 0x40, 0xa7, 0x03, 0x50, 0x38, 0x05, - 0x27, 0x78, 0x5e, 0x3d, 0x27, 0x9a, 0xc8, 0x4f, 0x3b, 0x5a, 0x29, 0x09, 0x95, 0x66, 0x70, 0x3c, - 0x69, 0x60, 0xd6, 0xe3, 0xe1, 0x00, 0x1c, 0x81, 0x33, 0x50, 0x71, 0x03, 0xae, 0x40, 0xe9, 0x32, - 0x25, 0x5e, 0x37, 0x94, 0x39, 0x02, 0x23, 0x28, 0xd2, 0x7e, 0xf3, 0xfe, 0x7c, 0xdf, 0xf7, 0x13, - 0x17, 0x8f, 0x6d, 0xfb, 0xf8, 0x69, 0x7d, 0xb9, 0xdd, 0xac, 0x2e, 0x57, 0xed, 0xc3, 0x7a, 0xb6, - 0xd9, 0xb6, 0x5f, 0x5a, 0x29, 0xfe, 0xcb, 0xb3, 0xed, 0x66, 0xf5, 0xee, 0x67, 0x4f, 0x1c, 0x57, - 0xed, 0xc3, 0x5a, 0xf6, 0x45, 0xcf, 0xdd, 0x40, 0x21, 0xc7, 0x62, 0x50, 0x21, 0x57, 0x64, 0x2d, - 0x69, 0x28, 0xe5, 0x50, 0x9c, 0x44, 0xbe, 0x61, 0x77, 0xc7, 0xd0, 0x93, 0xaf, 0x05, 0x18, 0xbe, - 0x45, 0x6b, 0x74, 0x42, 0x7f, 0x15, 0x97, 0xc4, 0x01, 0x8e, 0xe4, 0x85, 0x38, 0xd3, 0x84, 0xda, - 0x1a, 0xa6, 0x44, 0xf7, 0x15, 0x91, 0x26, 0x0d, 0xc7, 0xf9, 0x10, 0xbb, 0x90, 0x16, 0x2e, 0xb2, - 0x86, 0x57, 0x52, 0x8a, 0x09, 0x5a, 0x4f, 0xa8, 0x3f, 0x24, 0xba, 0x37, 0x4d, 0x68, 0xa0, 0x9f, - 0x37, 0x6b, 0xf2, 0x4b, 0xd3, 0x34, 0xc6, 0x71, 0xd2, 0xc4, 0x86, 0x34, 0x9c, 0xc8, 0x73, 0x31, - 0x8d, 0x8c, 0x31, 0x5c, 0x13, 0x07, 0x53, 0x61, 0x20, 0x0d, 0x20, 0xdf, 0x08, 0xe9, 0xa9, 0x71, - 0xd1, 0x57, 0xf9, 0xcb, 0x35, 0xc6, 0x26, 0xeb, 0xa7, 0xf2, 0xad, 0x38, 0x5f, 0xa0, 0xb1, 0xa4, - 0x53, 0xed, 0xa9, 0x72, 0xac, 0x4d, 0x30, 0x8e, 0x61, 0x90, 0x9d, 0xe3, 0xdc, 0xf9, 0x3c, 0x25, - 0x24, 0x88, 0x91, 0x8b, 0x21, 0xb9, 0x45, 0xf2, 0xc8, 0x57, 0x04, 0x43, 0x79, 0x26, 0xc6, 0x91, - 0xcd, 0xb2, 0xb6, 0x94, 0x63, 0x90, 0x86, 0x91, 0x1c, 0x89, 0x53, 0xc3, 0x81, 0x3c, 0xa3, 0x85, - 0xb1, 0x9c, 0x8a, 0x61, 0x64, 0xbc, 0x45, 0x63, 0x71, 0x6e, 0x09, 0x26, 0x39, 0x90, 0xc6, 0x80, - 0xc9, 0xba, 0xa6, 0x81, 0xe9, 0xfc, 0x6e, 0xb7, 0x57, 0xc5, 0xd3, 0x5e, 0x15, 0xcf, 0x7b, 0x55, - 0x7e, 0xed, 0x54, 0xf9, 0xa3, 0x53, 0xe5, 0xaf, 0x4e, 0x95, 0xbb, 0x4e, 0x95, 0xbf, 0x3b, 0x55, - 0xfe, 0xe9, 0x54, 0xf1, 0xdc, 0xa9, 0xf2, 0xdb, 0x41, 0x15, 0xbb, 0x83, 0x2a, 0x9e, 0x0e, 0xaa, - 0x10, 0x93, 0x55, 0xfb, 0x79, 0xf6, 0xd2, 0xff, 0x7c, 0x90, 0xcb, 0xaf, 0x33, 0x96, 0xba, 0xfc, - 0xde, 0x3b, 0xf2, 0x75, 0xf5, 0xb1, 0xff, 0x8f, 0xd2, 0xfb, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x64, 0x4f, 0x34, 0xbe, 0xbe, 0x01, 0x00, 0x00, -} - -func (x Code) String() string { - s, ok := Code_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} diff --git a/pkg/inject/googleapis/google/rpc/error_details.pb.go b/pkg/inject/googleapis/google/rpc/error_details.pb.go deleted file mode 100644 index d3856378..00000000 --- a/pkg/inject/googleapis/google/rpc/error_details.pb.go +++ /dev/null @@ -1,3855 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/rpc/error_details.proto - -package google_rpc - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Describes when the clients can retry a failed request. Clients could ignore -// the recommendation here or retry when this information is missing from error -// responses. -// -// It's always recommended that clients should use exponential backoff when -// retrying. -// -// Clients should wait until `retry_delay` amount of time has passed since -// receiving the error response before retrying. If retrying requests also -// fail, clients should use an exponential backoff scheme to gradually increase -// the delay between retries based on `retry_delay`, until either a maximum -// number of retires have been reached or a maximum retry delay cap has been -// reached. -type RetryInfo struct { - // Clients should wait at least this long between retrying the same request. - RetryDelay *types.Duration `protobuf:"bytes,1,opt,name=retry_delay,json=retryDelay,proto3" json:"retry_delay,omitempty"` -} - -func (m *RetryInfo) Reset() { *m = RetryInfo{} } -func (*RetryInfo) ProtoMessage() {} -func (*RetryInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{0} -} -func (m *RetryInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RetryInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RetryInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RetryInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_RetryInfo.Merge(m, src) -} -func (m *RetryInfo) XXX_Size() int { - return m.Size() -} -func (m *RetryInfo) XXX_DiscardUnknown() { - xxx_messageInfo_RetryInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_RetryInfo proto.InternalMessageInfo - -func (m *RetryInfo) GetRetryDelay() *types.Duration { - if m != nil { - return m.RetryDelay - } - return nil -} - -// Describes additional debugging info. -type DebugInfo struct { - // The stack trace entries indicating where the error occurred. - StackEntries []string `protobuf:"bytes,1,rep,name=stack_entries,json=stackEntries,proto3" json:"stack_entries,omitempty"` - // Additional debugging information provided by the server. - Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"` -} - -func (m *DebugInfo) Reset() { *m = DebugInfo{} } -func (*DebugInfo) ProtoMessage() {} -func (*DebugInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{1} -} -func (m *DebugInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DebugInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DebugInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DebugInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_DebugInfo.Merge(m, src) -} -func (m *DebugInfo) XXX_Size() int { - return m.Size() -} -func (m *DebugInfo) XXX_DiscardUnknown() { - xxx_messageInfo_DebugInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_DebugInfo proto.InternalMessageInfo - -func (m *DebugInfo) GetStackEntries() []string { - if m != nil { - return m.StackEntries - } - return nil -} - -func (m *DebugInfo) GetDetail() string { - if m != nil { - return m.Detail - } - return "" -} - -// Describes how a quota check failed. -// -// For example if a daily limit was exceeded for the calling project, -// a service could respond with a QuotaFailure detail containing the project -// id and the description of the quota limit that was exceeded. If the -// calling project hasn't enabled the service in the developer console, then -// a service could respond with the project id and set `service_disabled` -// to true. -// -// Also see RetryDetail and Help types for other details about handling a -// quota failure. -type QuotaFailure struct { - // Describes all quota violations. - Violations []*QuotaFailure_Violation `protobuf:"bytes,1,rep,name=violations,proto3" json:"violations,omitempty"` -} - -func (m *QuotaFailure) Reset() { *m = QuotaFailure{} } -func (*QuotaFailure) ProtoMessage() {} -func (*QuotaFailure) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{2} -} -func (m *QuotaFailure) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QuotaFailure) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QuotaFailure.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QuotaFailure) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuotaFailure.Merge(m, src) -} -func (m *QuotaFailure) XXX_Size() int { - return m.Size() -} -func (m *QuotaFailure) XXX_DiscardUnknown() { - xxx_messageInfo_QuotaFailure.DiscardUnknown(m) -} - -var xxx_messageInfo_QuotaFailure proto.InternalMessageInfo - -func (m *QuotaFailure) GetViolations() []*QuotaFailure_Violation { - if m != nil { - return m.Violations - } - return nil -} - -// A message type used to describe a single quota violation. For example, a -// daily quota or a custom quota that was exceeded. -type QuotaFailure_Violation struct { - // The subject on which the quota check failed. - // For example, "clientip:" or "project:". - Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` - // A description of how the quota check failed. Clients can use this - // description to find more about the quota configuration in the service's - // public documentation, or find the relevant quota limit to adjust through - // developer console. - // - // For example: "Service disabled" or "Daily Limit for read operations - // exceeded". - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *QuotaFailure_Violation) Reset() { *m = QuotaFailure_Violation{} } -func (*QuotaFailure_Violation) ProtoMessage() {} -func (*QuotaFailure_Violation) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{2, 0} -} -func (m *QuotaFailure_Violation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QuotaFailure_Violation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QuotaFailure_Violation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QuotaFailure_Violation) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuotaFailure_Violation.Merge(m, src) -} -func (m *QuotaFailure_Violation) XXX_Size() int { - return m.Size() -} -func (m *QuotaFailure_Violation) XXX_DiscardUnknown() { - xxx_messageInfo_QuotaFailure_Violation.DiscardUnknown(m) -} - -var xxx_messageInfo_QuotaFailure_Violation proto.InternalMessageInfo - -func (m *QuotaFailure_Violation) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *QuotaFailure_Violation) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -// Describes what preconditions have failed. -// -// For example, if an RPC failed because it required the Terms of Service to be -// acknowledged, it could list the terms of service violation in the -// PreconditionFailure message. -type PreconditionFailure struct { - // Describes all precondition violations. - Violations []*PreconditionFailure_Violation `protobuf:"bytes,1,rep,name=violations,proto3" json:"violations,omitempty"` -} - -func (m *PreconditionFailure) Reset() { *m = PreconditionFailure{} } -func (*PreconditionFailure) ProtoMessage() {} -func (*PreconditionFailure) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{3} -} -func (m *PreconditionFailure) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PreconditionFailure) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PreconditionFailure.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PreconditionFailure) XXX_Merge(src proto.Message) { - xxx_messageInfo_PreconditionFailure.Merge(m, src) -} -func (m *PreconditionFailure) XXX_Size() int { - return m.Size() -} -func (m *PreconditionFailure) XXX_DiscardUnknown() { - xxx_messageInfo_PreconditionFailure.DiscardUnknown(m) -} - -var xxx_messageInfo_PreconditionFailure proto.InternalMessageInfo - -func (m *PreconditionFailure) GetViolations() []*PreconditionFailure_Violation { - if m != nil { - return m.Violations - } - return nil -} - -// A message type used to describe a single precondition failure. -type PreconditionFailure_Violation struct { - // The type of PreconditionFailure. We recommend using a service-specific - // enum type to define the supported precondition violation types. For - // example, "TOS" for "Terms of Service violation". - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // The subject, relative to the type, that failed. - // For example, "google.com/cloud" relative to the "TOS" type would - // indicate which terms of service is being referenced. - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - // A description of how the precondition failed. Developers can use this - // description to understand how to fix the failure. - // - // For example: "Terms of service not accepted". - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *PreconditionFailure_Violation) Reset() { *m = PreconditionFailure_Violation{} } -func (*PreconditionFailure_Violation) ProtoMessage() {} -func (*PreconditionFailure_Violation) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{3, 0} -} -func (m *PreconditionFailure_Violation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PreconditionFailure_Violation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PreconditionFailure_Violation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PreconditionFailure_Violation) XXX_Merge(src proto.Message) { - xxx_messageInfo_PreconditionFailure_Violation.Merge(m, src) -} -func (m *PreconditionFailure_Violation) XXX_Size() int { - return m.Size() -} -func (m *PreconditionFailure_Violation) XXX_DiscardUnknown() { - xxx_messageInfo_PreconditionFailure_Violation.DiscardUnknown(m) -} - -var xxx_messageInfo_PreconditionFailure_Violation proto.InternalMessageInfo - -func (m *PreconditionFailure_Violation) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *PreconditionFailure_Violation) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *PreconditionFailure_Violation) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -// Describes violations in a client request. This error type focuses on the -// syntactic aspects of the request. -type BadRequest struct { - // Describes all violations in a client request. - FieldViolations []*BadRequest_FieldViolation `protobuf:"bytes,1,rep,name=field_violations,json=fieldViolations,proto3" json:"field_violations,omitempty"` -} - -func (m *BadRequest) Reset() { *m = BadRequest{} } -func (*BadRequest) ProtoMessage() {} -func (*BadRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{4} -} -func (m *BadRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BadRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BadRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BadRequest.Merge(m, src) -} -func (m *BadRequest) XXX_Size() int { - return m.Size() -} -func (m *BadRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BadRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BadRequest proto.InternalMessageInfo - -func (m *BadRequest) GetFieldViolations() []*BadRequest_FieldViolation { - if m != nil { - return m.FieldViolations - } - return nil -} - -// A message type used to describe a single bad request field. -type BadRequest_FieldViolation struct { - // A path leading to a field in the request body. The value will be a - // sequence of dot-separated identifiers that identify a protocol buffer - // field. E.g., "field_violations.field" would identify this field. - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` - // A description of why the request element is bad. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *BadRequest_FieldViolation) Reset() { *m = BadRequest_FieldViolation{} } -func (*BadRequest_FieldViolation) ProtoMessage() {} -func (*BadRequest_FieldViolation) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{4, 0} -} -func (m *BadRequest_FieldViolation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BadRequest_FieldViolation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BadRequest_FieldViolation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BadRequest_FieldViolation) XXX_Merge(src proto.Message) { - xxx_messageInfo_BadRequest_FieldViolation.Merge(m, src) -} -func (m *BadRequest_FieldViolation) XXX_Size() int { - return m.Size() -} -func (m *BadRequest_FieldViolation) XXX_DiscardUnknown() { - xxx_messageInfo_BadRequest_FieldViolation.DiscardUnknown(m) -} - -var xxx_messageInfo_BadRequest_FieldViolation proto.InternalMessageInfo - -func (m *BadRequest_FieldViolation) GetField() string { - if m != nil { - return m.Field - } - return "" -} - -func (m *BadRequest_FieldViolation) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -// Contains metadata about the request that clients can attach when filing a bug -// or providing other forms of feedback. -type RequestInfo struct { - // An opaque string that should only be interpreted by the service generating - // it. For example, it can be used to identify requests in the service's logs. - RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // Any data that was used to serve this request. For example, an encrypted - // stack trace that can be sent back to the service provider for debugging. - ServingData string `protobuf:"bytes,2,opt,name=serving_data,json=servingData,proto3" json:"serving_data,omitempty"` -} - -func (m *RequestInfo) Reset() { *m = RequestInfo{} } -func (*RequestInfo) ProtoMessage() {} -func (*RequestInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{5} -} -func (m *RequestInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RequestInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestInfo.Merge(m, src) -} -func (m *RequestInfo) XXX_Size() int { - return m.Size() -} -func (m *RequestInfo) XXX_DiscardUnknown() { - xxx_messageInfo_RequestInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestInfo proto.InternalMessageInfo - -func (m *RequestInfo) GetRequestId() string { - if m != nil { - return m.RequestId - } - return "" -} - -func (m *RequestInfo) GetServingData() string { - if m != nil { - return m.ServingData - } - return "" -} - -// Describes the resource that is being accessed. -type ResourceInfo struct { - // A name for the type of resource being accessed, e.g. "sql table", - // "cloud storage bucket", "file", "Google calendar"; or the type URL - // of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". - ResourceType string `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - // The name of the resource being accessed. For example, a shared calendar - // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - // error is - // [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. - ResourceName string `protobuf:"bytes,2,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"` - // The owner of the resource (optional). - // For example, "user:" or "project:". - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - // Describes what error is encountered when accessing this resource. - // For example, updating a cloud project may require the `writer` permission - // on the developer console project. - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *ResourceInfo) Reset() { *m = ResourceInfo{} } -func (*ResourceInfo) ProtoMessage() {} -func (*ResourceInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{6} -} -func (m *ResourceInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceInfo.Merge(m, src) -} -func (m *ResourceInfo) XXX_Size() int { - return m.Size() -} -func (m *ResourceInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceInfo proto.InternalMessageInfo - -func (m *ResourceInfo) GetResourceType() string { - if m != nil { - return m.ResourceType - } - return "" -} - -func (m *ResourceInfo) GetResourceName() string { - if m != nil { - return m.ResourceName - } - return "" -} - -func (m *ResourceInfo) GetOwner() string { - if m != nil { - return m.Owner - } - return "" -} - -func (m *ResourceInfo) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -// Provides links to documentation or for performing an out of band action. -// -// For example, if a quota check failed with an error indicating the calling -// project hasn't enabled the accessed service, this can contain a URL pointing -// directly to the right place in the developer console to flip the bit. -type Help struct { - // URL(s) pointing to additional information on handling the current error. - Links []*Help_Link `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` -} - -func (m *Help) Reset() { *m = Help{} } -func (*Help) ProtoMessage() {} -func (*Help) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{7} -} -func (m *Help) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Help) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Help.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Help) XXX_Merge(src proto.Message) { - xxx_messageInfo_Help.Merge(m, src) -} -func (m *Help) XXX_Size() int { - return m.Size() -} -func (m *Help) XXX_DiscardUnknown() { - xxx_messageInfo_Help.DiscardUnknown(m) -} - -var xxx_messageInfo_Help proto.InternalMessageInfo - -func (m *Help) GetLinks() []*Help_Link { - if m != nil { - return m.Links - } - return nil -} - -// Describes a URL link. -type Help_Link struct { - // Describes what the link offers. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // The URL of the link. - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (m *Help_Link) Reset() { *m = Help_Link{} } -func (*Help_Link) ProtoMessage() {} -func (*Help_Link) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{7, 0} -} -func (m *Help_Link) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Help_Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Help_Link.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Help_Link) XXX_Merge(src proto.Message) { - xxx_messageInfo_Help_Link.Merge(m, src) -} -func (m *Help_Link) XXX_Size() int { - return m.Size() -} -func (m *Help_Link) XXX_DiscardUnknown() { - xxx_messageInfo_Help_Link.DiscardUnknown(m) -} - -var xxx_messageInfo_Help_Link proto.InternalMessageInfo - -func (m *Help_Link) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Help_Link) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -// Provides a localized error message that is safe to return to the user -// which can be attached to an RPC error. -type LocalizedMessage struct { - // The locale used following the specification defined at - // http://www.rfc-editor.org/rfc/bcp/bcp47.txt. - // Examples are: "en-US", "fr-CH", "es-MX" - Locale string `protobuf:"bytes,1,opt,name=locale,proto3" json:"locale,omitempty"` - // The localized error message in the above locale. - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` -} - -func (m *LocalizedMessage) Reset() { *m = LocalizedMessage{} } -func (*LocalizedMessage) ProtoMessage() {} -func (*LocalizedMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_851816e4d6b6361a, []int{8} -} -func (m *LocalizedMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalizedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LocalizedMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LocalizedMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalizedMessage.Merge(m, src) -} -func (m *LocalizedMessage) XXX_Size() int { - return m.Size() -} -func (m *LocalizedMessage) XXX_DiscardUnknown() { - xxx_messageInfo_LocalizedMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalizedMessage proto.InternalMessageInfo - -func (m *LocalizedMessage) GetLocale() string { - if m != nil { - return m.Locale - } - return "" -} - -func (m *LocalizedMessage) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func init() { - proto.RegisterType((*RetryInfo)(nil), "google.rpc.RetryInfo") - proto.RegisterType((*DebugInfo)(nil), "google.rpc.DebugInfo") - proto.RegisterType((*QuotaFailure)(nil), "google.rpc.QuotaFailure") - proto.RegisterType((*QuotaFailure_Violation)(nil), "google.rpc.QuotaFailure.Violation") - proto.RegisterType((*PreconditionFailure)(nil), "google.rpc.PreconditionFailure") - proto.RegisterType((*PreconditionFailure_Violation)(nil), "google.rpc.PreconditionFailure.Violation") - proto.RegisterType((*BadRequest)(nil), "google.rpc.BadRequest") - proto.RegisterType((*BadRequest_FieldViolation)(nil), "google.rpc.BadRequest.FieldViolation") - proto.RegisterType((*RequestInfo)(nil), "google.rpc.RequestInfo") - proto.RegisterType((*ResourceInfo)(nil), "google.rpc.ResourceInfo") - proto.RegisterType((*Help)(nil), "google.rpc.Help") - proto.RegisterType((*Help_Link)(nil), "google.rpc.Help.Link") - proto.RegisterType((*LocalizedMessage)(nil), "google.rpc.LocalizedMessage") -} - -func init() { proto.RegisterFile("google/rpc/error_details.proto", fileDescriptor_851816e4d6b6361a) } - -var fileDescriptor_851816e4d6b6361a = []byte{ - // 624 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x4d, 0x6f, 0xd3, 0x4c, - 0x18, 0xcc, 0x36, 0x69, 0x5f, 0xf9, 0x49, 0xde, 0x52, 0xcc, 0x87, 0x42, 0x24, 0x56, 0xc1, 0x08, - 0xa9, 0x08, 0xc9, 0x95, 0xca, 0xad, 0xc7, 0x90, 0x7e, 0x49, 0x05, 0x82, 0x85, 0xb8, 0x70, 0xb0, - 0x36, 0xf6, 0x93, 0x68, 0xa9, 0xe3, 0x0d, 0x6b, 0xbb, 0xa8, 0x9c, 0xf8, 0x09, 0xbd, 0x73, 0xe3, - 0xd4, 0x3f, 0xc1, 0x9d, 0x63, 0x8f, 0x3d, 0x52, 0xf7, 0xc2, 0xb1, 0x3f, 0x01, 0xad, 0xbd, 0xdb, - 0xb8, 0x4d, 0x41, 0xdc, 0x3c, 0xb3, 0xb3, 0xe3, 0x99, 0x47, 0xbb, 0x0b, 0x74, 0x2c, 0xc4, 0x38, - 0xc2, 0x35, 0x39, 0x0d, 0xd6, 0x50, 0x4a, 0x21, 0xfd, 0x10, 0x53, 0xc6, 0xa3, 0xc4, 0x9d, 0x4a, - 0x91, 0x0a, 0x1b, 0xca, 0x75, 0x57, 0x4e, 0x83, 0x8e, 0xd1, 0x16, 0x2b, 0xc3, 0x6c, 0xb4, 0x16, - 0x66, 0x92, 0xa5, 0x5c, 0xc4, 0xa5, 0xd6, 0xd9, 0x06, 0xcb, 0xc3, 0x54, 0x1e, 0xee, 0xc6, 0x23, - 0x61, 0x6f, 0x40, 0x53, 0x2a, 0xe0, 0x87, 0x18, 0xb1, 0xc3, 0x36, 0xe9, 0x92, 0xd5, 0xe6, 0xfa, - 0x03, 0x57, 0xdb, 0x19, 0x0b, 0xb7, 0xaf, 0x2d, 0x3c, 0x28, 0xd4, 0x7d, 0x25, 0x76, 0x76, 0xc0, - 0xea, 0xe3, 0x30, 0x1b, 0x17, 0x46, 0x8f, 0xe1, 0xff, 0x24, 0x65, 0xc1, 0xbe, 0x8f, 0x71, 0x2a, - 0x39, 0x26, 0x6d, 0xd2, 0xad, 0xaf, 0x5a, 0x5e, 0xab, 0x20, 0x37, 0x4b, 0xce, 0xbe, 0x0f, 0x4b, - 0x65, 0xee, 0xf6, 0x42, 0x97, 0xac, 0x5a, 0x9e, 0x46, 0xce, 0x57, 0x02, 0xad, 0x37, 0x99, 0x48, - 0xd9, 0x16, 0xe3, 0x51, 0x26, 0xd1, 0xee, 0x01, 0x1c, 0x70, 0x11, 0x15, 0xff, 0x2c, 0xad, 0x9a, - 0xeb, 0x8e, 0x3b, 0x2b, 0xe9, 0x56, 0xd5, 0xee, 0x3b, 0x23, 0xf5, 0x2a, 0xbb, 0x3a, 0xdb, 0x60, - 0x5d, 0x2e, 0xd8, 0x6d, 0xf8, 0x2f, 0xc9, 0x86, 0x1f, 0x30, 0x48, 0x8b, 0x8e, 0x96, 0x67, 0xa0, - 0xdd, 0x85, 0x66, 0x88, 0x49, 0x20, 0xf9, 0x54, 0x09, 0x75, 0xb0, 0x2a, 0xe5, 0x7c, 0x27, 0x70, - 0x67, 0x20, 0x31, 0x10, 0x71, 0xc8, 0x15, 0x61, 0x42, 0xee, 0xde, 0x10, 0xf2, 0x69, 0x35, 0xe4, - 0x0d, 0x9b, 0xfe, 0x90, 0xf5, 0x7d, 0x35, 0xab, 0x0d, 0x8d, 0xf4, 0x70, 0x8a, 0x3a, 0x68, 0xf1, - 0x5d, 0xcd, 0xbf, 0xf0, 0xd7, 0xfc, 0xf5, 0xf9, 0xfc, 0xc7, 0x04, 0xa0, 0xc7, 0x42, 0x0f, 0x3f, - 0x66, 0x98, 0xa4, 0xf6, 0x00, 0x56, 0x46, 0x1c, 0xa3, 0xd0, 0x9f, 0x0b, 0xff, 0xa4, 0x1a, 0x7e, - 0xb6, 0xc3, 0xdd, 0x52, 0xf2, 0x59, 0xf0, 0x5b, 0xa3, 0x2b, 0x38, 0xe9, 0xec, 0xc0, 0xf2, 0x55, - 0x89, 0x7d, 0x17, 0x16, 0x0b, 0x91, 0xee, 0x50, 0x82, 0x7f, 0x18, 0xf5, 0x6b, 0x68, 0xea, 0x9f, - 0x16, 0x87, 0xea, 0x21, 0x80, 0x2c, 0xa1, 0xcf, 0x8d, 0x97, 0xa5, 0x99, 0xdd, 0xd0, 0x7e, 0x04, - 0xad, 0x04, 0xe5, 0x01, 0x8f, 0xc7, 0x7e, 0xc8, 0x52, 0x66, 0x0c, 0x35, 0xd7, 0x67, 0x29, 0x73, - 0x8e, 0x08, 0xb4, 0x3c, 0x4c, 0x44, 0x26, 0x03, 0x34, 0xe7, 0x54, 0x6a, 0xec, 0x57, 0xa6, 0xdc, - 0x32, 0xe4, 0x5b, 0x35, 0xed, 0xaa, 0x28, 0x66, 0x13, 0xd4, 0xce, 0x97, 0xa2, 0x57, 0x6c, 0x82, - 0xaa, 0xa3, 0xf8, 0x14, 0xa3, 0xd4, 0x23, 0x2f, 0xc1, 0xf5, 0x8e, 0x8d, 0xf9, 0x8e, 0x02, 0x1a, - 0x3b, 0x18, 0x4d, 0xed, 0x67, 0xb0, 0x18, 0xf1, 0x78, 0xdf, 0x0c, 0xff, 0x5e, 0x75, 0xf8, 0x4a, - 0xe0, 0xee, 0xf1, 0x78, 0xdf, 0x2b, 0x35, 0x9d, 0x0d, 0x68, 0x28, 0x78, 0xdd, 0x9e, 0xcc, 0xd9, - 0xdb, 0x2b, 0x50, 0xcf, 0xa4, 0xb9, 0x60, 0xea, 0xd3, 0xe9, 0xc3, 0xca, 0x9e, 0x08, 0x58, 0xc4, - 0x3f, 0x63, 0xf8, 0x12, 0x93, 0x84, 0x8d, 0x51, 0xdd, 0xc4, 0x48, 0x71, 0xa6, 0xbf, 0x46, 0xea, - 0x9c, 0x4d, 0x4a, 0x89, 0x39, 0x67, 0x1a, 0xf6, 0xfc, 0x93, 0x33, 0x5a, 0x3b, 0x3d, 0xa3, 0xb5, - 0x8b, 0x33, 0x4a, 0xbe, 0xe4, 0x94, 0x1c, 0xe7, 0x94, 0xfc, 0xc8, 0x29, 0x39, 0xc9, 0x29, 0xf9, - 0x99, 0x53, 0xf2, 0x2b, 0xa7, 0xb5, 0x8b, 0x9c, 0x92, 0xa3, 0x73, 0x5a, 0x3b, 0x39, 0xa7, 0xb5, - 0xd3, 0x73, 0x5a, 0x83, 0xe5, 0x40, 0x4c, 0x2a, 0xc5, 0x7a, 0xb7, 0x37, 0xd5, 0xeb, 0xd5, 0x2f, - 0x1f, 0xaf, 0x81, 0x7a, 0x5e, 0x06, 0xe4, 0xdb, 0x42, 0xdd, 0x1b, 0xbc, 0x18, 0x2e, 0x15, 0xaf, - 0xcd, 0xf3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x18, 0x72, 0x41, 0x3c, 0xec, 0x04, 0x00, 0x00, -} - -func (this *RetryInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RetryInfo) - if !ok { - that2, ok := that.(RetryInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RetryDelay.Equal(that1.RetryDelay) { - return false - } - return true -} -func (this *DebugInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DebugInfo) - if !ok { - that2, ok := that.(DebugInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.StackEntries) != len(that1.StackEntries) { - return false - } - for i := range this.StackEntries { - if this.StackEntries[i] != that1.StackEntries[i] { - return false - } - } - if this.Detail != that1.Detail { - return false - } - return true -} -func (this *QuotaFailure) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*QuotaFailure) - if !ok { - that2, ok := that.(QuotaFailure) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Violations) != len(that1.Violations) { - return false - } - for i := range this.Violations { - if !this.Violations[i].Equal(that1.Violations[i]) { - return false - } - } - return true -} -func (this *QuotaFailure_Violation) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*QuotaFailure_Violation) - if !ok { - that2, ok := that.(QuotaFailure_Violation) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Subject != that1.Subject { - return false - } - if this.Description != that1.Description { - return false - } - return true -} -func (this *PreconditionFailure) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PreconditionFailure) - if !ok { - that2, ok := that.(PreconditionFailure) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Violations) != len(that1.Violations) { - return false - } - for i := range this.Violations { - if !this.Violations[i].Equal(that1.Violations[i]) { - return false - } - } - return true -} -func (this *PreconditionFailure_Violation) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PreconditionFailure_Violation) - if !ok { - that2, ok := that.(PreconditionFailure_Violation) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Type != that1.Type { - return false - } - if this.Subject != that1.Subject { - return false - } - if this.Description != that1.Description { - return false - } - return true -} -func (this *BadRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BadRequest) - if !ok { - that2, ok := that.(BadRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.FieldViolations) != len(that1.FieldViolations) { - return false - } - for i := range this.FieldViolations { - if !this.FieldViolations[i].Equal(that1.FieldViolations[i]) { - return false - } - } - return true -} -func (this *BadRequest_FieldViolation) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BadRequest_FieldViolation) - if !ok { - that2, ok := that.(BadRequest_FieldViolation) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Field != that1.Field { - return false - } - if this.Description != that1.Description { - return false - } - return true -} -func (this *RequestInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RequestInfo) - if !ok { - that2, ok := that.(RequestInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.RequestId != that1.RequestId { - return false - } - if this.ServingData != that1.ServingData { - return false - } - return true -} -func (this *ResourceInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ResourceInfo) - if !ok { - that2, ok := that.(ResourceInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ResourceType != that1.ResourceType { - return false - } - if this.ResourceName != that1.ResourceName { - return false - } - if this.Owner != that1.Owner { - return false - } - if this.Description != that1.Description { - return false - } - return true -} -func (this *Help) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Help) - if !ok { - that2, ok := that.(Help) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Links) != len(that1.Links) { - return false - } - for i := range this.Links { - if !this.Links[i].Equal(that1.Links[i]) { - return false - } - } - return true -} -func (this *Help_Link) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Help_Link) - if !ok { - that2, ok := that.(Help_Link) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Description != that1.Description { - return false - } - if this.Url != that1.Url { - return false - } - return true -} -func (this *LocalizedMessage) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LocalizedMessage) - if !ok { - that2, ok := that.(LocalizedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Locale != that1.Locale { - return false - } - if this.Message != that1.Message { - return false - } - return true -} -func (this *RetryInfo) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&google_rpc.RetryInfo{") - if this.RetryDelay != nil { - s = append(s, "RetryDelay: "+fmt.Sprintf("%#v", this.RetryDelay)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DebugInfo) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&google_rpc.DebugInfo{") - s = append(s, "StackEntries: "+fmt.Sprintf("%#v", this.StackEntries)+",\n") - s = append(s, "Detail: "+fmt.Sprintf("%#v", this.Detail)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *QuotaFailure) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&google_rpc.QuotaFailure{") - if this.Violations != nil { - s = append(s, "Violations: "+fmt.Sprintf("%#v", this.Violations)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *QuotaFailure_Violation) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&google_rpc.QuotaFailure_Violation{") - s = append(s, "Subject: "+fmt.Sprintf("%#v", this.Subject)+",\n") - s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *PreconditionFailure) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&google_rpc.PreconditionFailure{") - if this.Violations != nil { - s = append(s, "Violations: "+fmt.Sprintf("%#v", this.Violations)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *PreconditionFailure_Violation) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&google_rpc.PreconditionFailure_Violation{") - s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") - s = append(s, "Subject: "+fmt.Sprintf("%#v", this.Subject)+",\n") - s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *BadRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&google_rpc.BadRequest{") - if this.FieldViolations != nil { - s = append(s, "FieldViolations: "+fmt.Sprintf("%#v", this.FieldViolations)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *BadRequest_FieldViolation) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&google_rpc.BadRequest_FieldViolation{") - s = append(s, "Field: "+fmt.Sprintf("%#v", this.Field)+",\n") - s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *RequestInfo) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&google_rpc.RequestInfo{") - s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") - s = append(s, "ServingData: "+fmt.Sprintf("%#v", this.ServingData)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ResourceInfo) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&google_rpc.ResourceInfo{") - s = append(s, "ResourceType: "+fmt.Sprintf("%#v", this.ResourceType)+",\n") - s = append(s, "ResourceName: "+fmt.Sprintf("%#v", this.ResourceName)+",\n") - s = append(s, "Owner: "+fmt.Sprintf("%#v", this.Owner)+",\n") - s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Help) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&google_rpc.Help{") - if this.Links != nil { - s = append(s, "Links: "+fmt.Sprintf("%#v", this.Links)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Help_Link) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&google_rpc.Help_Link{") - s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") - s = append(s, "Url: "+fmt.Sprintf("%#v", this.Url)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *LocalizedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&google_rpc.LocalizedMessage{") - s = append(s, "Locale: "+fmt.Sprintf("%#v", this.Locale)+",\n") - s = append(s, "Message: "+fmt.Sprintf("%#v", this.Message)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringErrorDetails(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *RetryInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RetryInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RetryInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RetryDelay != nil { - { - size, err := m.RetryDelay.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintErrorDetails(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DebugInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DebugInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DebugInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Detail) > 0 { - i -= len(m.Detail) - copy(dAtA[i:], m.Detail) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Detail))) - i-- - dAtA[i] = 0x12 - } - if len(m.StackEntries) > 0 { - for iNdEx := len(m.StackEntries) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.StackEntries[iNdEx]) - copy(dAtA[i:], m.StackEntries[iNdEx]) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.StackEntries[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QuotaFailure) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QuotaFailure) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QuotaFailure) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Violations) > 0 { - for iNdEx := len(m.Violations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Violations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintErrorDetails(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QuotaFailure_Violation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QuotaFailure_Violation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QuotaFailure_Violation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PreconditionFailure) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PreconditionFailure) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PreconditionFailure) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Violations) > 0 { - for iNdEx := len(m.Violations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Violations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintErrorDetails(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *PreconditionFailure_Violation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PreconditionFailure_Violation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PreconditionFailure_Violation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x1a - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x12 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BadRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BadRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BadRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FieldViolations) > 0 { - for iNdEx := len(m.FieldViolations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FieldViolations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintErrorDetails(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *BadRequest_FieldViolation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BadRequest_FieldViolation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BadRequest_FieldViolation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if len(m.Field) > 0 { - i -= len(m.Field) - copy(dAtA[i:], m.Field) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Field))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RequestInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RequestInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ServingData) > 0 { - i -= len(m.ServingData) - copy(dAtA[i:], m.ServingData) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.ServingData))) - i-- - dAtA[i] = 0x12 - } - if len(m.RequestId) > 0 { - i -= len(m.RequestId) - copy(dAtA[i:], m.RequestId) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.RequestId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResourceInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x22 - } - if len(m.Owner) > 0 { - i -= len(m.Owner) - copy(dAtA[i:], m.Owner) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Owner))) - i-- - dAtA[i] = 0x1a - } - if len(m.ResourceName) > 0 { - i -= len(m.ResourceName) - copy(dAtA[i:], m.ResourceName) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.ResourceName))) - i-- - dAtA[i] = 0x12 - } - if len(m.ResourceType) > 0 { - i -= len(m.ResourceType) - copy(dAtA[i:], m.ResourceType) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.ResourceType))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Help) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Help) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Help) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Links) > 0 { - for iNdEx := len(m.Links) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Links[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintErrorDetails(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Help_Link) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Help_Link) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Help_Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Url) > 0 { - i -= len(m.Url) - copy(dAtA[i:], m.Url) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Url))) - i-- - dAtA[i] = 0x12 - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LocalizedMessage) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalizedMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LocalizedMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if len(m.Locale) > 0 { - i -= len(m.Locale) - copy(dAtA[i:], m.Locale) - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Locale))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintErrorDetails(dAtA []byte, offset int, v uint64) int { - offset -= sovErrorDetails(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *RetryInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RetryDelay != nil { - l = m.RetryDelay.Size() - n += 1 + l + sovErrorDetails(uint64(l)) - } - return n -} - -func (m *DebugInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.StackEntries) > 0 { - for _, s := range m.StackEntries { - l = len(s) - n += 1 + l + sovErrorDetails(uint64(l)) - } - } - l = len(m.Detail) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - return n -} - -func (m *QuotaFailure) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Violations) > 0 { - for _, e := range m.Violations { - l = e.Size() - n += 1 + l + sovErrorDetails(uint64(l)) - } - } - return n -} - -func (m *QuotaFailure_Violation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - return n -} - -func (m *PreconditionFailure) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Violations) > 0 { - for _, e := range m.Violations { - l = e.Size() - n += 1 + l + sovErrorDetails(uint64(l)) - } - } - return n -} - -func (m *PreconditionFailure_Violation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - return n -} - -func (m *BadRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.FieldViolations) > 0 { - for _, e := range m.FieldViolations { - l = e.Size() - n += 1 + l + sovErrorDetails(uint64(l)) - } - } - return n -} - -func (m *BadRequest_FieldViolation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Field) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - return n -} - -func (m *RequestInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.ServingData) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - return n -} - -func (m *ResourceInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ResourceType) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.ResourceName) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Owner) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - return n -} - -func (m *Help) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Links) > 0 { - for _, e := range m.Links { - l = e.Size() - n += 1 + l + sovErrorDetails(uint64(l)) - } - } - return n -} - -func (m *Help_Link) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Description) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Url) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - return n -} - -func (m *LocalizedMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Locale) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - return n -} - -func sovErrorDetails(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozErrorDetails(x uint64) (n int) { - return sovErrorDetails(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *RetryInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RetryInfo{`, - `RetryDelay:` + strings.Replace(fmt.Sprintf("%v", this.RetryDelay), "Duration", "types.Duration", 1) + `,`, - `}`, - }, "") - return s -} -func (this *DebugInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DebugInfo{`, - `StackEntries:` + fmt.Sprintf("%v", this.StackEntries) + `,`, - `Detail:` + fmt.Sprintf("%v", this.Detail) + `,`, - `}`, - }, "") - return s -} -func (this *QuotaFailure) String() string { - if this == nil { - return "nil" - } - repeatedStringForViolations := "[]*QuotaFailure_Violation{" - for _, f := range this.Violations { - repeatedStringForViolations += strings.Replace(fmt.Sprintf("%v", f), "QuotaFailure_Violation", "QuotaFailure_Violation", 1) + "," - } - repeatedStringForViolations += "}" - s := strings.Join([]string{`&QuotaFailure{`, - `Violations:` + repeatedStringForViolations + `,`, - `}`, - }, "") - return s -} -func (this *QuotaFailure_Violation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&QuotaFailure_Violation{`, - `Subject:` + fmt.Sprintf("%v", this.Subject) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `}`, - }, "") - return s -} -func (this *PreconditionFailure) String() string { - if this == nil { - return "nil" - } - repeatedStringForViolations := "[]*PreconditionFailure_Violation{" - for _, f := range this.Violations { - repeatedStringForViolations += strings.Replace(fmt.Sprintf("%v", f), "PreconditionFailure_Violation", "PreconditionFailure_Violation", 1) + "," - } - repeatedStringForViolations += "}" - s := strings.Join([]string{`&PreconditionFailure{`, - `Violations:` + repeatedStringForViolations + `,`, - `}`, - }, "") - return s -} -func (this *PreconditionFailure_Violation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PreconditionFailure_Violation{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Subject:` + fmt.Sprintf("%v", this.Subject) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `}`, - }, "") - return s -} -func (this *BadRequest) String() string { - if this == nil { - return "nil" - } - repeatedStringForFieldViolations := "[]*BadRequest_FieldViolation{" - for _, f := range this.FieldViolations { - repeatedStringForFieldViolations += strings.Replace(fmt.Sprintf("%v", f), "BadRequest_FieldViolation", "BadRequest_FieldViolation", 1) + "," - } - repeatedStringForFieldViolations += "}" - s := strings.Join([]string{`&BadRequest{`, - `FieldViolations:` + repeatedStringForFieldViolations + `,`, - `}`, - }, "") - return s -} -func (this *BadRequest_FieldViolation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BadRequest_FieldViolation{`, - `Field:` + fmt.Sprintf("%v", this.Field) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `}`, - }, "") - return s -} -func (this *RequestInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RequestInfo{`, - `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, - `ServingData:` + fmt.Sprintf("%v", this.ServingData) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceInfo{`, - `ResourceType:` + fmt.Sprintf("%v", this.ResourceType) + `,`, - `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, - `Owner:` + fmt.Sprintf("%v", this.Owner) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `}`, - }, "") - return s -} -func (this *Help) String() string { - if this == nil { - return "nil" - } - repeatedStringForLinks := "[]*Help_Link{" - for _, f := range this.Links { - repeatedStringForLinks += strings.Replace(fmt.Sprintf("%v", f), "Help_Link", "Help_Link", 1) + "," - } - repeatedStringForLinks += "}" - s := strings.Join([]string{`&Help{`, - `Links:` + repeatedStringForLinks + `,`, - `}`, - }, "") - return s -} -func (this *Help_Link) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Help_Link{`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `Url:` + fmt.Sprintf("%v", this.Url) + `,`, - `}`, - }, "") - return s -} -func (this *LocalizedMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LocalizedMessage{`, - `Locale:` + fmt.Sprintf("%v", this.Locale) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `}`, - }, "") - return s -} -func valueToStringErrorDetails(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *RetryInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RetryInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RetryInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryDelay", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RetryDelay == nil { - m.RetryDelay = &types.Duration{} - } - if err := m.RetryDelay.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DebugInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DebugInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DebugInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StackEntries", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StackEntries = append(m.StackEntries, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Detail = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QuotaFailure) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QuotaFailure: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuotaFailure: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Violations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Violations = append(m.Violations, &QuotaFailure_Violation{}) - if err := m.Violations[len(m.Violations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QuotaFailure_Violation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Violation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Violation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PreconditionFailure) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PreconditionFailure: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PreconditionFailure: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Violations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Violations = append(m.Violations, &PreconditionFailure_Violation{}) - if err := m.Violations[len(m.Violations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PreconditionFailure_Violation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Violation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Violation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BadRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BadRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BadRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldViolations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldViolations = append(m.FieldViolations, &BadRequest_FieldViolation{}) - if err := m.FieldViolations[len(m.FieldViolations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BadRequest_FieldViolation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FieldViolation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FieldViolation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RequestInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RequestInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServingData", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServingData = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Help) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Help: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Help: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Links = append(m.Links, &Help_Link{}) - if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Help_Link) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Link: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Link: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LocalizedMessage) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LocalizedMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LocalizedMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Locale", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Locale = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthErrorDetails - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthErrorDetails - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipErrorDetails(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthErrorDetails - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthErrorDetails - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipErrorDetails(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthErrorDetails - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthErrorDetails = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowErrorDetails = fmt.Errorf("proto: integer overflow") -) diff --git a/pkg/inject/googleapis/google/rpc/status.pb.go b/pkg/inject/googleapis/google/rpc/status.pb.go deleted file mode 100644 index 2297025f..00000000 --- a/pkg/inject/googleapis/google/rpc/status.pb.go +++ /dev/null @@ -1,590 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/rpc/status.proto - -package google_rpc - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// The `Status` type defines a logical error model that is suitable for -// different programming environments, including REST APIs and RPC APIs. It is -// used by [gRPC](https://github.com/grpc). The error model is designed to be: -// -// - Simple to use and understand for most users -// - Flexible enough to meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, error -// message, and error details. The error code should be an enum value of -// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes -// if needed. The error message should be a developer-facing English message -// that helps developers *understand* and *resolve* the error. If a localized -// user-facing error message is needed, put the localized message in the error -// details or localize it in the client. The optional error details may contain -// arbitrary information about the error. There is a predefined set of error -// detail types in the package `google.rpc` that can be used for common error -// conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error model, but it -// is not necessarily the actual wire format. When the `Status` message is -// exposed in different client libraries and different wire protocols, it can be -// mapped differently. For example, it will likely be mapped to some exceptions -// in Java, but more likely mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety of -// environments, either with or without APIs, to provide a -// consistent developer experience across different environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the client, -// it may embed the `Status` in the normal response to indicate the partial -// errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step may -// have a `Status` message for error reporting. -// -// - Batch operations. If a client uses batch request and batch response, the -// `Status` message should be used directly inside batch response, one for -// each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous operation -// results in its response, the status of those operations should be -// represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message `Status` could -// be used directly after any stripping needed for security/privacy reasons. -type Status struct { - // The status code, which should be an enum value of - // [google.rpc.Code][google.rpc.Code]. - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized - // by the client. - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - // A list of messages that carry the error details. There is a common set of - // message types for APIs to use. - Details []*types.Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"` -} - -func (m *Status) Reset() { *m = Status{} } -func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_24d244abaf643bfe, []int{0} -} -func (m *Status) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Status.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Status) XXX_Merge(src proto.Message) { - xxx_messageInfo_Status.Merge(m, src) -} -func (m *Status) XXX_Size() int { - return m.Size() -} -func (m *Status) XXX_DiscardUnknown() { - xxx_messageInfo_Status.DiscardUnknown(m) -} - -var xxx_messageInfo_Status proto.InternalMessageInfo - -func (m *Status) GetCode() int32 { - if m != nil { - return m.Code - } - return 0 -} - -func (m *Status) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *Status) GetDetails() []*types.Any { - if m != nil { - return m.Details - } - return nil -} - -func init() { - proto.RegisterType((*Status)(nil), "google.rpc.Status") -} - -func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_24d244abaf643bfe) } - -var fileDescriptor_24d244abaf643bfe = []byte{ - // 233 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x2d, 0xd6, 0x2b, 0x28, - 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x48, 0xe8, 0x15, 0x15, 0x24, 0x4b, 0x49, 0x42, 0x15, 0x81, - 0x65, 0x92, 0x4a, 0xd3, 0xf4, 0x13, 0xf3, 0x2a, 0x21, 0xca, 0x94, 0xd2, 0xb8, 0xd8, 0x82, 0xc1, - 0xda, 0x84, 0x84, 0xb8, 0x58, 0x92, 0xf3, 0x53, 0x52, 0x25, 0x18, 0x15, 0x18, 0x35, 0x58, 0x83, - 0xc0, 0x6c, 0x21, 0x09, 0x2e, 0xf6, 0xdc, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x09, 0x26, 0x05, - 0x46, 0x0d, 0xce, 0x20, 0x18, 0x57, 0x48, 0x8f, 0x8b, 0x3d, 0x25, 0xb5, 0x24, 0x31, 0x33, 0xa7, - 0x58, 0x82, 0x59, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x44, 0x0f, 0x6a, 0x21, 0xcc, 0x12, 0x3d, 0xc7, - 0xbc, 0xca, 0x20, 0x98, 0x22, 0xa7, 0xc8, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, - 0xf0, 0x50, 0x8e, 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, - 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8b, 0x47, 0x72, 0x0c, 0x1f, 0x1e, 0xc9, - 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x5c, 0x7c, - 0xc9, 0xf9, 0xb9, 0x7a, 0x08, 0x8f, 0x38, 0x71, 0x43, 0xdc, 0x1a, 0x00, 0xb2, 0x22, 0x80, 0x71, - 0x11, 0x13, 0x73, 0x50, 0x80, 0x73, 0x12, 0x1b, 0xd8, 0x46, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xc7, 0x28, 0xdc, 0x46, 0x0b, 0x01, 0x00, 0x00, -} - -func (this *Status) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Status) - if !ok { - that2, ok := that.(Status) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Code != that1.Code { - return false - } - if this.Message != that1.Message { - return false - } - if len(this.Details) != len(that1.Details) { - return false - } - for i := range this.Details { - if !this.Details[i].Equal(that1.Details[i]) { - return false - } - } - return true -} -func (this *Status) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&google_rpc.Status{") - s = append(s, "Code: "+fmt.Sprintf("%#v", this.Code)+",\n") - s = append(s, "Message: "+fmt.Sprintf("%#v", this.Message)+",\n") - if this.Details != nil { - s = append(s, "Details: "+fmt.Sprintf("%#v", this.Details)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringStatus(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *Status) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Status) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Status) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Details) > 0 { - for iNdEx := len(m.Details) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Details[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStatus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintStatus(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintStatus(dAtA []byte, offset int, v uint64) int { - offset -= sovStatus(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Status) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovStatus(uint64(m.Code)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - if len(m.Details) > 0 { - for _, e := range m.Details { - l = e.Size() - n += 1 + l + sovStatus(uint64(l)) - } - } - return n -} - -func sovStatus(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozStatus(x uint64) (n int) { - return sovStatus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Status) String() string { - if this == nil { - return "nil" - } - repeatedStringForDetails := "[]*Any{" - for _, f := range this.Details { - repeatedStringForDetails += strings.Replace(fmt.Sprintf("%v", f), "Any", "types.Any", 1) + "," - } - repeatedStringForDetails += "}" - s := strings.Join([]string{`&Status{`, - `Code:` + fmt.Sprintf("%v", this.Code) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `Details:` + repeatedStringForDetails + `,`, - `}`, - }, "") - return s -} -func valueToStringStatus(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Status) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Status: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Details = append(m.Details, &types.Any{}) - if err := m.Details[len(m.Details)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipStatus(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthStatus - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthStatus - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipStatus(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthStatus - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthStatus = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStatus = fmt.Errorf("proto: integer overflow") -) diff --git a/pkg/inject/pkg/config/mesh/mesh.go b/pkg/inject/pkg/config/mesh/mesh.go index b4c42411..8dd5f603 100644 --- a/pkg/inject/pkg/config/mesh/mesh.go +++ b/pkg/inject/pkg/config/mesh/mesh.go @@ -16,109 +16,56 @@ package mesh import ( "io/ioutil" - "time" - "github.com/gogo/protobuf/types" "github.com/hashicorp/go-multierror" - - meshconfig "github.com/polarismesh/polaris-controller/pkg/inject/api/mesh/v1alpha1" - "github.com/polarismesh/polaris-controller/pkg/inject/pkg/config/constants" - "github.com/polarismesh/polaris-controller/pkg/inject/pkg/util" + "gopkg.in/yaml.v2" ) -// DefaultProxyConfig for individual proxies -func DefaultProxyConfig() meshconfig.ProxyConfig { - return meshconfig.ProxyConfig{ - ConfigPath: constants.ConfigPathDir, - BinaryPath: constants.BinaryPathFilename, - ServiceCluster: constants.ServiceClusterName, - DrainDuration: types.DurationProto(45 * time.Second), - ParentShutdownDuration: types.DurationProto(60 * time.Second), - DiscoveryAddress: constants.DiscoveryPlainAddress, - ConnectTimeout: types.DurationProto(1 * time.Second), - StatsdUdpAddress: "", - EnvoyMetricsService: &meshconfig.RemoteService{Address: ""}, - EnvoyAccessLogService: &meshconfig.RemoteService{Address: ""}, - ProxyAdminPort: 15000, - ControlPlaneAuthPolicy: meshconfig.AuthenticationPolicy_NONE, - CustomConfigFile: "", - Concurrency: 0, - StatNameLength: 189, - Tracing: nil, - } +type MeshConfig struct { + DefaultConfig *DefaultConfig `yaml:"defaultConfig"` } -// DefaultMeshConfig configuration -func DefaultMeshConfig() meshconfig.MeshConfig { - proxyConfig := DefaultProxyConfig() - return meshconfig.MeshConfig{ - MixerCheckServer: "", - MixerReportServer: "", - DisablePolicyChecks: true, - PolicyCheckFailOpen: false, - SidecarToTelemetrySessionAffinity: false, - RootNamespace: constants.IstioSystemNamespace, - ProxyListenPort: 15001, - ConnectTimeout: types.DurationProto(1 * time.Second), - IngressService: "istio-ingressgateway", - EnableTracing: true, - AccessLogFile: "/dev/stdout", - AccessLogEncoding: meshconfig.MeshConfig_TEXT, - DefaultConfig: &proxyConfig, - SdsUdsPath: "", - EnableSdsTokenMount: false, - TrustDomain: "", - TrustDomainAliases: []string{}, - DefaultServiceExportTo: []string{"*"}, - DefaultVirtualServiceExportTo: []string{"*"}, - DefaultDestinationRuleExportTo: []string{"*"}, - OutboundTrafficPolicy: &meshconfig.MeshConfig_OutboundTrafficPolicy{Mode: meshconfig.MeshConfig_OutboundTrafficPolicy_ALLOW_ANY}, - DnsRefreshRate: types.DurationProto(5 * time.Second), // 5 seconds is the default refresh rate used in Envoy - ProtocolDetectionTimeout: types.DurationProto(100 * time.Millisecond), - EnableAutoMtls: &types.BoolValue{Value: false}, +func (m *MeshConfig) Clone() *MeshConfig { + copyData := &MeshConfig{ + DefaultConfig: &DefaultConfig{ + ProxyMetadata: map[string]string{}, + }, } -} -// ApplyMeshConfig returns a new MeshConfig decoded from the -// input YAML with the provided defaults applied to omitted configuration values. -func ApplyMeshConfig(yaml string, defaultConfig meshconfig.MeshConfig) (*meshconfig.MeshConfig, error) { - if err := util.ApplyYAML(yaml, &defaultConfig); err != nil { - return nil, multierror.Prefix(err, "failed to convert to proto.") + for k, v := range m.DefaultConfig.ProxyMetadata { + copyData.DefaultConfig.ProxyMetadata[k] = v } + return copyData +} - // Reset the default ProxyConfig as jsonpb.UnmarshalString doesn't - // handled nested decode properly for our use case. - prevDefaultConfig := defaultConfig.DefaultConfig - defaultProxyConfig := DefaultProxyConfig() - defaultConfig.DefaultConfig = &defaultProxyConfig +type DefaultConfig struct { + ProxyMetadata map[string]string `yaml:"proxyMetadata"` +} - // Re-apply defaults to ProxyConfig if they were defined in the - // original input MeshConfig.ProxyConfig. - if prevDefaultConfig != nil { - origProxyConfigYAML, err := util.ToYAML(prevDefaultConfig) - if err != nil { - return nil, multierror.Prefix(err, "failed to re-encode default proxy config") - } - if err := util.ApplyYAML(origProxyConfigYAML, defaultConfig.DefaultConfig); err != nil { - return nil, multierror.Prefix(err, "failed to convert to proto.") - } +// DefaultMeshConfig configuration +func DefaultMeshConfig() MeshConfig { + return MeshConfig{ + DefaultConfig: &DefaultConfig{ + ProxyMetadata: map[string]string{}, + }, } +} - //if err := validation.ValidateMeshConfig(&defaultConfig); err != nil { - // return nil, err - //} - +// ApplyMeshConfig returns a new MeshConfig decoded from the +// input YAML with the provided defaults applied to omitted configuration values. +func ApplyMeshConfig(str string, defaultConfig MeshConfig) (*MeshConfig, error) { + yaml.Unmarshal([]byte(str), &defaultConfig) return &defaultConfig, nil } // ApplyMeshConfigDefaults returns a new MeshConfig decoded from the // input YAML with defaults applied to omitted configuration values. -func ApplyMeshConfigDefaults(yaml string) (*meshconfig.MeshConfig, error) { +func ApplyMeshConfigDefaults(yaml string) (*MeshConfig, error) { return ApplyMeshConfig(yaml, DefaultMeshConfig()) } // ReadMeshConfig gets mesh configuration from a config file -func ReadMeshConfig(filename string) (*meshconfig.MeshConfig, error) { +func ReadMeshConfig(filename string) (*MeshConfig, error) { yaml, err := ioutil.ReadFile(filename) if err != nil { return nil, multierror.Prefix(err, "cannot read mesh config file") diff --git a/pkg/inject/pkg/kube/inject/inject.go b/pkg/inject/pkg/kube/inject/inject.go index e35fb2fc..2dce861e 100644 --- a/pkg/inject/pkg/kube/inject/inject.go +++ b/pkg/inject/pkg/kube/inject/inject.go @@ -41,7 +41,7 @@ import ( "github.com/polarismesh/polaris-controller/common/log" "github.com/polarismesh/polaris-controller/pkg/inject/api/annotation" - meshconfig "github.com/polarismesh/polaris-controller/pkg/inject/api/mesh/v1alpha1" + "github.com/polarismesh/polaris-controller/pkg/inject/pkg/config/mesh" "github.com/polarismesh/polaris-controller/pkg/util" utils "github.com/polarismesh/polaris-controller/pkg/util" ) @@ -58,7 +58,6 @@ var ( annotation.SidecarInject.Name: alwaysValidFunc, annotation.SidecarStatus.Name: alwaysValidFunc, annotation.SidecarRewriteAppHTTPProbers.Name: alwaysValidFunc, - annotation.SidecarControlPlaneAuthPolicy.Name: alwaysValidFunc, annotation.SidecarDiscoveryAddress.Name: alwaysValidFunc, annotation.SidecarProxyImage.Name: alwaysValidFunc, annotation.SidecarProxyCPU.Name: alwaysValidFunc, @@ -137,8 +136,7 @@ type SidecarTemplateData struct { DeploymentMeta *metav1.ObjectMeta ObjectMeta *metav1.ObjectMeta Spec *corev1.PodSpec - ProxyConfig *meshconfig.ProxyConfig - MeshConfig *meshconfig.MeshConfig + ProxyConfig *mesh.DefaultConfig Values map[string]interface{} } @@ -443,7 +441,7 @@ func flippedContains(needle, haystack string) bool { // InjectionData renders sidecarTemplate with valuesConfig. func InjectionData(sidecarTemplate, valuesConfig, version string, typeMetadata *metav1.TypeMeta, deploymentMetadata *metav1.ObjectMeta, spec *corev1.PodSpec, - metadata *metav1.ObjectMeta, proxyConfig *meshconfig.ProxyConfig, meshConfig *meshconfig.MeshConfig) ( + metadata *metav1.ObjectMeta, proxyConfig *mesh.DefaultConfig) ( *SidecarInjectionSpec, map[string]string, string, error) { // If DNSPolicy is not ClusterFirst, the Envoy sidecar may not able to connect to polaris. if spec.DNSPolicy != "" && spec.DNSPolicy != corev1.DNSClusterFirst { @@ -484,6 +482,7 @@ func InjectionData(sidecarTemplate, valuesConfig, version string, typeMetadata * // 按需加载能力需要显示开启 if val, ok := metadata.Annotations["sidecar.polarismesh.cn/openOnDemand"]; ok { envoyMetadata["sidecar.polarismesh.cn/openOnDemand"] = val + proxyConfig.ProxyMetadata["OPEN_DEMAND"] = val } } // 这里需要将 sidecar 所属的服务信息注入到 annonation 中,方便下发到 envoy 的 bootstrap.yaml 中 @@ -514,7 +513,6 @@ func InjectionData(sidecarTemplate, valuesConfig, version string, typeMetadata * ObjectMeta: metadataCopy, Spec: spec, ProxyConfig: proxyConfig, - MeshConfig: meshConfig, Values: values, } diff --git a/pkg/inject/pkg/kube/inject/webhook.go b/pkg/inject/pkg/kube/inject/webhook.go index 2faa0d76..8897a477 100644 --- a/pkg/inject/pkg/kube/inject/webhook.go +++ b/pkg/inject/pkg/kube/inject/webhook.go @@ -46,7 +46,6 @@ import ( "github.com/polarismesh/polaris-controller/common" "github.com/polarismesh/polaris-controller/common/log" "github.com/polarismesh/polaris-controller/pkg/inject/api/annotation" - meshconfig "github.com/polarismesh/polaris-controller/pkg/inject/api/mesh/v1alpha1" "github.com/polarismesh/polaris-controller/pkg/inject/pkg/config/mesh" utils "github.com/polarismesh/polaris-controller/pkg/util" ) @@ -75,7 +74,7 @@ type Webhook struct { sidecarMeshTemplateVersion string sidecarDnsConfig *Config sidecarDnsTemplateVersion string - meshConfig *meshconfig.MeshConfig + meshConfig *mesh.MeshConfig valuesConfig string healthCheckInterval time.Duration @@ -97,7 +96,7 @@ type Webhook struct { // env will be used for other things besides meshConfig - when webhook is running in Istiod it can take advantage // of the config and endpoint cache. // nolint directives: interfacer -func loadConfig(injectMeshFile, injectDnsFile, meshFile, valuesFile string) (*Config, *Config, *meshconfig.MeshConfig, string, error) { +func loadConfig(injectMeshFile, injectDnsFile, meshFile, valuesFile string) (*Config, *Config, *mesh.MeshConfig, string, error) { // 处理 polaris-sidecar mesh 模式的注入 meshData, err := ioutil.ReadFile(injectMeshFile) if err != nil { @@ -837,21 +836,6 @@ func (wh *Webhook) injectV1beta1(ar *v1beta1.AdmissionReview) *v1beta1.Admission Allowed: true, } } - - // due to bug https://github.com/kubernetes/kubernetes/issues/57923, - // k8s sa jwt token volume mount file is only accessible to root user, not istio-proxy(the user that istio proxy runs as). - // workaround by https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod - if wh.meshConfig.SdsUdsPath != "" { - grp := int64(1337) - if pod.Spec.SecurityContext == nil { - pod.Spec.SecurityContext = &corev1.PodSecurityContext{ - FSGroup: &grp, - } - } else { - pod.Spec.SecurityContext.FSGroup = &grp - } - } - // try to capture more useful namespace/name info for deployments, etc. // TODO(dougreid): expand to enable lookup of OWNERs recursively a la kubernetesenv deployMeta := pod.ObjectMeta.DeepCopy() @@ -894,7 +878,7 @@ func (wh *Webhook) injectV1beta1(ar *v1beta1.AdmissionReview) *v1beta1.Admission } proxyCfg := wh.meshConfig.DefaultConfig spec, annotations, iStatus, err := InjectionData(config.Template, wh.valuesConfig, tempVersion, typeMetadata, - deployMeta, &pod.Spec, &pod.ObjectMeta, proxyCfg, wh.meshConfig) // nolint: lll + deployMeta, &pod.Spec, &pod.ObjectMeta, proxyCfg) // nolint: lll if err != nil { handleError(fmt.Sprintf("Injection data: err=%v spec=%v\n", err, iStatus)) return toV1beta1AdmissionResponse(err) @@ -974,20 +958,6 @@ func (wh *Webhook) injectV1(ar *v1.AdmissionReview) *v1.AdmissionResponse { } } - // due to bug https://github.com/kubernetes/kubernetes/issues/57923, - // k8s sa jwt token volume mount file is only accessible to root user, not istio-proxy(the user that istio proxy runs as). - // workaround by https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod - if wh.meshConfig.SdsUdsPath != "" { - grp := int64(1337) - if pod.Spec.SecurityContext == nil { - pod.Spec.SecurityContext = &corev1.PodSecurityContext{ - FSGroup: &grp, - } - } else { - pod.Spec.SecurityContext.FSGroup = &grp - } - } - // try to capture more useful namespace/name info for deployments, etc. // TODO(dougreid): expand to enable lookup of OWNERs recursively a la kubernetesenv deployMeta := pod.ObjectMeta.DeepCopy() @@ -1029,8 +999,9 @@ func (wh *Webhook) injectV1(ar *v1.AdmissionReview) *v1.AdmissionResponse { deployMeta.Name = pod.Name } + copyProxyCfg := wh.meshConfig.Clone() spec, annotations, iStatus, err := InjectionData(config.Template, wh.valuesConfig, tempVersion, typeMetadata, deployMeta, - &pod.Spec, &pod.ObjectMeta, wh.meshConfig.DefaultConfig, wh.meshConfig) + &pod.Spec, &pod.ObjectMeta, copyProxyCfg.DefaultConfig) if err != nil { handleError(fmt.Sprintf("Injection data: err=%v spec=%v\n", err, iStatus)) return toV1AdmissionResponse(err) diff --git a/sidecar/envoy-bootstrap-config-generator/bootstrap_template.yaml b/sidecar/envoy-bootstrap-config-generator/bootstrap_template.yaml index 7b8a5b73..1e56f88a 100644 --- a/sidecar/envoy-bootstrap-config-generator/bootstrap_template.yaml +++ b/sidecar/envoy-bootstrap-config-generator/bootstrap_template.yaml @@ -58,6 +58,9 @@ dynamic_resources: grpc_services: envoy_grpc: cluster_name: polaris_xds_server + cds_config: + ads: {} + resource_api_version: V3 ads_config: api_type: DELTA_GRPC transport_api_version: V3 diff --git a/sidecar/envoy-bootstrap-config-generator/bootstrap_template_odcds.yaml b/sidecar/envoy-bootstrap-config-generator/bootstrap_template_odcds.yaml new file mode 100644 index 00000000..7b8a5b73 --- /dev/null +++ b/sidecar/envoy-bootstrap-config-generator/bootstrap_template_odcds.yaml @@ -0,0 +1,72 @@ +# Tencent is pleased to support the open source community by making Polaris available. +# +# Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. +# +# Licensed under the BSD 3-Clause License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://opensource.org/licenses/BSD-3-Clause +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. + +node: + id: "ENVOY_NODE_ID" + cluster: "CLUSTER_NAME" + metadata: METADATA +static_resources: + clusters: + - name: polaris_xds_server + connect_timeout: 5s + typed_extension_protocol_options: + envoy.extensions.upstreams.http.v3.HttpProtocolOptions: + "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions + explicit_http_config: + http2_protocol_options: {} + type: STRICT_DNS + load_assignment: + cluster_name: polaris_xds_server + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: POLARIS_SERVER_HOST + port_value: POLARIS_SERVER_PORT + - name: polaris_ratelimit + type: STATIC + connect_timeout: 1s + lb_policy: ROUND_ROBIN + protocol_selection: USE_CONFIGURED_PROTOCOL + http2_protocol_options: {} + load_assignment: + cluster_name: polaris_ratelimit + endpoints: + - lbEndpoints: + - endpoint: + address: + pipe: + path: /var/run/polaris/ratelimit/rls.sock +dynamic_resources: + lds_config: + api_config_source: + api_type: DELTA_GRPC + transport_api_version: V3 + grpc_services: + envoy_grpc: + cluster_name: polaris_xds_server + ads_config: + api_type: DELTA_GRPC + transport_api_version: V3 + grpc_services: + envoy_grpc: + cluster_name: polaris_xds_server +admin: + access_log_path: /dev/stdout + address: + socket_address: + address: 127.0.0.1 + port_value: 15000 \ No newline at end of file diff --git a/sidecar/envoy-bootstrap-config-generator/bootstrap_template_tls.yaml b/sidecar/envoy-bootstrap-config-generator/bootstrap_template_tls.yaml index eb86cb9e..fb5c6e08 100644 --- a/sidecar/envoy-bootstrap-config-generator/bootstrap_template_tls.yaml +++ b/sidecar/envoy-bootstrap-config-generator/bootstrap_template_tls.yaml @@ -74,6 +74,9 @@ dynamic_resources: grpc_services: envoy_grpc: cluster_name: polaris_xds_server + cds_config: + ads: {} + resource_api_version: V3 ads_config: api_type: DELTA_GRPC transport_api_version: V3 diff --git a/sidecar/envoy-bootstrap-config-generator/bootstrap_template_tls_odcds.yaml b/sidecar/envoy-bootstrap-config-generator/bootstrap_template_tls_odcds.yaml new file mode 100644 index 00000000..eb86cb9e --- /dev/null +++ b/sidecar/envoy-bootstrap-config-generator/bootstrap_template_tls_odcds.yaml @@ -0,0 +1,88 @@ +# Tencent is pleased to support the open source community by making Polaris available. +# +# Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. +# +# Licensed under the BSD 3-Clause License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://opensource.org/licenses/BSD-3-Clause +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. + +node: + id: "ENVOY_NODE_ID" + cluster: "CLUSTER_NAME" + metadata: METADATA +static_resources: + clusters: + - name: sds-grpc + connectTimeout: 0.250s + type: STATIC + typed_extension_protocol_options: + envoy.extensions.upstreams.http.v3.HttpProtocolOptions: + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions" + explicit_http_config: + http2_protocol_options: {} + loadAssignment: + clusterName: sds-grpc + endpoints: + - lbEndpoints: + - endpoint: + address: + pipe: + path: /var/run/polaris/mtls/sds.sock + - name: polaris_xds_server + connect_timeout: 5s + typed_extension_protocol_options: + envoy.extensions.upstreams.http.v3.HttpProtocolOptions: + "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions + explicit_http_config: + http2_protocol_options: {} + type: STRICT_DNS + load_assignment: + cluster_name: polaris_xds_server + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: POLARIS_SERVER_HOST + port_value: POLARIS_SERVER_PORT + - name: polaris_ratelimit + type: STATIC + connect_timeout: 1s + lb_policy: ROUND_ROBIN + protocol_selection: USE_CONFIGURED_PROTOCOL + http2_protocol_options: {} + load_assignment: + cluster_name: polaris_ratelimit + endpoints: + - lbEndpoints: + - endpoint: + address: + pipe: + path: /var/run/polaris/ratelimit/rls.sock +dynamic_resources: + lds_config: + api_config_source: + api_type: DELTA_GRPC + transport_api_version: V3 + grpc_services: + envoy_grpc: + cluster_name: polaris_xds_server + ads_config: + api_type: DELTA_GRPC + transport_api_version: V3 + grpc_services: + envoy_grpc: + cluster_name: polaris_xds_server +admin: + access_log_path: /dev/stdout + address: + socket_address: + address: 127.0.0.1 + port_value: 15000 \ No newline at end of file diff --git a/sidecar/envoy-bootstrap-config-generator/start.sh b/sidecar/envoy-bootstrap-config-generator/start.sh index 3a1972e5..af249678 100755 --- a/sidecar/envoy-bootstrap-config-generator/start.sh +++ b/sidecar/envoy-bootstrap-config-generator/start.sh @@ -18,32 +18,37 @@ set -ex readonly PACKAGE_DIRECTORY=$(dirname "$0") BOOTSTRAP_TEMPLATE="${PACKAGE_DIRECTORY}/bootstrap_template.yaml" readonly BOOTSTRAP_INSTANCE="${PACKAGE_DIRECTORY}/bootstrap_instance.yaml" +OPEN_DEMAND=${OPEN_DEMAND} +if [[ "${OPEN_DEMAND}" == "true" ]]; then + BOOTSTRAP_TEMPLATE="${PACKAGE_DIRECTORY}/bootstrap_template_odcds.yaml" +fi function prepare_envoy() { # Generate Envoy bootstrap. # namespace/$uuidgen~$tlsmode~$hostname envoy_node_id="sidecar~${NAMESPACE}/${POD_NAME}~${INSTANCE_IP}" - if [[ -v TLS_MODE ]] - then + if [[ -v TLS_MODE ]]; then BOOTSTRAP_TEMPLATE="${PACKAGE_DIRECTORY}/bootstrap_template_tls.yaml" - fi - cat "${BOOTSTRAP_TEMPLATE}" \ - | sed -e "s|ENVOY_NODE_ID|${envoy_node_id}|g" \ - | sed -e "s|CLUSTER_NAME|${CLUSTER_NAME}|g" \ - | sed -e "s|POLARIS_SERVER_URL|${POLARIS_SERVER_URL}|g" \ - | sed -e "s|POLARIS_SERVER_HOST|${POLARIS_SERVER_HOST}|g" \ - | sed -e "s|POLARIS_SERVER_PORT|${POLARIS_SERVER_PORT}|g" \ - | sed -e "s|METADATA|${METADATA}|g" \ - > "${BOOTSTRAP_INSTANCE}" + if [[ "${OPEN_DEMAND}" == "true" ]]; then + BOOTSTRAP_TEMPLATE="${PACKAGE_DIRECTORY}/bootstrap_template_tls_odcds.yaml" + fi + fi + cat "${BOOTSTRAP_TEMPLATE}" | + sed -e "s|ENVOY_NODE_ID|${envoy_node_id}|g" | + sed -e "s|CLUSTER_NAME|${CLUSTER_NAME}|g" | + sed -e "s|POLARIS_SERVER_URL|${POLARIS_SERVER_URL}|g" | + sed -e "s|POLARIS_SERVER_HOST|${POLARIS_SERVER_HOST}|g" | + sed -e "s|POLARIS_SERVER_PORT|${POLARIS_SERVER_PORT}|g" | + sed -e "s|METADATA|${METADATA}|g" \ + >"${BOOTSTRAP_INSTANCE}" } -printenv polaris-client-config > /data/polaris-client-config/polaris.yaml +printenv polaris-client-config >/data/polaris-client-config/polaris.yaml prepare_envoy -if [[ -v DEBUG_MODE ]] -then - cat "${BOOTSTRAP_INSTANCE}" +if [[ -v DEBUG_MODE ]]; then + cat "${BOOTSTRAP_INSTANCE}" fi mv "${BOOTSTRAP_INSTANCE}" /var/lib/data/envoy.yaml