open-consul/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.go

1233 lines
35 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: envoy/api/v2/eds.proto
package v2
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import endpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"
import _type "github.com/envoyproxy/go-control-plane/envoy/type"
import _ "github.com/gogo/googleapis/google/api"
import _ "github.com/gogo/protobuf/gogoproto"
import types "github.com/gogo/protobuf/types"
import _ "github.com/lyft/protoc-gen-validate/validate"
import bytes "bytes"
import context "golang.org/x/net/context"
import grpc "google.golang.org/grpc"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// Each route from RDS will map to a single cluster or traffic split across
// clusters using weights expressed in the RDS WeightedCluster.
//
// With EDS, each cluster is treated independently from a LB perspective, with
// LB taking place between the Localities within a cluster and at a finer
// granularity between the hosts within a locality. For a given cluster, the
// effective weight of a host is its load_balancing_weight multiplied by the
// load_balancing_weight of its Locality.
type ClusterLoadAssignment struct {
// Name of the cluster. This will be the :ref:`service_name
// <envoy_api_field_Cluster.EdsClusterConfig.service_name>` value if specified
// in the cluster :ref:`EdsClusterConfig
// <envoy_api_msg_Cluster.EdsClusterConfig>`.
ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"`
// List of endpoints to load balance to.
Endpoints []endpoint.LocalityLbEndpoints `protobuf:"bytes,2,rep,name=endpoints" json:"endpoints"`
// Load balancing policy settings.
Policy *ClusterLoadAssignment_Policy `protobuf:"bytes,4,opt,name=policy" json:"policy,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClusterLoadAssignment) Reset() { *m = ClusterLoadAssignment{} }
func (m *ClusterLoadAssignment) String() string { return proto.CompactTextString(m) }
func (*ClusterLoadAssignment) ProtoMessage() {}
func (*ClusterLoadAssignment) Descriptor() ([]byte, []int) {
return fileDescriptor_eds_4dda14f752f4a5e3, []int{0}
}
func (m *ClusterLoadAssignment) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ClusterLoadAssignment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ClusterLoadAssignment.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *ClusterLoadAssignment) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClusterLoadAssignment.Merge(dst, src)
}
func (m *ClusterLoadAssignment) XXX_Size() int {
return m.Size()
}
func (m *ClusterLoadAssignment) XXX_DiscardUnknown() {
xxx_messageInfo_ClusterLoadAssignment.DiscardUnknown(m)
}
var xxx_messageInfo_ClusterLoadAssignment proto.InternalMessageInfo
func (m *ClusterLoadAssignment) GetClusterName() string {
if m != nil {
return m.ClusterName
}
return ""
}
func (m *ClusterLoadAssignment) GetEndpoints() []endpoint.LocalityLbEndpoints {
if m != nil {
return m.Endpoints
}
return nil
}
func (m *ClusterLoadAssignment) GetPolicy() *ClusterLoadAssignment_Policy {
if m != nil {
return m.Policy
}
return nil
}
// Load balancing policy settings.
type ClusterLoadAssignment_Policy struct {
// Action to trim the overall incoming traffic to protect the upstream
// hosts. This action allows protection in case the hosts are unable to
// recover from an outage, or unable to autoscale or unable to handle
// incoming traffic volume for any reason.
//
// At the client each category is applied one after the other to generate
// the 'actual' drop percentage on all outgoing traffic. For example:
//
// .. code-block:: json
//
// { "drop_overloads": [
// { "category": "throttle", "drop_percentage": 60 }
// { "category": "lb", "drop_percentage": 50 }
// ]}
//
// The actual drop percentages applied to the traffic at the clients will be
// "throttle"_drop = 60%
// "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
// actual_outgoing_load = 20% // remaining after applying all categories.
DropOverloads []*ClusterLoadAssignment_Policy_DropOverload `protobuf:"bytes,2,rep,name=drop_overloads,json=dropOverloads" json:"drop_overloads,omitempty"`
// Priority levels and localities are considered overprovisioned with this
// factor (in percentage). This means that we don't consider a priority
// level or locality unhealthy until the percentage of healthy hosts
// multiplied by the overprovisioning factor drops below 100.
// With the default value 140(1.4), Envoy doesn't consider a priority level
// or a locality unhealthy until their percentage of healthy hosts drops
// below 72%.
// Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
// :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
OverprovisioningFactor *types.UInt32Value `protobuf:"bytes,3,opt,name=overprovisioning_factor,json=overprovisioningFactor" json:"overprovisioning_factor,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClusterLoadAssignment_Policy) Reset() { *m = ClusterLoadAssignment_Policy{} }
func (m *ClusterLoadAssignment_Policy) String() string { return proto.CompactTextString(m) }
func (*ClusterLoadAssignment_Policy) ProtoMessage() {}
func (*ClusterLoadAssignment_Policy) Descriptor() ([]byte, []int) {
return fileDescriptor_eds_4dda14f752f4a5e3, []int{0, 0}
}
func (m *ClusterLoadAssignment_Policy) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ClusterLoadAssignment_Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ClusterLoadAssignment_Policy.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *ClusterLoadAssignment_Policy) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClusterLoadAssignment_Policy.Merge(dst, src)
}
func (m *ClusterLoadAssignment_Policy) XXX_Size() int {
return m.Size()
}
func (m *ClusterLoadAssignment_Policy) XXX_DiscardUnknown() {
xxx_messageInfo_ClusterLoadAssignment_Policy.DiscardUnknown(m)
}
var xxx_messageInfo_ClusterLoadAssignment_Policy proto.InternalMessageInfo
func (m *ClusterLoadAssignment_Policy) GetDropOverloads() []*ClusterLoadAssignment_Policy_DropOverload {
if m != nil {
return m.DropOverloads
}
return nil
}
func (m *ClusterLoadAssignment_Policy) GetOverprovisioningFactor() *types.UInt32Value {
if m != nil {
return m.OverprovisioningFactor
}
return nil
}
type ClusterLoadAssignment_Policy_DropOverload struct {
// Identifier for the policy specifying the drop.
Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"`
// Percentage of traffic that should be dropped for the category.
DropPercentage *_type.FractionalPercent `protobuf:"bytes,2,opt,name=drop_percentage,json=dropPercentage" json:"drop_percentage,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClusterLoadAssignment_Policy_DropOverload) Reset() {
*m = ClusterLoadAssignment_Policy_DropOverload{}
}
func (m *ClusterLoadAssignment_Policy_DropOverload) String() string { return proto.CompactTextString(m) }
func (*ClusterLoadAssignment_Policy_DropOverload) ProtoMessage() {}
func (*ClusterLoadAssignment_Policy_DropOverload) Descriptor() ([]byte, []int) {
return fileDescriptor_eds_4dda14f752f4a5e3, []int{0, 0, 0}
}
func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *ClusterLoadAssignment_Policy_DropOverload) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload.Merge(dst, src)
}
func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Size() int {
return m.Size()
}
func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_DiscardUnknown() {
xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload.DiscardUnknown(m)
}
var xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload proto.InternalMessageInfo
func (m *ClusterLoadAssignment_Policy_DropOverload) GetCategory() string {
if m != nil {
return m.Category
}
return ""
}
func (m *ClusterLoadAssignment_Policy_DropOverload) GetDropPercentage() *_type.FractionalPercent {
if m != nil {
return m.DropPercentage
}
return nil
}
func init() {
proto.RegisterType((*ClusterLoadAssignment)(nil), "envoy.api.v2.ClusterLoadAssignment")
proto.RegisterType((*ClusterLoadAssignment_Policy)(nil), "envoy.api.v2.ClusterLoadAssignment.Policy")
proto.RegisterType((*ClusterLoadAssignment_Policy_DropOverload)(nil), "envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload")
}
func (this *ClusterLoadAssignment) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*ClusterLoadAssignment)
if !ok {
that2, ok := that.(ClusterLoadAssignment)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.ClusterName != that1.ClusterName {
return false
}
if len(this.Endpoints) != len(that1.Endpoints) {
return false
}
for i := range this.Endpoints {
if !this.Endpoints[i].Equal(&that1.Endpoints[i]) {
return false
}
}
if !this.Policy.Equal(that1.Policy) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *ClusterLoadAssignment_Policy) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*ClusterLoadAssignment_Policy)
if !ok {
that2, ok := that.(ClusterLoadAssignment_Policy)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if len(this.DropOverloads) != len(that1.DropOverloads) {
return false
}
for i := range this.DropOverloads {
if !this.DropOverloads[i].Equal(that1.DropOverloads[i]) {
return false
}
}
if !this.OverprovisioningFactor.Equal(that1.OverprovisioningFactor) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *ClusterLoadAssignment_Policy_DropOverload) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*ClusterLoadAssignment_Policy_DropOverload)
if !ok {
that2, ok := that.(ClusterLoadAssignment_Policy_DropOverload)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Category != that1.Category {
return false
}
if !this.DropPercentage.Equal(that1.DropPercentage) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for EndpointDiscoveryService service
type EndpointDiscoveryServiceClient interface {
// The resource_names field in DiscoveryRequest specifies a list of clusters
// to subscribe to updates for.
StreamEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_StreamEndpointsClient, error)
FetchEndpoints(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error)
}
type endpointDiscoveryServiceClient struct {
cc *grpc.ClientConn
}
func NewEndpointDiscoveryServiceClient(cc *grpc.ClientConn) EndpointDiscoveryServiceClient {
return &endpointDiscoveryServiceClient{cc}
}
func (c *endpointDiscoveryServiceClient) StreamEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_StreamEndpointsClient, error) {
stream, err := c.cc.NewStream(ctx, &_EndpointDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.EndpointDiscoveryService/StreamEndpoints", opts...)
if err != nil {
return nil, err
}
x := &endpointDiscoveryServiceStreamEndpointsClient{stream}
return x, nil
}
type EndpointDiscoveryService_StreamEndpointsClient interface {
Send(*DiscoveryRequest) error
Recv() (*DiscoveryResponse, error)
grpc.ClientStream
}
type endpointDiscoveryServiceStreamEndpointsClient struct {
grpc.ClientStream
}
func (x *endpointDiscoveryServiceStreamEndpointsClient) Send(m *DiscoveryRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *endpointDiscoveryServiceStreamEndpointsClient) Recv() (*DiscoveryResponse, error) {
m := new(DiscoveryResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *endpointDiscoveryServiceClient) FetchEndpoints(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) {
out := new(DiscoveryResponse)
err := c.cc.Invoke(ctx, "/envoy.api.v2.EndpointDiscoveryService/FetchEndpoints", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for EndpointDiscoveryService service
type EndpointDiscoveryServiceServer interface {
// The resource_names field in DiscoveryRequest specifies a list of clusters
// to subscribe to updates for.
StreamEndpoints(EndpointDiscoveryService_StreamEndpointsServer) error
FetchEndpoints(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error)
}
func RegisterEndpointDiscoveryServiceServer(s *grpc.Server, srv EndpointDiscoveryServiceServer) {
s.RegisterService(&_EndpointDiscoveryService_serviceDesc, srv)
}
func _EndpointDiscoveryService_StreamEndpoints_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(EndpointDiscoveryServiceServer).StreamEndpoints(&endpointDiscoveryServiceStreamEndpointsServer{stream})
}
type EndpointDiscoveryService_StreamEndpointsServer interface {
Send(*DiscoveryResponse) error
Recv() (*DiscoveryRequest, error)
grpc.ServerStream
}
type endpointDiscoveryServiceStreamEndpointsServer struct {
grpc.ServerStream
}
func (x *endpointDiscoveryServiceStreamEndpointsServer) Send(m *DiscoveryResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *endpointDiscoveryServiceStreamEndpointsServer) Recv() (*DiscoveryRequest, error) {
m := new(DiscoveryRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _EndpointDiscoveryService_FetchEndpoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DiscoveryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndpointDiscoveryServiceServer).FetchEndpoints(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/envoy.api.v2.EndpointDiscoveryService/FetchEndpoints",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndpointDiscoveryServiceServer).FetchEndpoints(ctx, req.(*DiscoveryRequest))
}
return interceptor(ctx, in, info, handler)
}
var _EndpointDiscoveryService_serviceDesc = grpc.ServiceDesc{
ServiceName: "envoy.api.v2.EndpointDiscoveryService",
HandlerType: (*EndpointDiscoveryServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "FetchEndpoints",
Handler: _EndpointDiscoveryService_FetchEndpoints_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "StreamEndpoints",
Handler: _EndpointDiscoveryService_StreamEndpoints_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "envoy/api/v2/eds.proto",
}
func (m *ClusterLoadAssignment) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ClusterLoadAssignment) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.ClusterName) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintEds(dAtA, i, uint64(len(m.ClusterName)))
i += copy(dAtA[i:], m.ClusterName)
}
if len(m.Endpoints) > 0 {
for _, msg := range m.Endpoints {
dAtA[i] = 0x12
i++
i = encodeVarintEds(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.Policy != nil {
dAtA[i] = 0x22
i++
i = encodeVarintEds(dAtA, i, uint64(m.Policy.Size()))
n1, err := m.Policy.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n1
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *ClusterLoadAssignment_Policy) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ClusterLoadAssignment_Policy) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.DropOverloads) > 0 {
for _, msg := range m.DropOverloads {
dAtA[i] = 0x12
i++
i = encodeVarintEds(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.OverprovisioningFactor != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintEds(dAtA, i, uint64(m.OverprovisioningFactor.Size()))
n2, err := m.OverprovisioningFactor.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n2
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *ClusterLoadAssignment_Policy_DropOverload) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ClusterLoadAssignment_Policy_DropOverload) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Category) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintEds(dAtA, i, uint64(len(m.Category)))
i += copy(dAtA[i:], m.Category)
}
if m.DropPercentage != nil {
dAtA[i] = 0x12
i++
i = encodeVarintEds(dAtA, i, uint64(m.DropPercentage.Size()))
n3, err := m.DropPercentage.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n3
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeVarintEds(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *ClusterLoadAssignment) Size() (n int) {
var l int
_ = l
l = len(m.ClusterName)
if l > 0 {
n += 1 + l + sovEds(uint64(l))
}
if len(m.Endpoints) > 0 {
for _, e := range m.Endpoints {
l = e.Size()
n += 1 + l + sovEds(uint64(l))
}
}
if m.Policy != nil {
l = m.Policy.Size()
n += 1 + l + sovEds(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ClusterLoadAssignment_Policy) Size() (n int) {
var l int
_ = l
if len(m.DropOverloads) > 0 {
for _, e := range m.DropOverloads {
l = e.Size()
n += 1 + l + sovEds(uint64(l))
}
}
if m.OverprovisioningFactor != nil {
l = m.OverprovisioningFactor.Size()
n += 1 + l + sovEds(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ClusterLoadAssignment_Policy_DropOverload) Size() (n int) {
var l int
_ = l
l = len(m.Category)
if l > 0 {
n += 1 + l + sovEds(uint64(l))
}
if m.DropPercentage != nil {
l = m.DropPercentage.Size()
n += 1 + l + sovEds(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovEds(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozEds(x uint64) (n int) {
return sovEds(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ClusterLoadAssignment) 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 ErrIntOverflowEds
}
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: ClusterLoadAssignment: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ClusterLoadAssignment: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEds
}
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 ErrInvalidLengthEds
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ClusterName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Endpoints", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEds
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthEds
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Endpoints = append(m.Endpoints, endpoint.LocalityLbEndpoints{})
if err := m.Endpoints[len(m.Endpoints)-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 Policy", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEds
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthEds
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Policy == nil {
m.Policy = &ClusterLoadAssignment_Policy{}
}
if err := m.Policy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipEds(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthEds
}
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 *ClusterLoadAssignment_Policy) 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 ErrIntOverflowEds
}
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: Policy: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Policy: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DropOverloads", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEds
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthEds
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.DropOverloads = append(m.DropOverloads, &ClusterLoadAssignment_Policy_DropOverload{})
if err := m.DropOverloads[len(m.DropOverloads)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field OverprovisioningFactor", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEds
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthEds
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.OverprovisioningFactor == nil {
m.OverprovisioningFactor = &types.UInt32Value{}
}
if err := m.OverprovisioningFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipEds(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthEds
}
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 *ClusterLoadAssignment_Policy_DropOverload) 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 ErrIntOverflowEds
}
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: DropOverload: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DropOverload: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Category", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEds
}
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 ErrInvalidLengthEds
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Category = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DropPercentage", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEds
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthEds
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.DropPercentage == nil {
m.DropPercentage = &_type.FractionalPercent{}
}
if err := m.DropPercentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipEds(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthEds
}
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 skipEds(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, ErrIntOverflowEds
}
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, ErrIntOverflowEds
}
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, ErrIntOverflowEds
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthEds
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowEds
}
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 := skipEds(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
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 (
ErrInvalidLengthEds = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowEds = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("envoy/api/v2/eds.proto", fileDescriptor_eds_4dda14f752f4a5e3) }
var fileDescriptor_eds_4dda14f752f4a5e3 = []byte{
// 562 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0x41, 0x8b, 0xd3, 0x40,
0x14, 0xde, 0xc9, 0x96, 0x65, 0x77, 0xb6, 0xee, 0x4a, 0xd4, 0x6d, 0x08, 0x35, 0x5b, 0x8a, 0x42,
0x29, 0x92, 0x48, 0xf7, 0x20, 0xec, 0xcd, 0xba, 0x16, 0x94, 0xb2, 0x96, 0x2c, 0x8a, 0x27, 0xeb,
0x34, 0x79, 0x1b, 0x07, 0xd2, 0x99, 0x71, 0x32, 0x8d, 0xe4, 0xe0, 0xc5, 0x93, 0x77, 0xff, 0x84,
0xe0, 0x3f, 0xf0, 0xe4, 0x71, 0x6f, 0x0a, 0xde, 0x45, 0x8a, 0x17, 0xf1, 0x4f, 0x48, 0x93, 0x49,
0x6c, 0x5d, 0x05, 0x0f, 0xde, 0x5e, 0xe6, 0x7b, 0xdf, 0xc7, 0xf7, 0xde, 0xf7, 0x82, 0xf7, 0x80,
0xa5, 0x3c, 0xf3, 0x88, 0xa0, 0x5e, 0xda, 0xf3, 0x20, 0x4c, 0x5c, 0x21, 0xb9, 0xe2, 0x66, 0x3d,
0x7f, 0x77, 0x89, 0xa0, 0x6e, 0xda, 0xb3, 0x9b, 0x2b, 0x5d, 0x21, 0x4d, 0x02, 0x9e, 0x82, 0xcc,
0x8a, 0x5e, 0xfb, 0xda, 0xaa, 0x06, 0x0b, 0x05, 0xa7, 0x4c, 0x55, 0x85, 0xee, 0xb2, 0x8a, 0x2e,
0x95, 0x09, 0xf0, 0x04, 0xc8, 0x00, 0x2a, 0xa4, 0x19, 0x71, 0x1e, 0xc5, 0x90, 0x0b, 0x10, 0xc6,
0xb8, 0x22, 0x8a, 0x72, 0xa6, 0x9d, 0xd8, 0x8d, 0x94, 0xc4, 0x34, 0x24, 0x0a, 0xbc, 0xb2, 0xd0,
0xc0, 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