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

1542 lines
43 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: envoy/api/v2/eds.proto
package v2
import (
bytes "bytes"
context "context"
fmt "fmt"
io "io"
math "math"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
_ "github.com/gogo/googleapis/google/api"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
types "github.com/gogo/protobuf/types"
grpc "google.golang.org/grpc"
endpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"
_type "github.com/envoyproxy/go-control-plane/envoy/type"
)
// 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. The percentage of traffic
// for each endpoint is determined by both its load_balancing_weight, and the
// load_balancing_weight of its locality. First, a locality will be selected,
// then an endpoint within that locality will be chose based on its weight.
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,proto3" json:"endpoints"`
// Map of named endpoints that can be referenced in LocalityLbEndpoints.
NamedEndpoints map[string]*endpoint.Endpoint `protobuf:"bytes,5,rep,name=named_endpoints,json=namedEndpoints,proto3" json:"named_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Load balancing policy settings.
Policy *ClusterLoadAssignment_Policy `protobuf:"bytes,4,opt,name=policy,proto3" 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_3c8760f38742c17f, []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) {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *ClusterLoadAssignment) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClusterLoadAssignment.Merge(m, 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) GetNamedEndpoints() map[string]*endpoint.Endpoint {
if m != nil {
return m.NamedEndpoints
}
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,proto3" 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%. For example:
//
// .. code-block:: json
//
// { "overprovisioning_factor": 100 }
//
// 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,proto3" json:"overprovisioning_factor,omitempty"`
// The max time until which the endpoints from this assignment can be used.
// If no new assignments are received before this time expires the endpoints
// are considered stale and should be marked unhealthy.
// Defaults to 0 which means endpoints never go stale.
EndpointStaleAfter *types.Duration `protobuf:"bytes,4,opt,name=endpoint_stale_after,json=endpointStaleAfter,proto3" json:"endpoint_stale_after,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_3c8760f38742c17f, []int{0, 1}
}
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) {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *ClusterLoadAssignment_Policy) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClusterLoadAssignment_Policy.Merge(m, 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
}
func (m *ClusterLoadAssignment_Policy) GetEndpointStaleAfter() *types.Duration {
if m != nil {
return m.EndpointStaleAfter
}
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,proto3" 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_3c8760f38742c17f, []int{0, 1, 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) {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload.Merge(m, 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.RegisterMapType((map[string]*endpoint.Endpoint)(nil), "envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntry")
proto.RegisterType((*ClusterLoadAssignment_Policy)(nil), "envoy.api.v2.ClusterLoadAssignment.Policy")
proto.RegisterType((*ClusterLoadAssignment_Policy_DropOverload)(nil), "envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload")
}
func init() { proto.RegisterFile("envoy/api/v2/eds.proto", fileDescriptor_3c8760f38742c17f) }
var fileDescriptor_3c8760f38742c17f = []byte{
// 706 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcf, 0x6b, 0x13, 0x41,
0x14, 0xc7, 0x33, 0x9b, 0x34, 0xa6, 0xd3, 0xd8, 0x96, 0xb5, 0xb6, 0x71, 0x89, 0x69, 0x08, 0x0a,
0x25, 0xc8, 0x46, 0x52, 0xa4, 0xd2, 0x8b, 0x34, 0xb6, 0x01, 0xa5, 0xd4, 0xb0, 0x45, 0xd1, 0x8b,
0x71, 0xb2, 0x3b, 0x5d, 0x07, 0x37, 0x33, 0xe3, 0xec, 0x64, 0x75, 0x0f, 0x5e, 0x3c, 0x79, 0xf7,
0x9f, 0x90, 0xfe, 0x09, 0x9e, 0x3c, 0xf6, 0xe0, 0x41, 0xf0, 0xe2, 0x49, 0x24, 0x78, 0x11, 0xff,
0x09, 0x99, 0xfd, 0xd5, 0xae, 0x6d, 0xc1, 0x83, 0xb7, 0xb7, 0xf3, 0xde, 0xfb, 0xbc, 0xb7, 0xdf,
0xf7, 0x66, 0xe0, 0x32, 0xa6, 0x01, 0x0b, 0x3b, 0x88, 0x93, 0x4e, 0xd0, 0xed, 0x60, 0xc7, 0x37,
0xb9, 0x60, 0x92, 0xe9, 0xd5, 0xe8, 0xdc, 0x44, 0x9c, 0x98, 0x41, 0xd7, 0xa8, 0xe7, 0xa2, 0x1c,
0xe2, 0xdb, 0x2c, 0xc0, 0x22, 0x8c, 0x63, 0x8d, 0x6b, 0x79, 0x06, 0x75, 0x38, 0x23, 0x54, 0x66,
0x46, 0x12, 0x55, 0x8b, 0xa3, 0x64, 0xc8, 0x71, 0x87, 0x63, 0x61, 0xe3, 0xcc, 0x53, 0x77, 0x19,
0x73, 0x3d, 0x1c, 0x01, 0x10, 0xa5, 0x4c, 0x22, 0x49, 0x18, 0x4d, 0x3a, 0x31, 0x56, 0x02, 0xe4,
0x11, 0x07, 0x49, 0xdc, 0x49, 0x8d, 0xc4, 0xb1, 0xe4, 0x32, 0x97, 0x45, 0x66, 0x47, 0x59, 0xc9,
0x69, 0x23, 0x81, 0x45, 0x5f, 0xa3, 0xc9, 0x41, 0xe7, 0x95, 0x40, 0x9c, 0x63, 0xe1, 0x9f, 0xe7,
0x77, 0x26, 0x22, 0xaa, 0x17, 0xfb, 0x5b, 0x9f, 0xcb, 0xf0, 0xf2, 0x5d, 0x6f, 0xe2, 0x4b, 0x2c,
0x76, 0x19, 0x72, 0xb6, 0x7c, 0x9f, 0xb8, 0x74, 0x8c, 0xa9, 0xd4, 0x6f, 0xc0, 0xaa, 0x1d, 0x3b,
0x86, 0x14, 0x8d, 0x71, 0x0d, 0x34, 0xc1, 0xda, 0x6c, 0x6f, 0xf6, 0xe3, 0xaf, 0x4f, 0xc5, 0x92,
0xd0, 0x9a, 0xc0, 0x9a, 0x4b, 0xdc, 0x7b, 0x68, 0x8c, 0xf5, 0x3d, 0x38, 0x9b, 0x0a, 0xe0, 0xd7,
0xb4, 0x66, 0x71, 0x6d, 0xae, 0xdb, 0x36, 0x4f, 0x8a, 0x6a, 0x66, 0xfa, 0xec, 0x32, 0x1b, 0x79,
0x44, 0x86, 0xbb, 0xa3, 0x9d, 0x34, 0xa3, 0x57, 0x3a, 0xfa, 0xbe, 0x5a, 0xb0, 0x8e, 0x11, 0xfa,
0x33, 0xb8, 0xa0, 0xaa, 0x3a, 0xc3, 0x63, 0xea, 0x4c, 0x44, 0xdd, 0xc8, 0x53, 0xcf, 0xec, 0xdd,
0x54, 0x2d, 0x39, 0x19, 0x7d, 0x87, 0x4a, 0x11, 0x5a, 0xf3, 0x34, 0x77, 0xa8, 0xf7, 0x60, 0x99,
0x33, 0x8f, 0xd8, 0x61, 0xad, 0xd4, 0x04, 0xa7, 0xdb, 0x3d, 0x1b, 0x3c, 0x88, 0x32, 0xac, 0x24,
0xd3, 0x18, 0xc1, 0x4b, 0x67, 0x94, 0xd2, 0x17, 0x61, 0xf1, 0x05, 0x0e, 0x63, 0xc5, 0x2c, 0x65,
0xea, 0xb7, 0xe0, 0x4c, 0x80, 0xbc, 0x09, 0xae, 0x69, 0x51, 0xad, 0xd5, 0x73, 0xa4, 0x49, 0x39,
0x56, 0x1c, 0xbd, 0xa9, 0xdd, 0x06, 0xc6, 0x61, 0x11, 0x96, 0xe3, 0xb2, 0xfa, 0x53, 0x38, 0xef,
0x08, 0xc6, 0x87, 0x6a, 0x1b, 0x3d, 0x86, 0x9c, 0x54, 0xe9, 0x8d, 0x7f, 0x6f, 0xdd, 0xdc, 0x16,
0x8c, 0x3f, 0x48, 0xf2, 0xad, 0x8b, 0xce, 0x89, 0x2f, 0x25, 0xfa, 0x8a, 0x42, 0x73, 0xc1, 0x02,
0xe2, 0x13, 0x46, 0x09, 0x75, 0x87, 0x07, 0xc8, 0x96, 0x4c, 0xd4, 0x8a, 0x51, 0xdf, 0x75, 0x33,
0x5e, 0x27, 0x33, 0x5d, 0x27, 0xf3, 0xe1, 0x3d, 0x2a, 0xd7, 0xbb, 0x8f, 0x54, 0xb7, 0xc9, 0x6e,
0xb4, 0xb5, 0x66, 0xc1, 0x5a, 0xfe, 0x9b, 0xd3, 0x8f, 0x30, 0xfa, 0x13, 0xb8, 0x94, 0xfe, 0xec,
0xd0, 0x97, 0xc8, 0xc3, 0x43, 0x74, 0x20, 0xb1, 0x48, 0x46, 0x70, 0xe5, 0x14, 0x7e, 0x3b, 0xd9,
0xd6, 0x5e, 0x55, 0xb1, 0x2f, 0x1c, 0x82, 0x52, 0x5b, 0xab, 0x14, 0x2c, 0x3d, 0x85, 0xec, 0x2b,
0xc6, 0x96, 0x42, 0x18, 0x6f, 0x60, 0xf5, 0xe4, 0xbf, 0xe9, 0xd7, 0x61, 0xc5, 0x46, 0x12, 0xbb,
0x4c, 0x84, 0xa7, 0x77, 0x37, 0x73, 0xe9, 0x7d, 0xb8, 0x10, 0x69, 0x9a, 0xdc, 0x51, 0xe4, 0xa6,
0x33, 0xba, 0x9a, 0x88, 0xaa, 0x6e, 0xb0, 0xd9, 0x17, 0xc8, 0x56, 0x7d, 0x20, 0x6f, 0x10, 0xc7,
0x59, 0xd1, 0x24, 0x06, 0x59, 0xd2, 0xfd, 0x52, 0x05, 0x2c, 0x6a, 0xdd, 0xdf, 0x00, 0xd6, 0xd2,
0x21, 0x6e, 0xa7, 0xef, 0xc6, 0x3e, 0x16, 0x01, 0xb1, 0xb1, 0xfe, 0x18, 0x2e, 0xec, 0x4b, 0x81,
0xd1, 0xf8, 0x78, 0x09, 0x1b, 0xf9, 0xc9, 0x65, 0x29, 0x16, 0x7e, 0x39, 0xc1, 0xbe, 0x34, 0x56,
0xcf, 0xf5, 0xfb, 0x9c, 0x51, 0x1f, 0xb7, 0x0a, 0x6b, 0xe0, 0x26, 0xd0, 0x27, 0x70, 0xbe, 0x8f,
0xa5, 0xfd, 0xfc, 0x3f, 0x82, 0x5b, 0x6f, 0xbf, 0xfe, 0x7c, 0xaf, 0xd5, 0x5b, 0x2b, 0xb9, 0x27,
0x70, 0x33, 0xbb, 0x8e, 0x9b, 0xa0, 0xdd, 0xbb, 0xf3, 0x61, 0xda, 0x00, 0x47, 0xd3, 0x06, 0xf8,
0x32, 0x6d, 0x80, 0x6f, 0xd3, 0x06, 0xf8, 0x31, 0x6d, 0x00, 0x68, 0x10, 0x16, 0xc3, 0xb9, 0x60,
0xaf, 0xc3, 0x5c, 0x9d, 0x5e, 0x65, 0xc7, 0xf1, 0x07, 0x6a, 0xb8, 0x03, 0xf0, 0x0e, 0x80, 0x51,
0x39, 0x1a, 0xf4, 0xfa, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x16, 0xd1, 0x36, 0x97, 0x05,
0x00, 0x00,
}
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 len(this.NamedEndpoints) != len(that1.NamedEndpoints) {
return false
}
for i := range this.NamedEndpoints {
if !this.NamedEndpoints[i].Equal(that1.NamedEndpoints[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 !this.EndpointStaleAfter.Equal(that1.EndpointStaleAfter) {
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
// EndpointDiscoveryServiceClient is the client API for EndpointDiscoveryService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
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
}
// EndpointDiscoveryServiceServer is the 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 len(m.NamedEndpoints) > 0 {
keysForNamedEndpoints := make([]string, 0, len(m.NamedEndpoints))
for k, _ := range m.NamedEndpoints {
keysForNamedEndpoints = append(keysForNamedEndpoints, string(k))
}
github_com_gogo_protobuf_sortkeys.Strings(keysForNamedEndpoints)
for _, k := range keysForNamedEndpoints {
dAtA[i] = 0x2a
i++
v := m.NamedEndpoints[string(k)]
msgSize := 0
if v != nil {
msgSize = v.Size()
msgSize += 1 + sovEds(uint64(msgSize))
}
mapSize := 1 + len(k) + sovEds(uint64(len(k))) + msgSize
i = encodeVarintEds(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintEds(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
if v != nil {
dAtA[i] = 0x12
i++
i = encodeVarintEds(dAtA, i, uint64(v.Size()))
n2, err := v.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) 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()))
n3, err := m.OverprovisioningFactor.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n3
}
if m.EndpointStaleAfter != nil {
dAtA[i] = 0x22
i++
i = encodeVarintEds(dAtA, i, uint64(m.EndpointStaleAfter.Size()))
n4, err := m.EndpointStaleAfter.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n4
}
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()))
n5, err := m.DropPercentage.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n5
}
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) {
if m == nil {
return 0
}
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 len(m.NamedEndpoints) > 0 {
for k, v := range m.NamedEndpoints {
_ = k
_ = v
l = 0
if v != nil {
l = v.Size()
l += 1 + sovEds(uint64(l))
}
mapEntrySize := 1 + len(k) + sovEds(uint64(len(k))) + l
n += mapEntrySize + 1 + sovEds(uint64(mapEntrySize))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ClusterLoadAssignment_Policy) Size() (n int) {
if m == nil {
return 0
}
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.EndpointStaleAfter != nil {
l = m.EndpointStaleAfter.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) {
if m == nil {
return 0
}
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 < 0 {
return ErrInvalidLengthEds
}
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 < 0 {
return ErrInvalidLengthEds
}
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 < 0 {
return ErrInvalidLengthEds
}
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
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NamedEndpoints", 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 < 0 {
return ErrInvalidLengthEds
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.NamedEndpoints == nil {
m.NamedEndpoints = make(map[string]*endpoint.Endpoint)
}
var mapkey string
var mapvalue *endpoint.Endpoint
for iNdEx < postIndex {
entryPreIndex := 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)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEds
}
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 ErrInvalidLengthEds
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthEds
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var mapmsglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEds
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapmsglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if mapmsglen < 0 {
return ErrInvalidLengthEds
}
postmsgIndex := iNdEx + mapmsglen
if postmsgIndex < 0 {
return ErrInvalidLengthEds
}
if postmsgIndex > l {
return io.ErrUnexpectedEOF
}
mapvalue = &endpoint.Endpoint{}
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
return err
}
iNdEx = postmsgIndex
} else {
iNdEx = entryPreIndex
skippy, err := skipEds(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthEds
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.NamedEndpoints[mapkey] = mapvalue
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipEds(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthEds
}
if (iNdEx + 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 < 0 {
return ErrInvalidLengthEds
}
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 < 0 {
return ErrInvalidLengthEds
}
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
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EndpointStaleAfter", 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 < 0 {
return ErrInvalidLengthEds
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.EndpointStaleAfter == nil {
m.EndpointStaleAfter = &types.Duration{}
}
if err := m.EndpointStaleAfter.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) < 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 < 0 {
return ErrInvalidLengthEds
}
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 < 0 {
return ErrInvalidLengthEds
}
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) < 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
}
}
if length < 0 {
return 0, ErrInvalidLengthEds
}
iNdEx += length
if iNdEx < 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
if iNdEx < 0 {
return 0, ErrInvalidLengthEds
}
}
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")
)