use istio client-go library instead of knative bump kubernetes dependency version change code coverage to codecov
5437 lines
150 KiB
Go
5437 lines
150 KiB
Go
// 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
|
|
// ```
|
|
//
|
|
// 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
|
|
// ```
|
|
//
|
|
// **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
|
|
// ```
|
|
|
|
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"
|
|
_ "istio.io/gogo-genproto/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.
|
|
//
|
|
// <!-- go code generation tags
|
|
// +kubetype-gen
|
|
// +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
|
|
// +genclient
|
|
// +k8s:deepcopy-gen=true
|
|
// -->
|
|
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
|
|
// ```
|
|
//
|
|
// **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
|
|
// ```
|
|
//
|
|
// 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
|
|
// ```
|
|
//
|
|
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"`
|
|
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
|
|
}
|
|
|
|
// 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
|
|
// ```
|
|
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, there is no idle timeout. 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
|
|
// ```
|
|
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.
|
|
ConsecutiveErrors int32 `protobuf:"varint,1,opt,name=consecutive_errors,json=consecutiveErrors,proto3" json:"consecutive_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
|
|
|
|
func (m *OutlierDetection) GetConsecutiveErrors() int32 {
|
|
if m != nil {
|
|
return m.ConsecutiveErrors
|
|
}
|
|
return 0
|
|
}
|
|
|
|
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
|
|
// ```
|
|
//
|
|
// 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
|
|
// ```
|
|
//
|
|
// 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
|
|
// ```
|
|
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 ""
|
|
}
|
|
|
|
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")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("networking/v1alpha3/destination_rule.proto", fileDescriptor_12899beb695152c8)
|
|
}
|
|
|
|
var fileDescriptor_12899beb695152c8 = []byte{
|
|
// 1514 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6e, 0xdb, 0xc6,
|
|
0x16, 0xb6, 0x7e, 0x6d, 0x1d, 0xd9, 0x12, 0x3d, 0xd7, 0x48, 0x14, 0x05, 0x70, 0x7c, 0x85, 0x8b,
|
|
0x1b, 0xdf, 0xdc, 0x86, 0x6e, 0x94, 0x16, 0x48, 0x93, 0xa6, 0x8d, 0x64, 0xa9, 0x96, 0x1b, 0x59,
|
|
0x12, 0x46, 0x32, 0x50, 0x64, 0x43, 0x8c, 0xa8, 0xb1, 0x34, 0x31, 0xc5, 0x61, 0xc9, 0xa1, 0x6a,
|
|
0xe7, 0x19, 0xba, 0xe9, 0xa6, 0xe8, 0xb6, 0x2f, 0xd0, 0xe7, 0xe8, 0xae, 0x5d, 0xb4, 0x9b, 0x6e,
|
|
0x1a, 0xe4, 0x19, 0xba, 0x2a, 0x50, 0xa0, 0x98, 0x21, 0x29, 0xc9, 0x8e, 0x63, 0xc7, 0x70, 0xb3,
|
|
0x9b, 0x39, 0xe7, 0x3b, 0xdf, 0xfc, 0x9c, 0x8f, 0xe7, 0x0c, 0xe1, 0x8e, 0x4d, 0xc5, 0x57, 0xdc,
|
|
0x3d, 0x64, 0xf6, 0x70, 0x6b, 0x72, 0x8f, 0x58, 0xce, 0x88, 0xdc, 0xdf, 0x1a, 0x50, 0x4f, 0x30,
|
|
0x9b, 0x08, 0xc6, 0x6d, 0xc3, 0xf5, 0x2d, 0xaa, 0x3b, 0x2e, 0x17, 0x1c, 0xdd, 0x60, 0x9e, 0x60,
|
|
0x5c, 0x9f, 0x45, 0xe8, 0x51, 0x44, 0xf1, 0xd6, 0x90, 0xf3, 0xa1, 0x45, 0xb7, 0x88, 0xc3, 0xb6,
|
|
0x0e, 0x18, 0xb5, 0x06, 0x46, 0x9f, 0x8e, 0xc8, 0x84, 0x71, 0x37, 0x88, 0x2d, 0xae, 0x87, 0x00,
|
|
0x35, 0xeb, 0xfb, 0x07, 0x5b, 0x03, 0xdf, 0x55, 0x0b, 0x84, 0xfe, 0xff, 0x9d, 0xb5, 0x8f, 0x09,
|
|
0x73, 0x85, 0x4f, 0x2c, 0xc3, 0xa3, 0xee, 0x84, 0x99, 0xe1, 0x36, 0x8a, 0x6b, 0x43, 0x3e, 0xe4,
|
|
0x6a, 0xb8, 0x25, 0x47, 0x81, 0xb5, 0xf4, 0x6b, 0x0c, 0xf2, 0xb5, 0xd9, 0xbe, 0xb1, 0x6f, 0x51,
|
|
0x74, 0x1d, 0x92, 0x23, 0xee, 0x89, 0x42, 0x6c, 0x23, 0xb6, 0x99, 0xa9, 0x26, 0x5e, 0x56, 0xe2,
|
|
0x58, 0x19, 0x50, 0x1b, 0x72, 0xc2, 0x25, 0x07, 0x07, 0xcc, 0x34, 0x1c, 0x6e, 0x31, 0xf3, 0xb8,
|
|
0x10, 0xdf, 0x88, 0x6d, 0x66, 0xcb, 0x9b, 0xfa, 0x1b, 0x8f, 0xa8, 0xf7, 0x82, 0x80, 0x8e, 0xc2,
|
|
0xe3, 0x15, 0x31, 0x3f, 0x45, 0x8f, 0x60, 0xd1, 0xf3, 0xfb, 0x1e, 0x15, 0x5e, 0x21, 0xb1, 0x91,
|
|
0xd8, 0xcc, 0x96, 0xff, 0x7d, 0x0e, 0x53, 0x57, 0x21, 0x71, 0x14, 0x81, 0x6e, 0x42, 0x86, 0x1e,
|
|
0x39, 0xdc, 0x15, 0x86, 0xe0, 0x85, 0xe4, 0x46, 0x62, 0x33, 0x83, 0x97, 0x02, 0x43, 0x8f, 0x97,
|
|
0x7e, 0x4b, 0xc3, 0xca, 0x89, 0xa5, 0x51, 0x0f, 0x56, 0x2c, 0x4e, 0x06, 0x46, 0x9f, 0x58, 0xc4,
|
|
0x36, 0xa9, 0xab, 0x8e, 0x97, 0x2d, 0x6f, 0x9d, 0xb3, 0x62, 0x93, 0x93, 0x41, 0x35, 0x84, 0x77,
|
|
0xa9, 0x10, 0xcc, 0x1e, 0x7a, 0x78, 0xd9, 0x9a, 0xb3, 0xa2, 0x67, 0x90, 0x37, 0xb9, 0x6d, 0x53,
|
|
0x53, 0x65, 0xdd, 0xe1, 0xdc, 0x0a, 0xef, 0xe4, 0xde, 0x39, 0xbc, 0xdb, 0xd3, 0x88, 0x0e, 0xe7,
|
|
0xd6, 0x94, 0x39, 0x67, 0x9e, 0xb0, 0xa3, 0x2f, 0x60, 0x95, 0xfb, 0xc2, 0x62, 0xd4, 0x35, 0x06,
|
|
0x54, 0x04, 0x8e, 0x42, 0x42, 0xb1, 0xff, 0xff, 0x1c, 0xf6, 0x76, 0x10, 0x53, 0x8b, 0x42, 0xb0,
|
|
0xc6, 0x4f, 0x59, 0xd0, 0x03, 0x48, 0x08, 0xcb, 0x2b, 0x24, 0x15, 0xd7, 0x7f, 0xcf, 0xcb, 0x5e,
|
|
0xb3, 0x3b, 0xdd, 0x9e, 0x0c, 0x41, 0xcf, 0xe1, 0x5f, 0xea, 0xca, 0x2d, 0x3a, 0xa1, 0x52, 0x61,
|
|
0x81, 0xaf, 0x90, 0x52, 0xd9, 0x7b, 0xf8, 0xb6, 0x3a, 0xd0, 0x3b, 0x32, 0x4b, 0x27, 0x94, 0xb1,
|
|
0x2a, 0x69, 0x9b, 0x92, 0x35, 0x5a, 0xb0, 0xf8, 0x6d, 0x02, 0x56, 0x5f, 0x03, 0xa2, 0x47, 0x90,
|
|
0x94, 0xd0, 0x30, 0x7d, 0xb7, 0xcf, 0x59, 0x52, 0xc6, 0x76, 0xa9, 0x45, 0x4d, 0xc1, 0x5d, 0xac,
|
|
0x82, 0x5e, 0x17, 0x41, 0xfc, 0x1d, 0x89, 0x20, 0xf1, 0x4e, 0x45, 0x90, 0xfc, 0x07, 0x45, 0x90,
|
|
0xba, 0xb4, 0x08, 0x4a, 0x7f, 0xc4, 0x20, 0x1d, 0x7c, 0x8d, 0xb2, 0x56, 0xd8, 0x64, 0x4c, 0x4f,
|
|
0xd4, 0x0a, 0x69, 0x40, 0x75, 0x48, 0x5b, 0xa4, 0x4f, 0x2d, 0xaf, 0x10, 0x57, 0xda, 0xb8, 0x7b,
|
|
0xe1, 0x97, 0xad, 0x37, 0x15, 0xbe, 0x6e, 0x0b, 0xf7, 0x18, 0x87, 0xc1, 0x67, 0x94, 0x9c, 0xc4,
|
|
0x95, 0x4a, 0x4e, 0xf1, 0x23, 0xc8, 0xce, 0xad, 0x83, 0x34, 0x48, 0x1c, 0xd2, 0xe3, 0x60, 0xfb,
|
|
0x58, 0x0e, 0xd1, 0x1a, 0xa4, 0x26, 0xc4, 0xf2, 0xa9, 0x92, 0x46, 0x06, 0x07, 0x93, 0x87, 0xf1,
|
|
0x07, 0xb1, 0xd2, 0x0f, 0x29, 0x58, 0x3b, 0x4b, 0x0d, 0x08, 0x43, 0xda, 0x63, 0x63, 0xc7, 0x0a,
|
|
0xae, 0x21, 0x57, 0x7e, 0x70, 0x49, 0x39, 0xe9, 0x5d, 0x15, 0xdd, 0xac, 0x36, 0x16, 0x70, 0xc8,
|
|
0x84, 0x0e, 0x95, 0xa6, 0x3c, 0xe6, 0x09, 0x6a, 0x0b, 0x63, 0x44, 0xbc, 0x51, 0xa8, 0xd5, 0x27,
|
|
0x97, 0x25, 0xdf, 0x9e, 0xd2, 0x34, 0x88, 0x37, 0x52, 0x8b, 0xe4, 0xcc, 0x13, 0xb6, 0xe2, 0x5f,
|
|
0x71, 0xd0, 0x4e, 0xc3, 0xd0, 0x1d, 0xd0, 0x46, 0x42, 0x38, 0xc6, 0x88, 0x92, 0x01, 0x75, 0x8d,
|
|
0x59, 0x9a, 0x25, 0x81, 0xf4, 0x34, 0x94, 0xa3, 0x25, 0xb3, 0x6d, 0x43, 0x56, 0x61, 0x4d, 0xce,
|
|
0x0f, 0x19, 0x0d, 0x77, 0xfa, 0xf4, 0xaa, 0x3b, 0xd5, 0x1b, 0xbd, 0x5e, 0x67, 0x5b, 0x51, 0x36,
|
|
0x16, 0x30, 0xc8, 0x15, 0x82, 0x19, 0xfa, 0x0f, 0xac, 0xf8, 0x1e, 0x35, 0x3c, 0xee, 0xbb, 0x26,
|
|
0x35, 0x98, 0xa3, 0x54, 0xb1, 0xd4, 0x58, 0xc0, 0x59, 0xdf, 0xa3, 0x5d, 0x65, 0xdd, 0x75, 0xd0,
|
|
0x1d, 0x58, 0x1d, 0x33, 0x9b, 0x8d, 0xfd, 0xb1, 0xe1, 0x32, 0x7b, 0x68, 0x78, 0xec, 0x05, 0x55,
|
|
0xdf, 0x4e, 0x12, 0xe7, 0x43, 0x07, 0x66, 0xf6, 0xb0, 0xcb, 0x5e, 0xd0, 0x22, 0x07, 0x98, 0xad,
|
|
0xf6, 0x66, 0x59, 0x23, 0x48, 0x3a, 0x44, 0x8c, 0x42, 0x71, 0xa8, 0x31, 0xfa, 0x00, 0x12, 0x42,
|
|
0x44, 0x9f, 0xfc, 0x0d, 0x3d, 0x68, 0xd9, 0x7a, 0xd4, 0xb2, 0xf5, 0x5a, 0xd8, 0xb2, 0xab, 0x8b,
|
|
0x2f, 0x2b, 0xf1, 0xef, 0x7e, 0xbf, 0x15, 0xc3, 0x12, 0x5e, 0x05, 0x58, 0x92, 0x59, 0x35, 0x0e,
|
|
0xe9, 0x71, 0xa9, 0x01, 0x4b, 0x91, 0x04, 0x50, 0x1e, 0xb2, 0xb8, 0xbd, 0xdf, 0xaa, 0x19, 0xb8,
|
|
0x5d, 0xdd, 0x6d, 0x69, 0x0b, 0x28, 0x07, 0xd0, 0xac, 0x57, 0xba, 0x3d, 0x63, 0xbb, 0xdd, 0x6a,
|
|
0x69, 0x31, 0x04, 0x90, 0xc6, 0x95, 0x56, 0xad, 0xbd, 0xa7, 0xc5, 0x25, 0xb8, 0x53, 0xe9, 0x76,
|
|
0x7b, 0x0d, 0xdc, 0xde, 0xdf, 0x69, 0x68, 0x89, 0x6a, 0x16, 0x32, 0x56, 0x3f, 0xfc, 0x54, 0x4a,
|
|
0xdf, 0x2c, 0xc1, 0xb5, 0xb3, 0xcb, 0x0c, 0x6a, 0x43, 0x42, 0x98, 0x4e, 0x58, 0x44, 0x1f, 0x5f,
|
|
0xba, 0x4c, 0xe9, 0xbd, 0xed, 0xce, 0x5c, 0x4d, 0x30, 0x1d, 0x84, 0x21, 0x29, 0xf3, 0x13, 0xa6,
|
|
0xfe, 0x93, 0xcb, 0x33, 0xca, 0xdb, 0x9f, 0x52, 0x2a, 0xae, 0xe2, 0x9f, 0x71, 0xc8, 0xce, 0x2d,
|
|
0x84, 0x6e, 0x43, 0x7e, 0x4c, 0x8e, 0x8c, 0x59, 0x85, 0xf4, 0xd4, 0x01, 0x52, 0x38, 0x37, 0x26,
|
|
0x47, 0x33, 0x5a, 0x0f, 0x55, 0xa7, 0x05, 0xd9, 0x10, 0x6c, 0x4c, 0xb9, 0x2f, 0xc2, 0x7d, 0xbd,
|
|
0x39, 0x3b, 0xd3, 0xc2, 0xdb, 0x0b, 0x02, 0x10, 0x87, 0x15, 0x61, 0x3a, 0xc6, 0x21, 0xa5, 0x0e,
|
|
0xb1, 0xd8, 0x84, 0x86, 0xf9, 0xfd, 0xfc, 0x4a, 0x77, 0xa5, 0xf7, 0x4c, 0xe7, 0x69, 0xc4, 0x88,
|
|
0x97, 0xc5, 0xdc, 0xac, 0xf8, 0x75, 0x0c, 0x96, 0xe7, 0xdd, 0xe8, 0x1a, 0xa4, 0x1d, 0x97, 0xf7,
|
|
0x69, 0x70, 0xca, 0x15, 0x1c, 0xce, 0xd0, 0x5d, 0x48, 0xca, 0x53, 0x5d, 0x7c, 0x24, 0x05, 0x43,
|
|
0x1f, 0xc2, 0x12, 0xb3, 0x05, 0x75, 0x27, 0xe4, 0x62, 0x8d, 0xe2, 0x29, 0xb4, 0xf8, 0x4b, 0x02,
|
|
0x96, 0xe7, 0x73, 0x82, 0x1e, 0x41, 0x51, 0x66, 0xe5, 0x9e, 0x21, 0x73, 0xe0, 0x50, 0x7b, 0x20,
|
|
0x3f, 0x29, 0x97, 0x7e, 0xe9, 0x53, 0x4f, 0x44, 0x89, 0xb8, 0xae, 0x10, 0x7b, 0xe4, 0xa8, 0x13,
|
|
0xf8, 0x71, 0xe8, 0x46, 0xef, 0x01, 0x92, 0xae, 0xb2, 0x0a, 0x9e, 0x06, 0xc5, 0x55, 0x90, 0x2a,
|
|
0x33, 0xe5, 0x3d, 0x72, 0x34, 0x45, 0x3f, 0x86, 0x9b, 0xf3, 0x38, 0xc3, 0xa1, 0xee, 0x5c, 0xd6,
|
|
0xd5, 0x29, 0x52, 0xb8, 0x30, 0x9e, 0x45, 0x74, 0xa8, 0x3b, 0xbb, 0x7c, 0x74, 0x0b, 0xb2, 0x41,
|
|
0xb8, 0x70, 0x19, 0x0d, 0x9e, 0x39, 0x29, 0x0c, 0x0a, 0xae, 0x2c, 0xe8, 0x63, 0x58, 0x66, 0x03,
|
|
0x8b, 0x4e, 0xc5, 0x91, 0xba, 0xe8, 0x5a, 0xb2, 0x12, 0x1e, 0x29, 0xe3, 0x05, 0xac, 0x8e, 0xca,
|
|
0x86, 0xef, 0x0c, 0x5d, 0x32, 0xa0, 0x51, 0x5b, 0x4a, 0xab, 0xca, 0xdf, 0xba, 0x9a, 0xee, 0xf5,
|
|
0x46, 0x79, 0x3f, 0xa0, 0x0d, 0x9b, 0x57, 0x7e, 0x74, 0xd2, 0x50, 0xfa, 0x14, 0xf2, 0xa7, 0x30,
|
|
0x28, 0x0b, 0x8b, 0xb5, 0xfa, 0x67, 0x95, 0xfd, 0x66, 0x4f, 0x5b, 0x40, 0x08, 0x72, 0xb5, 0xb6,
|
|
0xd1, 0x6a, 0xf7, 0x8c, 0xfd, 0xce, 0x0e, 0xae, 0xd4, 0xea, 0x5a, 0x4c, 0x02, 0xa2, 0x49, 0xbc,
|
|
0xf4, 0x7d, 0x1c, 0xb4, 0xd3, 0x8f, 0x03, 0x74, 0x17, 0x90, 0xec, 0x08, 0xd4, 0xf4, 0x05, 0x9b,
|
|
0x50, 0x83, 0xba, 0x2e, 0x77, 0xa3, 0x94, 0xae, 0xce, 0x79, 0xea, 0xca, 0x71, 0x42, 0x51, 0xf1,
|
|
0xb7, 0x56, 0x14, 0xda, 0x01, 0xd4, 0x27, 0x1e, 0x35, 0xe8, 0xf3, 0xf0, 0xa5, 0xa4, 0x54, 0x7c,
|
|
0xa1, 0x24, 0x35, 0x19, 0x54, 0x0f, 0x63, 0x64, 0x0e, 0xd0, 0xfb, 0xb0, 0x26, 0xf3, 0x3b, 0xe5,
|
|
0x71, 0xa8, 0x6b, 0x52, 0x5b, 0x84, 0x89, 0x46, 0x63, 0x72, 0x14, 0xc1, 0x3b, 0x81, 0x47, 0xca,
|
|
0x6f, 0xcc, 0x6c, 0xd9, 0xca, 0x2c, 0x31, 0x9a, 0xe2, 0x53, 0x81, 0xfc, 0xc6, 0xcc, 0x6e, 0x28,
|
|
0x47, 0x88, 0x2e, 0xfd, 0x24, 0xeb, 0xce, 0xec, 0xd1, 0x83, 0x76, 0x20, 0x39, 0xe6, 0x83, 0xa8,
|
|
0xbb, 0xeb, 0x6f, 0xf7, 0x54, 0x92, 0x63, 0x19, 0x15, 0x76, 0x0f, 0x39, 0x54, 0xf7, 0x6c, 0x31,
|
|
0xd9, 0xd0, 0x4d, 0xea, 0x0a, 0x76, 0xc0, 0x4c, 0x22, 0xa2, 0x87, 0xc6, 0x6a, 0xe0, 0xd9, 0x9e,
|
|
0x39, 0xa4, 0x8e, 0x1d, 0x97, 0x4d, 0x88, 0xa0, 0xb2, 0x4b, 0xa8, 0x9b, 0xca, 0x60, 0x08, 0x4d,
|
|
0x4f, 0xe9, 0xb1, 0x2c, 0x88, 0x26, 0x99, 0xe7, 0x0a, 0xc4, 0x9e, 0xc1, 0x39, 0x93, 0xcc, 0x11,
|
|
0x79, 0xb2, 0x13, 0x7a, 0x7e, 0x5f, 0x5e, 0x8a, 0x41, 0x2c, 0xa1, 0x7a, 0x79, 0xf0, 0x68, 0xcf,
|
|
0xe0, 0x7c, 0xe8, 0xa8, 0x58, 0x42, 0xb6, 0x72, 0x4f, 0x3e, 0x89, 0x3c, 0x9b, 0x29, 0x41, 0x67,
|
|
0xb0, 0x1c, 0x96, 0x9e, 0xc0, 0x62, 0x78, 0x18, 0x25, 0xb6, 0xdd, 0x6e, 0xa5, 0xda, 0xac, 0x6b,
|
|
0x0b, 0xb2, 0x13, 0x75, 0x77, 0xf7, 0x3a, 0xcd, 0x7a, 0xd0, 0x95, 0xf6, 0xf6, 0x7b, 0xfb, 0x95,
|
|
0xa6, 0x16, 0x47, 0x1a, 0x2c, 0xef, 0x76, 0x7b, 0xbb, 0x6d, 0x23, 0xb4, 0x24, 0xaa, 0xfa, 0x8f,
|
|
0xaf, 0xd6, 0x63, 0x3f, 0xbf, 0x5a, 0x8f, 0xbd, 0x7c, 0xb5, 0x1e, 0x7b, 0xb6, 0x11, 0x5c, 0x20,
|
|
0xe3, 0xea, 0xc7, 0xf7, 0x8c, 0x5f, 0xd8, 0x7e, 0x5a, 0xc9, 0xe0, 0xfe, 0xdf, 0x01, 0x00, 0x00,
|
|
0xff, 0xff, 0xae, 0x5d, 0x93, 0x66, 0x68, 0x0f, 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.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 {
|
|
n14, err14 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Ttl, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Ttl):])
|
|
if err14 != nil {
|
|
return 0, err14
|
|
}
|
|
i -= n14
|
|
i = encodeVarintDestinationRule(dAtA, i, uint64(n14))
|
|
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.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 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.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.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 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
|
|
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
|
|
}
|
|
}
|
|
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 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")
|
|
)
|