open-consul/proto/pbservice/node.pb.go
Dhia Ayachi 5cb24b9bf8
split pbcommon to pbcommon and pbcommongogo (#12587)
* mogify needed pbcommon structs

* mogify needed pbconnect structs

* fix compilation errors and make config_translate_test pass

* add missing file

* remove redundant oss func declaration

* fix EnterpriseMeta to copy the right data for enterprise

* rename pbcommon package to pbcommongogo

* regenerate proto and mog files

* add missing mog files

* add pbcommon package

* pbcommon no mog

* fix enterprise meta code generation

* fix enterprise meta code generation (pbcommongogo)

* fix mog generation for gogo

* use `protoc-go-inject-tag` to inject tags

* rename proto package

* pbcommon no mog

* use `protoc-go-inject-tag` to inject tags

* add non gogo proto to make file

* fix proto get
2022-03-22 16:30:00 -04:00

2263 lines
58 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: proto/pbservice/node.proto
package pbservice
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/golang/protobuf/proto"
github_com_hashicorp_consul_agent_structs "github.com/hashicorp/consul/agent/structs"
pbcommongogo "github.com/hashicorp/consul/proto/pbcommongogo"
github_com_hashicorp_consul_types "github.com/hashicorp/consul/types"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// CheckServiceNode is used to provide the node, its service
// definition, as well as a HealthCheck that is associated.
type CheckServiceNode struct {
Node *Node `protobuf:"bytes,1,opt,name=Node,proto3" json:"Node,omitempty"`
Service *NodeService `protobuf:"bytes,2,opt,name=Service,proto3" json:"Service,omitempty"`
Checks []*HealthCheck `protobuf:"bytes,3,rep,name=Checks,proto3" json:"Checks,omitempty"`
}
func (m *CheckServiceNode) Reset() { *m = CheckServiceNode{} }
func (m *CheckServiceNode) String() string { return proto.CompactTextString(m) }
func (*CheckServiceNode) ProtoMessage() {}
func (*CheckServiceNode) Descriptor() ([]byte, []int) {
return fileDescriptor_bbc215b78fa95fe5, []int{0}
}
func (m *CheckServiceNode) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *CheckServiceNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_CheckServiceNode.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 *CheckServiceNode) XXX_Merge(src proto.Message) {
xxx_messageInfo_CheckServiceNode.Merge(m, src)
}
func (m *CheckServiceNode) XXX_Size() int {
return m.Size()
}
func (m *CheckServiceNode) XXX_DiscardUnknown() {
xxx_messageInfo_CheckServiceNode.DiscardUnknown(m)
}
var xxx_messageInfo_CheckServiceNode proto.InternalMessageInfo
// Node contains information about a node.
//
// mog annotation:
//
// target=github.com/hashicorp/consul/agent/structs.Node
// output=node.gen.go
// name=Structs
type Node struct {
ID github_com_hashicorp_consul_types.NodeID `protobuf:"bytes,1,opt,name=ID,proto3,casttype=github.com/hashicorp/consul/types.NodeID" json:"ID,omitempty"`
Node string `protobuf:"bytes,2,opt,name=Node,proto3" json:"Node,omitempty"`
Partition string `protobuf:"bytes,8,opt,name=Partition,proto3" json:"Partition,omitempty"`
Address string `protobuf:"bytes,3,opt,name=Address,proto3" json:"Address,omitempty"`
Datacenter string `protobuf:"bytes,4,opt,name=Datacenter,proto3" json:"Datacenter,omitempty"`
TaggedAddresses map[string]string `protobuf:"bytes,5,rep,name=TaggedAddresses,proto3" json:"TaggedAddresses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Meta map[string]string `protobuf:"bytes,6,rep,name=Meta,proto3" json:"Meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// mog: func-to=RaftIndexToStructs func-from=NewRaftIndexFromStructs
pbcommongogo.RaftIndex `protobuf:"bytes,7,opt,name=RaftIndex,proto3,embedded=RaftIndex" json:"RaftIndex"`
}
func (m *Node) Reset() { *m = Node{} }
func (m *Node) String() string { return proto.CompactTextString(m) }
func (*Node) ProtoMessage() {}
func (*Node) Descriptor() ([]byte, []int) {
return fileDescriptor_bbc215b78fa95fe5, []int{1}
}
func (m *Node) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Node.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 *Node) XXX_Merge(src proto.Message) {
xxx_messageInfo_Node.Merge(m, src)
}
func (m *Node) XXX_Size() int {
return m.Size()
}
func (m *Node) XXX_DiscardUnknown() {
xxx_messageInfo_Node.DiscardUnknown(m)
}
var xxx_messageInfo_Node proto.InternalMessageInfo
// NodeService is a service provided by a node
//
// mog annotation:
//
// target=github.com/hashicorp/consul/agent/structs.NodeService
// output=node.gen.go
// name=Structs
type NodeService struct {
// Kind is the kind of service this is. Different kinds of services may
// have differing validation, DNS behavior, etc. An empty kind will default
// to the Default kind. See ServiceKind for the full list of kinds.
Kind github_com_hashicorp_consul_agent_structs.ServiceKind `protobuf:"bytes,1,opt,name=Kind,proto3,casttype=github.com/hashicorp/consul/agent/structs.ServiceKind" json:"Kind,omitempty"`
ID string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"`
Service string `protobuf:"bytes,3,opt,name=Service,proto3" json:"Service,omitempty"`
Tags []string `protobuf:"bytes,4,rep,name=Tags,proto3" json:"Tags,omitempty"`
Address string `protobuf:"bytes,5,opt,name=Address,proto3" json:"Address,omitempty"`
// mog: func-to=MapStringServiceAddressToStructs func-from=NewMapStringServiceAddressFromStructs
TaggedAddresses map[string]ServiceAddress `protobuf:"bytes,15,rep,name=TaggedAddresses,proto3" json:"TaggedAddresses" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Meta map[string]string `protobuf:"bytes,6,rep,name=Meta,proto3" json:"Meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// mog: func-to=int func-from=int32
Port int32 `protobuf:"varint,7,opt,name=Port,proto3" json:"Port,omitempty"`
SocketPath string `protobuf:"bytes,17,opt,name=SocketPath,proto3" json:"SocketPath,omitempty"`
// mog: func-to=WeightsPtrToStructs func-from=NewWeightsPtrFromStructs
Weights *Weights `protobuf:"bytes,8,opt,name=Weights,proto3" json:"Weights,omitempty"`
EnableTagOverride bool `protobuf:"varint,9,opt,name=EnableTagOverride,proto3" json:"EnableTagOverride,omitempty"`
// Proxy is the configuration set for Kind = connect-proxy. It is mandatory in
// that case and an error to be set for any other kind. This config is part of
// a proxy service definition and is distinct from but shares some fields with
// the Connect.Proxy which configures a managed proxy as part of the actual
// service's definition. This duplication is ugly but seemed better than the
// alternative which was to re-use the same struct fields for both cases even
// though the semantics are different and the non-shred fields make no sense
// in the other case. ProxyConfig may be a more natural name here, but it's
// confusing for the UX because one of the fields in ConnectProxyConfig is
// also called just "Config"
Proxy ConnectProxyConfig `protobuf:"bytes,11,opt,name=Proxy,proto3" json:"Proxy"`
// Connect are the Connect settings for a service. This is purposely NOT
// a pointer so that we never have to nil-check this.
Connect ServiceConnect `protobuf:"bytes,12,opt,name=Connect,proto3" json:"Connect"`
// LocallyRegisteredAsSidecar is private as it is only used by a local agent
// state to track if the service was registered from a nested sidecar_service
// block. We need to track that so we can know whether we need to deregister
// it automatically too if it's removed from the service definition or if the
// parent service is deregistered. Relying only on ID would cause us to
// deregister regular services if they happen to be registered using the same
// ID scheme as our sidecars do by default. We could use meta but that gets
// unpleasant because we can't use the consul- prefix from an agent (reserved
// for use internally but in practice that means within the state store or in
// responses only), and it leaks the detail publicly which people might rely
// on which is a bit unpleasant for something that is meant to be config-file
// syntax sugar. Note this is not translated to ServiceNode and friends and
// may not be set on a NodeService that isn't the one the agent registered and
// keeps in it's local state. We never want this rendered in JSON as it's
// internal only. Right now our agent endpoints return api structs which don't
// include it but this is a safety net incase we change that or there is
// somewhere this is used in API output.
LocallyRegisteredAsSidecar bool `protobuf:"varint,13,opt,name=LocallyRegisteredAsSidecar,proto3" json:"LocallyRegisteredAsSidecar,omitempty"`
// mog: func-to=EnterpriseMetaToStructs func-from=NewEnterpriseMetaFromStructs
EnterpriseMeta pbcommongogo.EnterpriseMeta `protobuf:"bytes,16,opt,name=EnterpriseMeta,proto3" json:"EnterpriseMeta"`
// mog: func-to=RaftIndexToStructs func-from=NewRaftIndexFromStructs
pbcommongogo.RaftIndex `protobuf:"bytes,14,opt,name=RaftIndex,proto3,embedded=RaftIndex" json:"RaftIndex"`
}
func (m *NodeService) Reset() { *m = NodeService{} }
func (m *NodeService) String() string { return proto.CompactTextString(m) }
func (*NodeService) ProtoMessage() {}
func (*NodeService) Descriptor() ([]byte, []int) {
return fileDescriptor_bbc215b78fa95fe5, []int{2}
}
func (m *NodeService) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *NodeService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_NodeService.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 *NodeService) XXX_Merge(src proto.Message) {
xxx_messageInfo_NodeService.Merge(m, src)
}
func (m *NodeService) XXX_Size() int {
return m.Size()
}
func (m *NodeService) XXX_DiscardUnknown() {
xxx_messageInfo_NodeService.DiscardUnknown(m)
}
var xxx_messageInfo_NodeService proto.InternalMessageInfo
func init() {
proto.RegisterType((*CheckServiceNode)(nil), "pbservice.CheckServiceNode")
proto.RegisterType((*Node)(nil), "pbservice.Node")
proto.RegisterMapType((map[string]string)(nil), "pbservice.Node.MetaEntry")
proto.RegisterMapType((map[string]string)(nil), "pbservice.Node.TaggedAddressesEntry")
proto.RegisterType((*NodeService)(nil), "pbservice.NodeService")
proto.RegisterMapType((map[string]string)(nil), "pbservice.NodeService.MetaEntry")
proto.RegisterMapType((map[string]ServiceAddress)(nil), "pbservice.NodeService.TaggedAddressesEntry")
}
func init() { proto.RegisterFile("proto/pbservice/node.proto", fileDescriptor_bbc215b78fa95fe5) }
var fileDescriptor_bbc215b78fa95fe5 = []byte{
// 777 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6e, 0xd3, 0x4a,
0x14, 0x8e, 0x13, 0xa7, 0x69, 0x26, 0xf7, 0xf6, 0x67, 0xd4, 0x7b, 0x35, 0x37, 0xba, 0x75, 0x42,
0x61, 0x51, 0xa9, 0xc5, 0x46, 0x05, 0x04, 0x45, 0x80, 0xd4, 0x34, 0x95, 0x1a, 0x41, 0x4b, 0xe4,
0x56, 0x42, 0x02, 0xb1, 0x98, 0xd8, 0x53, 0xdb, 0x6a, 0xea, 0x89, 0xc6, 0x93, 0xaa, 0x79, 0x0b,
0x96, 0xf0, 0x12, 0x3c, 0x47, 0x97, 0x5d, 0xb2, 0x8a, 0xa0, 0x59, 0xf2, 0x06, 0x5d, 0xa1, 0x19,
0x4f, 0x12, 0xc7, 0x0d, 0x15, 0x95, 0x58, 0xe5, 0xf8, 0x9c, 0xef, 0x7c, 0x73, 0x66, 0xbe, 0xef,
0x28, 0xa0, 0xdc, 0x61, 0x94, 0x53, 0xab, 0xd3, 0x8a, 0x08, 0x3b, 0x0d, 0x1c, 0x62, 0x85, 0xd4,
0x25, 0xa6, 0x4c, 0xc2, 0xe2, 0x28, 0x5b, 0xae, 0x0c, 0x61, 0x0e, 0x3d, 0x39, 0xa1, 0xa1, 0x47,
0x3d, 0x6a, 0xc5, 0x61, 0x8c, 0x2d, 0xdf, 0x49, 0xf3, 0xf8, 0x04, 0xb7, 0xb9, 0xef, 0xf8, 0xc4,
0x39, 0x56, 0x90, 0xe5, 0x34, 0x44, 0xfd, 0xaa, 0xf2, 0x92, 0x20, 0x8d, 0x21, 0x22, 0x8a, 0xb3,
0x2b, 0x9f, 0x35, 0xb0, 0xb0, 0x2d, 0x48, 0x0e, 0x62, 0xf0, 0x3e, 0x75, 0x09, 0xbc, 0x0b, 0x74,
0xf1, 0x8b, 0xb4, 0xaa, 0xb6, 0x5a, 0xda, 0x98, 0x37, 0x47, 0x94, 0xa6, 0x48, 0xdb, 0xb2, 0x08,
0x1f, 0x80, 0x82, 0xea, 0x41, 0x59, 0x89, 0xfb, 0x37, 0x85, 0x53, 0x55, 0x7b, 0x08, 0x83, 0x26,
0x98, 0x91, 0x47, 0x45, 0x28, 0x57, 0xcd, 0xa5, 0x1a, 0x76, 0xe5, 0x75, 0x64, 0xd9, 0x56, 0xa8,
0x95, 0x1f, 0xb9, 0x78, 0x0e, 0xf8, 0x1c, 0x64, 0x1b, 0x75, 0x39, 0x4d, 0xb1, 0xb6, 0x7e, 0xd5,
0xaf, 0xac, 0x7a, 0x01, 0xf7, 0xbb, 0x2d, 0xd3, 0xa1, 0x27, 0x96, 0x8f, 0x23, 0x3f, 0x70, 0x28,
0xeb, 0x58, 0x0e, 0x0d, 0xa3, 0x6e, 0xdb, 0xe2, 0xbd, 0x0e, 0x89, 0xe4, 0x00, 0x8d, 0xba, 0x9d,
0x6d, 0xd4, 0x21, 0x54, 0xb7, 0x11, 0x53, 0x16, 0xd5, 0xf0, 0xff, 0x83, 0x62, 0x13, 0x33, 0x1e,
0xf0, 0x80, 0x86, 0x68, 0x56, 0x16, 0xc6, 0x09, 0x88, 0x40, 0x61, 0xcb, 0x75, 0x19, 0x89, 0xc4,
0xa4, 0xa2, 0x36, 0xfc, 0x84, 0x06, 0x00, 0x75, 0xcc, 0xb1, 0x43, 0x42, 0x4e, 0x18, 0xd2, 0x65,
0x31, 0x91, 0x81, 0xfb, 0x60, 0xfe, 0x10, 0x7b, 0x1e, 0x71, 0x55, 0x03, 0x89, 0x50, 0x5e, 0xde,
0xf5, 0x5e, 0xea, 0x71, 0xcc, 0x14, 0x6c, 0x27, 0xe4, 0xac, 0x67, 0xa7, 0x9b, 0xe1, 0x7d, 0xa0,
0xef, 0x11, 0x8e, 0xd1, 0x8c, 0x24, 0xf9, 0x2f, 0x4d, 0x22, 0x6a, 0x71, 0xa7, 0x84, 0xc1, 0x17,
0xa0, 0x68, 0xe3, 0x23, 0xde, 0x08, 0x5d, 0x72, 0x86, 0x0a, 0x52, 0x95, 0x7f, 0xcc, 0xb1, 0xa5,
0xcc, 0x51, 0xb1, 0x36, 0x7b, 0xde, 0xaf, 0x64, 0x2e, 0xfa, 0x15, 0xcd, 0x1e, 0x77, 0x94, 0x6b,
0x60, 0x69, 0xda, 0x58, 0x70, 0x01, 0xe4, 0x8e, 0x49, 0x2f, 0x16, 0xc0, 0x16, 0x21, 0x5c, 0x02,
0xf9, 0x53, 0xdc, 0xee, 0x0e, 0x1f, 0x35, 0xfe, 0x78, 0x96, 0x7d, 0xaa, 0x95, 0x9f, 0x80, 0xe2,
0x68, 0xaa, 0xdb, 0x34, 0xae, 0x7c, 0x29, 0x80, 0x52, 0xc2, 0x36, 0x70, 0x0f, 0xe8, 0xaf, 0x82,
0xd0, 0x55, 0xb2, 0x6f, 0x5e, 0xf5, 0x2b, 0x8f, 0x6f, 0x92, 0x1d, 0x7b, 0x24, 0xe4, 0x56, 0xc4,
0x59, 0xd7, 0xe1, 0x91, 0xa9, 0x48, 0x04, 0x81, 0x2d, 0x69, 0xe0, 0x9c, 0xf4, 0x50, 0x7c, 0xaa,
0x70, 0x05, 0x1a, 0xdb, 0x57, 0x69, 0x3c, 0x3c, 0x18, 0x02, 0xfd, 0x10, 0x7b, 0x11, 0xd2, 0xab,
0x39, 0xe1, 0x17, 0x11, 0x27, 0x1d, 0x91, 0x9f, 0x74, 0xc4, 0xfb, 0xeb, 0x8a, 0xcf, 0x4b, 0xb1,
0xd6, 0xa6, 0xaf, 0xc3, 0x54, 0xe1, 0x6b, 0xba, 0x90, 0xe3, 0xba, 0xfc, 0x8f, 0x26, 0xe4, 0xaf,
0xfe, 0x82, 0x31, 0xed, 0x02, 0x08, 0xf4, 0x26, 0x65, 0x5c, 0x1a, 0x20, 0x6f, 0xcb, 0x58, 0x18,
0xf7, 0x80, 0x3a, 0xc7, 0x84, 0x37, 0x31, 0xf7, 0xd1, 0x62, 0x6c, 0xdc, 0x71, 0x06, 0xae, 0x83,
0xc2, 0x5b, 0x12, 0x78, 0x3e, 0x8f, 0xe4, 0x3a, 0x94, 0x36, 0x60, 0xe2, 0x30, 0x55, 0xb1, 0x87,
0x10, 0xb8, 0x0e, 0x16, 0x77, 0x42, 0xdc, 0x6a, 0x93, 0x43, 0xec, 0xbd, 0x39, 0x25, 0x8c, 0x05,
0x2e, 0x41, 0xc5, 0xaa, 0xb6, 0x3a, 0x6b, 0x5f, 0x2f, 0xc0, 0x4d, 0x90, 0x6f, 0x32, 0x7a, 0xd6,
0x43, 0x25, 0xc9, 0xbc, 0x9c, 0x60, 0xde, 0xa6, 0x61, 0x48, 0x1c, 0x2e, 0xcb, 0xdb, 0x34, 0x3c,
0x0a, 0x3c, 0xf5, 0x14, 0x71, 0x07, 0xdc, 0x04, 0x05, 0x05, 0x41, 0x7f, 0xc9, 0xe6, 0xe4, 0x0a,
0xa8, 0xfb, 0x2b, 0x80, 0x6a, 0x1c, 0xe2, 0xe1, 0x4b, 0x50, 0x7e, 0x4d, 0x1d, 0xdc, 0x6e, 0xf7,
0x6c, 0xe2, 0x05, 0x11, 0x27, 0x8c, 0xb8, 0x5b, 0xd1, 0x41, 0xe0, 0x12, 0x07, 0x33, 0xf4, 0xb7,
0x1c, 0xf6, 0x06, 0x04, 0xdc, 0x05, 0x73, 0x3b, 0x62, 0xa7, 0x3b, 0x2c, 0x88, 0x88, 0x54, 0x61,
0x41, 0x4e, 0x50, 0x4e, 0x2e, 0xd4, 0x24, 0x42, 0x8d, 0x90, 0xea, 0x9b, 0xdc, 0xca, 0xb9, 0x5b,
0x6f, 0xe5, 0x87, 0xdf, 0xde, 0x4a, 0x2b, 0xb9, 0x5c, 0x53, 0xdf, 0x4a, 0x51, 0xfc, 0x89, 0x85,
0xad, 0xed, 0x9d, 0x7f, 0x37, 0x32, 0xe7, 0x97, 0x86, 0x76, 0x71, 0x69, 0x68, 0xdf, 0x2e, 0x0d,
0xed, 0xe3, 0xc0, 0xc8, 0x7c, 0x1a, 0x18, 0x99, 0x8b, 0x81, 0x91, 0xf9, 0x3a, 0x30, 0x32, 0xef,
0xd6, 0x6e, 0x5a, 0xd8, 0xd4, 0xbf, 0x55, 0x6b, 0x46, 0x26, 0x1e, 0xfe, 0x0c, 0x00, 0x00, 0xff,
0xff, 0xf9, 0x3e, 0x1b, 0x2c, 0x32, 0x07, 0x00, 0x00,
}
func (m *CheckServiceNode) 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 *CheckServiceNode) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *CheckServiceNode) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Checks) > 0 {
for iNdEx := len(m.Checks) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Checks[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintNode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
}
if m.Service != nil {
{
size, err := m.Service.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintNode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if m.Node != nil {
{
size, err := m.Node.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintNode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Node) 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 *Node) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Partition) > 0 {
i -= len(m.Partition)
copy(dAtA[i:], m.Partition)
i = encodeVarintNode(dAtA, i, uint64(len(m.Partition)))
i--
dAtA[i] = 0x42
}
{
size, err := m.RaftIndex.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintNode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x3a
if len(m.Meta) > 0 {
for k := range m.Meta {
v := m.Meta[k]
baseI := i
i -= len(v)
copy(dAtA[i:], v)
i = encodeVarintNode(dAtA, i, uint64(len(v)))
i--
dAtA[i] = 0x12
i -= len(k)
copy(dAtA[i:], k)
i = encodeVarintNode(dAtA, i, uint64(len(k)))
i--
dAtA[i] = 0xa
i = encodeVarintNode(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0x32
}
}
if len(m.TaggedAddresses) > 0 {
for k := range m.TaggedAddresses {
v := m.TaggedAddresses[k]
baseI := i
i -= len(v)
copy(dAtA[i:], v)
i = encodeVarintNode(dAtA, i, uint64(len(v)))
i--
dAtA[i] = 0x12
i -= len(k)
copy(dAtA[i:], k)
i = encodeVarintNode(dAtA, i, uint64(len(k)))
i--
dAtA[i] = 0xa
i = encodeVarintNode(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0x2a
}
}
if len(m.Datacenter) > 0 {
i -= len(m.Datacenter)
copy(dAtA[i:], m.Datacenter)
i = encodeVarintNode(dAtA, i, uint64(len(m.Datacenter)))
i--
dAtA[i] = 0x22
}
if len(m.Address) > 0 {
i -= len(m.Address)
copy(dAtA[i:], m.Address)
i = encodeVarintNode(dAtA, i, uint64(len(m.Address)))
i--
dAtA[i] = 0x1a
}
if len(m.Node) > 0 {
i -= len(m.Node)
copy(dAtA[i:], m.Node)
i = encodeVarintNode(dAtA, i, uint64(len(m.Node)))
i--
dAtA[i] = 0x12
}
if len(m.ID) > 0 {
i -= len(m.ID)
copy(dAtA[i:], m.ID)
i = encodeVarintNode(dAtA, i, uint64(len(m.ID)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *NodeService) 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 *NodeService) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *NodeService) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.SocketPath) > 0 {
i -= len(m.SocketPath)
copy(dAtA[i:], m.SocketPath)
i = encodeVarintNode(dAtA, i, uint64(len(m.SocketPath)))
i--
dAtA[i] = 0x1
i--
dAtA[i] = 0x8a
}
{
size, err := m.EnterpriseMeta.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintNode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1
i--
dAtA[i] = 0x82
if len(m.TaggedAddresses) > 0 {
for k := range m.TaggedAddresses {
v := m.TaggedAddresses[k]
baseI := i
{
size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintNode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
i -= len(k)
copy(dAtA[i:], k)
i = encodeVarintNode(dAtA, i, uint64(len(k)))
i--
dAtA[i] = 0xa
i = encodeVarintNode(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0x7a
}
}
{
size, err := m.RaftIndex.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintNode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x72
if m.LocallyRegisteredAsSidecar {
i--
if m.LocallyRegisteredAsSidecar {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x68
}
{
size, err := m.Connect.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintNode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x62
{
size, err := m.Proxy.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintNode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x5a
if m.EnableTagOverride {
i--
if m.EnableTagOverride {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x48
}
if m.Weights != nil {
{
size, err := m.Weights.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintNode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x42
}
if m.Port != 0 {
i = encodeVarintNode(dAtA, i, uint64(m.Port))
i--
dAtA[i] = 0x38
}
if len(m.Meta) > 0 {
for k := range m.Meta {
v := m.Meta[k]
baseI := i
i -= len(v)
copy(dAtA[i:], v)
i = encodeVarintNode(dAtA, i, uint64(len(v)))
i--
dAtA[i] = 0x12
i -= len(k)
copy(dAtA[i:], k)
i = encodeVarintNode(dAtA, i, uint64(len(k)))
i--
dAtA[i] = 0xa
i = encodeVarintNode(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0x32
}
}
if len(m.Address) > 0 {
i -= len(m.Address)
copy(dAtA[i:], m.Address)
i = encodeVarintNode(dAtA, i, uint64(len(m.Address)))
i--
dAtA[i] = 0x2a
}
if len(m.Tags) > 0 {
for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Tags[iNdEx])
copy(dAtA[i:], m.Tags[iNdEx])
i = encodeVarintNode(dAtA, i, uint64(len(m.Tags[iNdEx])))
i--
dAtA[i] = 0x22
}
}
if len(m.Service) > 0 {
i -= len(m.Service)
copy(dAtA[i:], m.Service)
i = encodeVarintNode(dAtA, i, uint64(len(m.Service)))
i--
dAtA[i] = 0x1a
}
if len(m.ID) > 0 {
i -= len(m.ID)
copy(dAtA[i:], m.ID)
i = encodeVarintNode(dAtA, i, uint64(len(m.ID)))
i--
dAtA[i] = 0x12
}
if len(m.Kind) > 0 {
i -= len(m.Kind)
copy(dAtA[i:], m.Kind)
i = encodeVarintNode(dAtA, i, uint64(len(m.Kind)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintNode(dAtA []byte, offset int, v uint64) int {
offset -= sovNode(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *CheckServiceNode) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Node != nil {
l = m.Node.Size()
n += 1 + l + sovNode(uint64(l))
}
if m.Service != nil {
l = m.Service.Size()
n += 1 + l + sovNode(uint64(l))
}
if len(m.Checks) > 0 {
for _, e := range m.Checks {
l = e.Size()
n += 1 + l + sovNode(uint64(l))
}
}
return n
}
func (m *Node) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovNode(uint64(l))
}
l = len(m.Node)
if l > 0 {
n += 1 + l + sovNode(uint64(l))
}
l = len(m.Address)
if l > 0 {
n += 1 + l + sovNode(uint64(l))
}
l = len(m.Datacenter)
if l > 0 {
n += 1 + l + sovNode(uint64(l))
}
if len(m.TaggedAddresses) > 0 {
for k, v := range m.TaggedAddresses {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovNode(uint64(len(k))) + 1 + len(v) + sovNode(uint64(len(v)))
n += mapEntrySize + 1 + sovNode(uint64(mapEntrySize))
}
}
if len(m.Meta) > 0 {
for k, v := range m.Meta {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovNode(uint64(len(k))) + 1 + len(v) + sovNode(uint64(len(v)))
n += mapEntrySize + 1 + sovNode(uint64(mapEntrySize))
}
}
l = m.RaftIndex.Size()
n += 1 + l + sovNode(uint64(l))
l = len(m.Partition)
if l > 0 {
n += 1 + l + sovNode(uint64(l))
}
return n
}
func (m *NodeService) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Kind)
if l > 0 {
n += 1 + l + sovNode(uint64(l))
}
l = len(m.ID)
if l > 0 {
n += 1 + l + sovNode(uint64(l))
}
l = len(m.Service)
if l > 0 {
n += 1 + l + sovNode(uint64(l))
}
if len(m.Tags) > 0 {
for _, s := range m.Tags {
l = len(s)
n += 1 + l + sovNode(uint64(l))
}
}
l = len(m.Address)
if l > 0 {
n += 1 + l + sovNode(uint64(l))
}
if len(m.Meta) > 0 {
for k, v := range m.Meta {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovNode(uint64(len(k))) + 1 + len(v) + sovNode(uint64(len(v)))
n += mapEntrySize + 1 + sovNode(uint64(mapEntrySize))
}
}
if m.Port != 0 {
n += 1 + sovNode(uint64(m.Port))
}
if m.Weights != nil {
l = m.Weights.Size()
n += 1 + l + sovNode(uint64(l))
}
if m.EnableTagOverride {
n += 2
}
l = m.Proxy.Size()
n += 1 + l + sovNode(uint64(l))
l = m.Connect.Size()
n += 1 + l + sovNode(uint64(l))
if m.LocallyRegisteredAsSidecar {
n += 2
}
l = m.RaftIndex.Size()
n += 1 + l + sovNode(uint64(l))
if len(m.TaggedAddresses) > 0 {
for k, v := range m.TaggedAddresses {
_ = k
_ = v
l = v.Size()
mapEntrySize := 1 + len(k) + sovNode(uint64(len(k))) + 1 + l + sovNode(uint64(l))
n += mapEntrySize + 1 + sovNode(uint64(mapEntrySize))
}
}
l = m.EnterpriseMeta.Size()
n += 2 + l + sovNode(uint64(l))
l = len(m.SocketPath)
if l > 0 {
n += 2 + l + sovNode(uint64(l))
}
return n
}
func sovNode(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozNode(x uint64) (n int) {
return sovNode(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *CheckServiceNode) 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 ErrIntOverflowNode
}
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: CheckServiceNode: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CheckServiceNode: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Node == nil {
m.Node = &Node{}
}
if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Service == nil {
m.Service = &NodeService{}
}
if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Checks", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Checks = append(m.Checks, &HealthCheck{})
if err := m.Checks[len(m.Checks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipNode(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthNode
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Node) 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 ErrIntOverflowNode
}
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: Node: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ID = github_com_hashicorp_consul_types.NodeID(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Node = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Address = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Datacenter", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Datacenter = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TaggedAddresses", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.TaggedAddresses == nil {
m.TaggedAddresses = 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 ErrIntOverflowNode
}
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 ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthNode
}
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 ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue < 0 {
return ErrInvalidLengthNode
}
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
} else {
iNdEx = entryPreIndex
skippy, err := skipNode(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthNode
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.TaggedAddresses[mapkey] = mapvalue
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Meta == nil {
m.Meta = 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 ErrIntOverflowNode
}
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 ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthNode
}
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 ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue < 0 {
return ErrInvalidLengthNode
}
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
} else {
iNdEx = entryPreIndex
skippy, err := skipNode(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthNode
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Meta[mapkey] = mapvalue
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RaftIndex", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.RaftIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Partition = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipNode(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthNode
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NodeService) 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 ErrIntOverflowNode
}
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: NodeService: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NodeService: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Kind = github_com_hashicorp_consul_agent_structs.ServiceKind(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Service = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Tags = append(m.Tags, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Address = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Meta == nil {
m.Meta = 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 ErrIntOverflowNode
}
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 ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthNode
}
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 ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue < 0 {
return ErrInvalidLengthNode
}
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
} else {
iNdEx = entryPreIndex
skippy, err := skipNode(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthNode
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Meta[mapkey] = mapvalue
iNdEx = postIndex
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
}
m.Port = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Port |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Weights", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Weights == nil {
m.Weights = &Weights{}
}
if err := m.Weights.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 9:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field EnableTagOverride", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.EnableTagOverride = bool(v != 0)
case 11:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Proxy", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Proxy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 12:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Connect", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Connect.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 13:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field LocallyRegisteredAsSidecar", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.LocallyRegisteredAsSidecar = bool(v != 0)
case 14:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RaftIndex", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.RaftIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 15:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TaggedAddresses", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.TaggedAddresses == nil {
m.TaggedAddresses = make(map[string]ServiceAddress)
}
var mapkey string
mapvalue := &ServiceAddress{}
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
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 ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthNode
}
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 ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapmsglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if mapmsglen < 0 {
return ErrInvalidLengthNode
}
postmsgIndex := iNdEx + mapmsglen
if postmsgIndex < 0 {
return ErrInvalidLengthNode
}
if postmsgIndex > l {
return io.ErrUnexpectedEOF
}
mapvalue = &ServiceAddress{}
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
return err
}
iNdEx = postmsgIndex
} else {
iNdEx = entryPreIndex
skippy, err := skipNode(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthNode
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.TaggedAddresses[mapkey] = *mapvalue
iNdEx = postIndex
case 16:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EnterpriseMeta", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.EnterpriseMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 17:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SocketPath", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNode
}
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 ErrInvalidLengthNode
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SocketPath = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipNode(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthNode
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipNode(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowNode
}
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, ErrIntOverflowNode
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowNode
}
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, ErrInvalidLengthNode
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupNode
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthNode
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthNode = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowNode = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupNode = fmt.Errorf("proto: unexpected end of group")
)