1 Star 0 Fork 0

zhuchance/kubernetes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
registry.pb.go 28.20 KB
一键复制 编辑 原始数据 按行查看 历史
James DeFelice 提交于 2015-10-16 08:59 . bump mesos-go to latest master
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268
// Code generated by protoc-gen-gogo.
// source: registry.proto
// DO NOT EDIT!
package mesosproto
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto"
import bytes "bytes"
import strings "strings"
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
import sort "sort"
import strconv "strconv"
import reflect "reflect"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type Registry struct {
// Most recent leading master.
Master *Registry_Master `protobuf:"bytes,1,opt,name=master" json:"master,omitempty"`
// All admitted slaves.
Slaves *Registry_Slaves `protobuf:"bytes,2,opt,name=slaves" json:"slaves,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Registry) Reset() { *m = Registry{} }
func (*Registry) ProtoMessage() {}
func (m *Registry) GetMaster() *Registry_Master {
if m != nil {
return m.Master
}
return nil
}
func (m *Registry) GetSlaves() *Registry_Slaves {
if m != nil {
return m.Slaves
}
return nil
}
type Registry_Master struct {
Info *MasterInfo `protobuf:"bytes,1,req,name=info" json:"info,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Registry_Master) Reset() { *m = Registry_Master{} }
func (*Registry_Master) ProtoMessage() {}
func (m *Registry_Master) GetInfo() *MasterInfo {
if m != nil {
return m.Info
}
return nil
}
type Registry_Slave struct {
Info *SlaveInfo `protobuf:"bytes,1,req,name=info" json:"info,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Registry_Slave) Reset() { *m = Registry_Slave{} }
func (*Registry_Slave) ProtoMessage() {}
func (m *Registry_Slave) GetInfo() *SlaveInfo {
if m != nil {
return m.Info
}
return nil
}
type Registry_Slaves struct {
Slaves []*Registry_Slave `protobuf:"bytes,1,rep,name=slaves" json:"slaves,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Registry_Slaves) Reset() { *m = Registry_Slaves{} }
func (*Registry_Slaves) ProtoMessage() {}
func (m *Registry_Slaves) GetSlaves() []*Registry_Slave {
if m != nil {
return m.Slaves
}
return nil
}
func (this *Registry) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Registry)
if !ok {
return fmt.Errorf("that is not of type *Registry")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *Registry but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *Registrybut is not nil && this == nil")
}
if !this.Master.Equal(that1.Master) {
return fmt.Errorf("Master this(%v) Not Equal that(%v)", this.Master, that1.Master)
}
if !this.Slaves.Equal(that1.Slaves) {
return fmt.Errorf("Slaves this(%v) Not Equal that(%v)", this.Slaves, that1.Slaves)
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Registry) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Registry)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if !this.Master.Equal(that1.Master) {
return false
}
if !this.Slaves.Equal(that1.Slaves) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Registry_Master) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Registry_Master)
if !ok {
return fmt.Errorf("that is not of type *Registry_Master")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *Registry_Master but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *Registry_Masterbut is not nil && this == nil")
}
if !this.Info.Equal(that1.Info) {
return fmt.Errorf("Info this(%v) Not Equal that(%v)", this.Info, that1.Info)
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Registry_Master) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Registry_Master)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if !this.Info.Equal(that1.Info) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Registry_Slave) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Registry_Slave)
if !ok {
return fmt.Errorf("that is not of type *Registry_Slave")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *Registry_Slave but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *Registry_Slavebut is not nil && this == nil")
}
if !this.Info.Equal(that1.Info) {
return fmt.Errorf("Info this(%v) Not Equal that(%v)", this.Info, that1.Info)
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Registry_Slave) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Registry_Slave)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if !this.Info.Equal(that1.Info) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Registry_Slaves) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Registry_Slaves)
if !ok {
return fmt.Errorf("that is not of type *Registry_Slaves")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *Registry_Slaves but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *Registry_Slavesbut is not nil && this == nil")
}
if len(this.Slaves) != len(that1.Slaves) {
return fmt.Errorf("Slaves this(%v) Not Equal that(%v)", len(this.Slaves), len(that1.Slaves))
}
for i := range this.Slaves {
if !this.Slaves[i].Equal(that1.Slaves[i]) {
return fmt.Errorf("Slaves this[%v](%v) Not Equal that[%v](%v)", i, this.Slaves[i], i, that1.Slaves[i])
}
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Registry_Slaves) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Registry_Slaves)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if len(this.Slaves) != len(that1.Slaves) {
return false
}
for i := range this.Slaves {
if !this.Slaves[i].Equal(that1.Slaves[i]) {
return false
}
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Registry) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 6)
s = append(s, "&mesosproto.Registry{")
if this.Master != nil {
s = append(s, "Master: "+fmt.Sprintf("%#v", this.Master)+",\n")
}
if this.Slaves != nil {
s = append(s, "Slaves: "+fmt.Sprintf("%#v", this.Slaves)+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Registry_Master) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&mesosproto.Registry_Master{")
if this.Info != nil {
s = append(s, "Info: "+fmt.Sprintf("%#v", this.Info)+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Registry_Slave) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&mesosproto.Registry_Slave{")
if this.Info != nil {
s = append(s, "Info: "+fmt.Sprintf("%#v", this.Info)+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Registry_Slaves) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&mesosproto.Registry_Slaves{")
if this.Slaves != nil {
s = append(s, "Slaves: "+fmt.Sprintf("%#v", this.Slaves)+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func valueToGoStringRegistry(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func extensionToGoStringRegistry(e map[int32]github_com_gogo_protobuf_proto.Extension) string {
if e == nil {
return "nil"
}
s := "map[int32]proto.Extension{"
keys := make([]int, 0, len(e))
for k := range e {
keys = append(keys, int(k))
}
sort.Ints(keys)
ss := []string{}
for _, k := range keys {
ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString())
}
s += strings.Join(ss, ",") + "}"
return s
}
func (m *Registry) 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 *Registry) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Master != nil {
data[i] = 0xa
i++
i = encodeVarintRegistry(data, i, uint64(m.Master.Size()))
n1, err := m.Master.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n1
}
if m.Slaves != nil {
data[i] = 0x12
i++
i = encodeVarintRegistry(data, i, uint64(m.Slaves.Size()))
n2, err := m.Slaves.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 *Registry_Master) 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 *Registry_Master) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Info == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("info")
} else {
data[i] = 0xa
i++
i = encodeVarintRegistry(data, i, uint64(m.Info.Size()))
n3, err := m.Info.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n3
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Registry_Slave) 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 *Registry_Slave) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Info == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("info")
} else {
data[i] = 0xa
i++
i = encodeVarintRegistry(data, i, uint64(m.Info.Size()))
n4, err := m.Info.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 *Registry_Slaves) 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 *Registry_Slaves) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Slaves) > 0 {
for _, msg := range m.Slaves {
data[i] = 0xa
i++
i = encodeVarintRegistry(data, i, uint64(msg.Size()))
n, err := msg.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeFixed64Registry(data []byte, offset int, v uint64) int {
data[offset] = uint8(v)
data[offset+1] = uint8(v >> 8)
data[offset+2] = uint8(v >> 16)
data[offset+3] = uint8(v >> 24)
data[offset+4] = uint8(v >> 32)
data[offset+5] = uint8(v >> 40)
data[offset+6] = uint8(v >> 48)
data[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32Registry(data []byte, offset int, v uint32) int {
data[offset] = uint8(v)
data[offset+1] = uint8(v >> 8)
data[offset+2] = uint8(v >> 16)
data[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintRegistry(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 NewPopulatedRegistry(r randyRegistry, easy bool) *Registry {
this := &Registry{}
if r.Intn(10) != 0 {
this.Master = NewPopulatedRegistry_Master(r, easy)
}
if r.Intn(10) != 0 {
this.Slaves = NewPopulatedRegistry_Slaves(r, easy)
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedRegistry(r, 3)
}
return this
}
func NewPopulatedRegistry_Master(r randyRegistry, easy bool) *Registry_Master {
this := &Registry_Master{}
this.Info = NewPopulatedMasterInfo(r, easy)
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedRegistry(r, 2)
}
return this
}
func NewPopulatedRegistry_Slave(r randyRegistry, easy bool) *Registry_Slave {
this := &Registry_Slave{}
this.Info = NewPopulatedSlaveInfo(r, easy)
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedRegistry(r, 2)
}
return this
}
func NewPopulatedRegistry_Slaves(r randyRegistry, easy bool) *Registry_Slaves {
this := &Registry_Slaves{}
if r.Intn(10) != 0 {
v1 := r.Intn(10)
this.Slaves = make([]*Registry_Slave, v1)
for i := 0; i < v1; i++ {
this.Slaves[i] = NewPopulatedRegistry_Slave(r, easy)
}
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedRegistry(r, 2)
}
return this
}
type randyRegistry interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneRegistry(r randyRegistry) rune {
ru := r.Intn(62)
if ru < 10 {
return rune(ru + 48)
} else if ru < 36 {
return rune(ru + 55)
}
return rune(ru + 61)
}
func randStringRegistry(r randyRegistry) string {
v2 := r.Intn(100)
tmps := make([]rune, v2)
for i := 0; i < v2; i++ {
tmps[i] = randUTF8RuneRegistry(r)
}
return string(tmps)
}
func randUnrecognizedRegistry(r randyRegistry, maxFieldNumber int) (data []byte) {
l := r.Intn(5)
for i := 0; i < l; i++ {
wire := r.Intn(4)
if wire == 3 {
wire = 5
}
fieldNumber := maxFieldNumber + r.Intn(100)
data = randFieldRegistry(data, r, fieldNumber, wire)
}
return data
}
func randFieldRegistry(data []byte, r randyRegistry, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
data = encodeVarintPopulateRegistry(data, uint64(key))
v3 := r.Int63()
if r.Intn(2) == 0 {
v3 *= -1
}
data = encodeVarintPopulateRegistry(data, uint64(v3))
case 1:
data = encodeVarintPopulateRegistry(data, uint64(key))
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
case 2:
data = encodeVarintPopulateRegistry(data, uint64(key))
ll := r.Intn(100)
data = encodeVarintPopulateRegistry(data, uint64(ll))
for j := 0; j < ll; j++ {
data = append(data, byte(r.Intn(256)))
}
default:
data = encodeVarintPopulateRegistry(data, uint64(key))
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
}
return data
}
func encodeVarintPopulateRegistry(data []byte, v uint64) []byte {
for v >= 1<<7 {
data = append(data, uint8(uint64(v)&0x7f|0x80))
v >>= 7
}
data = append(data, uint8(v))
return data
}
func (m *Registry) Size() (n int) {
var l int
_ = l
if m.Master != nil {
l = m.Master.Size()
n += 1 + l + sovRegistry(uint64(l))
}
if m.Slaves != nil {
l = m.Slaves.Size()
n += 1 + l + sovRegistry(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Registry_Master) Size() (n int) {
var l int
_ = l
if m.Info != nil {
l = m.Info.Size()
n += 1 + l + sovRegistry(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Registry_Slave) Size() (n int) {
var l int
_ = l
if m.Info != nil {
l = m.Info.Size()
n += 1 + l + sovRegistry(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Registry_Slaves) Size() (n int) {
var l int
_ = l
if len(m.Slaves) > 0 {
for _, e := range m.Slaves {
l = e.Size()
n += 1 + l + sovRegistry(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovRegistry(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozRegistry(x uint64) (n int) {
return sovRegistry(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *Registry) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Registry{`,
`Master:` + strings.Replace(fmt.Sprintf("%v", this.Master), "Registry_Master", "Registry_Master", 1) + `,`,
`Slaves:` + strings.Replace(fmt.Sprintf("%v", this.Slaves), "Registry_Slaves", "Registry_Slaves", 1) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Registry_Master) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Registry_Master{`,
`Info:` + strings.Replace(fmt.Sprintf("%v", this.Info), "MasterInfo", "MasterInfo", 1) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Registry_Slave) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Registry_Slave{`,
`Info:` + strings.Replace(fmt.Sprintf("%v", this.Info), "SlaveInfo", "SlaveInfo", 1) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Registry_Slaves) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Registry_Slaves{`,
`Slaves:` + strings.Replace(fmt.Sprintf("%v", this.Slaves), "Registry_Slave", "Registry_Slave", 1) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func valueToStringRegistry(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *Registry) Unmarshal(data []byte) error {
l := len(data)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
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)
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Master", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRegistry
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Master == nil {
m.Master = &Registry_Master{}
}
if err := m.Master.Unmarshal(data[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Slaves", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRegistry
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Slaves == nil {
m.Slaves = &Registry_Slaves{}
}
if err := m.Slaves.Unmarshal(data[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
iNdEx -= sizeOfWire
skippy, err := skipRegistry(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRegistry
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
return nil
}
func (m *Registry_Master) Unmarshal(data []byte) error {
var hasFields [1]uint64
l := len(data)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
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)
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRegistry
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Info == nil {
m.Info = &MasterInfo{}
}
if err := m.Info.Unmarshal(data[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
hasFields[0] |= uint64(0x00000001)
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
iNdEx -= sizeOfWire
skippy, err := skipRegistry(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRegistry
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if hasFields[0]&uint64(0x00000001) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("info")
}
return nil
}
func (m *Registry_Slave) Unmarshal(data []byte) error {
var hasFields [1]uint64
l := len(data)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
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)
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRegistry
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Info == nil {
m.Info = &SlaveInfo{}
}
if err := m.Info.Unmarshal(data[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
hasFields[0] |= uint64(0x00000001)
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
iNdEx -= sizeOfWire
skippy, err := skipRegistry(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRegistry
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if hasFields[0]&uint64(0x00000001) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("info")
}
return nil
}
func (m *Registry_Slaves) Unmarshal(data []byte) error {
l := len(data)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
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)
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Slaves", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRegistry
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Slaves = append(m.Slaves, &Registry_Slave{})
if err := m.Slaves[len(m.Slaves)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
iNdEx -= sizeOfWire
skippy, err := skipRegistry(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRegistry
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
return nil
}
func skipRegistry(data []byte) (n int, err error) {
l := len(data)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
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 {
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 iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthRegistry
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
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 := skipRegistry(data[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthRegistry = fmt.Errorf("proto: negative length found during unmarshaling")
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/meoom/kubernetes.git
git@gitee.com:meoom/kubernetes.git
meoom
kubernetes
kubernetes
v1.2.0-alpha.2

搜索帮助

Dd8185d8 1850385 E526c682 1850385