1 Star 0 Fork 0

zhuchance / kubernetes

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
state.pb.go 36.31 KB
Copy Edit Raw Blame History
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580
// Code generated by protoc-gen-gogo.
// source: state.proto
// DO NOT EDIT!
package mesosproto
import proto "github.com/gogo/protobuf/proto"
import math "math"
// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto/gogo.pb"
import io2 "io"
import fmt8 "fmt"
import github_com_gogo_protobuf_proto4 "github.com/gogo/protobuf/proto"
import fmt9 "fmt"
import strings4 "strings"
import reflect4 "reflect"
import fmt10 "fmt"
import strings5 "strings"
import github_com_gogo_protobuf_proto5 "github.com/gogo/protobuf/proto"
import sort2 "sort"
import strconv2 "strconv"
import reflect5 "reflect"
import fmt11 "fmt"
import bytes2 "bytes"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf
type Operation_Type int32
const (
Operation_SNAPSHOT Operation_Type = 1
Operation_DIFF Operation_Type = 3
Operation_EXPUNGE Operation_Type = 2
)
var Operation_Type_name = map[int32]string{
1: "SNAPSHOT",
3: "DIFF",
2: "EXPUNGE",
}
var Operation_Type_value = map[string]int32{
"SNAPSHOT": 1,
"DIFF": 3,
"EXPUNGE": 2,
}
func (x Operation_Type) Enum() *Operation_Type {
p := new(Operation_Type)
*p = x
return p
}
func (x Operation_Type) String() string {
return proto.EnumName(Operation_Type_name, int32(x))
}
func (x *Operation_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Operation_Type_value, data, "Operation_Type")
if err != nil {
return err
}
*x = Operation_Type(value)
return nil
}
// Describes a state entry, a versioned (via a UUID) key/value pair.
type Entry struct {
Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
Uuid []byte `protobuf:"bytes,2,req,name=uuid" json:"uuid,omitempty"`
Value []byte `protobuf:"bytes,3,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Entry) Reset() { *m = Entry{} }
func (*Entry) ProtoMessage() {}
func (m *Entry) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func (m *Entry) GetUuid() []byte {
if m != nil {
return m.Uuid
}
return nil
}
func (m *Entry) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
// Describes an operation used in the log storage implementation.
type Operation struct {
Type *Operation_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.Operation_Type" json:"type,omitempty"`
Snapshot *Operation_Snapshot `protobuf:"bytes,2,opt,name=snapshot" json:"snapshot,omitempty"`
Diff *Operation_Diff `protobuf:"bytes,4,opt,name=diff" json:"diff,omitempty"`
Expunge *Operation_Expunge `protobuf:"bytes,3,opt,name=expunge" json:"expunge,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Operation) Reset() { *m = Operation{} }
func (*Operation) ProtoMessage() {}
func (m *Operation) GetType() Operation_Type {
if m != nil && m.Type != nil {
return *m.Type
}
return Operation_SNAPSHOT
}
func (m *Operation) GetSnapshot() *Operation_Snapshot {
if m != nil {
return m.Snapshot
}
return nil
}
func (m *Operation) GetDiff() *Operation_Diff {
if m != nil {
return m.Diff
}
return nil
}
func (m *Operation) GetExpunge() *Operation_Expunge {
if m != nil {
return m.Expunge
}
return nil
}
// Describes a "snapshot" operation.
type Operation_Snapshot struct {
Entry *Entry `protobuf:"bytes,1,req,name=entry" json:"entry,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Operation_Snapshot) Reset() { *m = Operation_Snapshot{} }
func (*Operation_Snapshot) ProtoMessage() {}
func (m *Operation_Snapshot) GetEntry() *Entry {
if m != nil {
return m.Entry
}
return nil
}
// Describes a "diff" operation where the 'value' of the entry is
// just the diff itself, but the 'uuid' represents the UUID of the
// entry after applying this diff.
type Operation_Diff struct {
Entry *Entry `protobuf:"bytes,1,req,name=entry" json:"entry,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Operation_Diff) Reset() { *m = Operation_Diff{} }
func (*Operation_Diff) ProtoMessage() {}
func (m *Operation_Diff) GetEntry() *Entry {
if m != nil {
return m.Entry
}
return nil
}
// Describes an "expunge" operation.
type Operation_Expunge struct {
Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Operation_Expunge) Reset() { *m = Operation_Expunge{} }
func (*Operation_Expunge) ProtoMessage() {}
func (m *Operation_Expunge) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func init() {
proto.RegisterEnum("mesosproto.Operation_Type", Operation_Type_name, Operation_Type_value)
}
func (m *Entry) 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 io2.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 fmt8.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if index >= l {
return io2.ErrUnexpectedEOF
}
b := data[index]
index++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + int(stringLen)
if postIndex > l {
return io2.ErrUnexpectedEOF
}
s := string(data[index:postIndex])
m.Name = &s
index = postIndex
case 2:
if wireType != 2 {
return fmt8.Errorf("proto: wrong wireType = %d for field Uuid", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if index >= l {
return io2.ErrUnexpectedEOF
}
b := data[index]
index++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + byteLen
if postIndex > l {
return io2.ErrUnexpectedEOF
}
m.Uuid = append([]byte{}, data[index:postIndex]...)
index = postIndex
case 3:
if wireType != 2 {
return fmt8.Errorf("proto: wrong wireType = %d for field Value", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if index >= l {
return io2.ErrUnexpectedEOF
}
b := data[index]
index++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + byteLen
if postIndex > l {
return io2.ErrUnexpectedEOF
}
m.Value = append([]byte{}, data[index:postIndex]...)
index = postIndex
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
index -= sizeOfWire
skippy, err := github_com_gogo_protobuf_proto4.Skip(data[index:])
if err != nil {
return err
}
if (index + skippy) > l {
return io2.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
index += skippy
}
}
return nil
}
func (m *Operation) 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 io2.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 != 0 {
return fmt8.Errorf("proto: wrong wireType = %d for field Type", wireType)
}
var v Operation_Type
for shift := uint(0); ; shift += 7 {
if index >= l {
return io2.ErrUnexpectedEOF
}
b := data[index]
index++
v |= (Operation_Type(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Type = &v
case 2:
if wireType != 2 {
return fmt8.Errorf("proto: wrong wireType = %d for field Snapshot", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if index >= l {
return io2.ErrUnexpectedEOF
}
b := data[index]
index++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + msglen
if postIndex > l {
return io2.ErrUnexpectedEOF
}
if m.Snapshot == nil {
m.Snapshot = &Operation_Snapshot{}
}
if err := m.Snapshot.Unmarshal(data[index:postIndex]); err != nil {
return err
}
index = postIndex
case 4:
if wireType != 2 {
return fmt8.Errorf("proto: wrong wireType = %d for field Diff", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if index >= l {
return io2.ErrUnexpectedEOF
}
b := data[index]
index++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + msglen
if postIndex > l {
return io2.ErrUnexpectedEOF
}
if m.Diff == nil {
m.Diff = &Operation_Diff{}
}
if err := m.Diff.Unmarshal(data[index:postIndex]); err != nil {
return err
}
index = postIndex
case 3:
if wireType != 2 {
return fmt8.Errorf("proto: wrong wireType = %d for field Expunge", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if index >= l {
return io2.ErrUnexpectedEOF
}
b := data[index]
index++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + msglen
if postIndex > l {
return io2.ErrUnexpectedEOF
}
if m.Expunge == nil {
m.Expunge = &Operation_Expunge{}
}
if err := m.Expunge.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 := github_com_gogo_protobuf_proto4.Skip(data[index:])
if err != nil {
return err
}
if (index + skippy) > l {
return io2.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
index += skippy
}
}
return nil
}
func (m *Operation_Snapshot) 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 io2.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 fmt8.Errorf("proto: wrong wireType = %d for field Entry", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if index >= l {
return io2.ErrUnexpectedEOF
}
b := data[index]
index++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + msglen
if postIndex > l {
return io2.ErrUnexpectedEOF
}
if m.Entry == nil {
m.Entry = &Entry{}
}
if err := m.Entry.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 := github_com_gogo_protobuf_proto4.Skip(data[index:])
if err != nil {
return err
}
if (index + skippy) > l {
return io2.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
index += skippy
}
}
return nil
}
func (m *Operation_Diff) 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 io2.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 fmt8.Errorf("proto: wrong wireType = %d for field Entry", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if index >= l {
return io2.ErrUnexpectedEOF
}
b := data[index]
index++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + msglen
if postIndex > l {
return io2.ErrUnexpectedEOF
}
if m.Entry == nil {
m.Entry = &Entry{}
}
if err := m.Entry.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 := github_com_gogo_protobuf_proto4.Skip(data[index:])
if err != nil {
return err
}
if (index + skippy) > l {
return io2.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
index += skippy
}
}
return nil
}
func (m *Operation_Expunge) 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 io2.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 fmt8.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if index >= l {
return io2.ErrUnexpectedEOF
}
b := data[index]
index++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
postIndex := index + int(stringLen)
if postIndex > l {
return io2.ErrUnexpectedEOF
}
s := string(data[index:postIndex])
m.Name = &s
index = postIndex
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
index -= sizeOfWire
skippy, err := github_com_gogo_protobuf_proto4.Skip(data[index:])
if err != nil {
return err
}
if (index + skippy) > l {
return io2.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
index += skippy
}
}
return nil
}
func (this *Entry) String() string {
if this == nil {
return "nil"
}
s := strings4.Join([]string{`&Entry{`,
`Name:` + valueToStringState(this.Name) + `,`,
`Uuid:` + valueToStringState(this.Uuid) + `,`,
`Value:` + valueToStringState(this.Value) + `,`,
`XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Operation) String() string {
if this == nil {
return "nil"
}
s := strings4.Join([]string{`&Operation{`,
`Type:` + valueToStringState(this.Type) + `,`,
`Snapshot:` + strings4.Replace(fmt9.Sprintf("%v", this.Snapshot), "Operation_Snapshot", "Operation_Snapshot", 1) + `,`,
`Diff:` + strings4.Replace(fmt9.Sprintf("%v", this.Diff), "Operation_Diff", "Operation_Diff", 1) + `,`,
`Expunge:` + strings4.Replace(fmt9.Sprintf("%v", this.Expunge), "Operation_Expunge", "Operation_Expunge", 1) + `,`,
`XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Operation_Snapshot) String() string {
if this == nil {
return "nil"
}
s := strings4.Join([]string{`&Operation_Snapshot{`,
`Entry:` + strings4.Replace(fmt9.Sprintf("%v", this.Entry), "Entry", "Entry", 1) + `,`,
`XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Operation_Diff) String() string {
if this == nil {
return "nil"
}
s := strings4.Join([]string{`&Operation_Diff{`,
`Entry:` + strings4.Replace(fmt9.Sprintf("%v", this.Entry), "Entry", "Entry", 1) + `,`,
`XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Operation_Expunge) String() string {
if this == nil {
return "nil"
}
s := strings4.Join([]string{`&Operation_Expunge{`,
`Name:` + valueToStringState(this.Name) + `,`,
`XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func valueToStringState(v interface{}) string {
rv := reflect4.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect4.Indirect(rv).Interface()
return fmt9.Sprintf("*%v", pv)
}
func (m *Entry) Size() (n int) {
var l int
_ = l
if m.Name != nil {
l = len(*m.Name)
n += 1 + l + sovState(uint64(l))
}
if m.Uuid != nil {
l = len(m.Uuid)
n += 1 + l + sovState(uint64(l))
}
if m.Value != nil {
l = len(m.Value)
n += 1 + l + sovState(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Operation) Size() (n int) {
var l int
_ = l
if m.Type != nil {
n += 1 + sovState(uint64(*m.Type))
}
if m.Snapshot != nil {
l = m.Snapshot.Size()
n += 1 + l + sovState(uint64(l))
}
if m.Diff != nil {
l = m.Diff.Size()
n += 1 + l + sovState(uint64(l))
}
if m.Expunge != nil {
l = m.Expunge.Size()
n += 1 + l + sovState(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Operation_Snapshot) Size() (n int) {
var l int
_ = l
if m.Entry != nil {
l = m.Entry.Size()
n += 1 + l + sovState(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Operation_Diff) Size() (n int) {
var l int
_ = l
if m.Entry != nil {
l = m.Entry.Size()
n += 1 + l + sovState(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Operation_Expunge) Size() (n int) {
var l int
_ = l
if m.Name != nil {
l = len(*m.Name)
n += 1 + l + sovState(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovState(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozState(x uint64) (n int) {
return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func NewPopulatedEntry(r randyState, easy bool) *Entry {
this := &Entry{}
v1 := randStringState(r)
this.Name = &v1
v2 := r.Intn(100)
this.Uuid = make([]byte, v2)
for i := 0; i < v2; i++ {
this.Uuid[i] = byte(r.Intn(256))
}
v3 := r.Intn(100)
this.Value = make([]byte, v3)
for i := 0; i < v3; i++ {
this.Value[i] = byte(r.Intn(256))
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedState(r, 4)
}
return this
}
func NewPopulatedOperation(r randyState, easy bool) *Operation {
this := &Operation{}
v4 := Operation_Type([]int32{1, 3, 2}[r.Intn(3)])
this.Type = &v4
if r.Intn(10) != 0 {
this.Snapshot = NewPopulatedOperation_Snapshot(r, easy)
}
if r.Intn(10) != 0 {
this.Diff = NewPopulatedOperation_Diff(r, easy)
}
if r.Intn(10) != 0 {
this.Expunge = NewPopulatedOperation_Expunge(r, easy)
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedState(r, 5)
}
return this
}
func NewPopulatedOperation_Snapshot(r randyState, easy bool) *Operation_Snapshot {
this := &Operation_Snapshot{}
this.Entry = NewPopulatedEntry(r, easy)
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedState(r, 2)
}
return this
}
func NewPopulatedOperation_Diff(r randyState, easy bool) *Operation_Diff {
this := &Operation_Diff{}
this.Entry = NewPopulatedEntry(r, easy)
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedState(r, 2)
}
return this
}
func NewPopulatedOperation_Expunge(r randyState, easy bool) *Operation_Expunge {
this := &Operation_Expunge{}
v5 := randStringState(r)
this.Name = &v5
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedState(r, 2)
}
return this
}
type randyState interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneState(r randyState) rune {
res := rune(r.Uint32() % 1112064)
if 55296 <= res {
res += 2047
}
return res
}
func randStringState(r randyState) string {
v6 := r.Intn(100)
tmps := make([]rune, v6)
for i := 0; i < v6; i++ {
tmps[i] = randUTF8RuneState(r)
}
return string(tmps)
}
func randUnrecognizedState(r randyState, 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 = randFieldState(data, r, fieldNumber, wire)
}
return data
}
func randFieldState(data []byte, r randyState, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
data = encodeVarintPopulateState(data, uint64(key))
v7 := r.Int63()
if r.Intn(2) == 0 {
v7 *= -1
}
data = encodeVarintPopulateState(data, uint64(v7))
case 1:
data = encodeVarintPopulateState(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 = encodeVarintPopulateState(data, uint64(key))
ll := r.Intn(100)
data = encodeVarintPopulateState(data, uint64(ll))
for j := 0; j < ll; j++ {
data = append(data, byte(r.Intn(256)))
}
default:
data = encodeVarintPopulateState(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 encodeVarintPopulateState(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 *Entry) 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 *Entry) MarshalTo(data []byte) (n int, err error) {
var i int
_ = i
var l int
_ = l
if m.Name != nil {
data[i] = 0xa
i++
i = encodeVarintState(data, i, uint64(len(*m.Name)))
i += copy(data[i:], *m.Name)
}
if m.Uuid != nil {
data[i] = 0x12
i++
i = encodeVarintState(data, i, uint64(len(m.Uuid)))
i += copy(data[i:], m.Uuid)
}
if m.Value != nil {
data[i] = 0x1a
i++
i = encodeVarintState(data, i, uint64(len(m.Value)))
i += copy(data[i:], m.Value)
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Operation) 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 *Operation) MarshalTo(data []byte) (n int, err error) {
var i int
_ = i
var l int
_ = l
if m.Type != nil {
data[i] = 0x8
i++
i = encodeVarintState(data, i, uint64(*m.Type))
}
if m.Snapshot != nil {
data[i] = 0x12
i++
i = encodeVarintState(data, i, uint64(m.Snapshot.Size()))
n1, err := m.Snapshot.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n1
}
if m.Diff != nil {
data[i] = 0x22
i++
i = encodeVarintState(data, i, uint64(m.Diff.Size()))
n2, err := m.Diff.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n2
}
if m.Expunge != nil {
data[i] = 0x1a
i++
i = encodeVarintState(data, i, uint64(m.Expunge.Size()))
n3, err := m.Expunge.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 *Operation_Snapshot) 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 *Operation_Snapshot) MarshalTo(data []byte) (n int, err error) {
var i int
_ = i
var l int
_ = l
if m.Entry != nil {
data[i] = 0xa
i++
i = encodeVarintState(data, i, uint64(m.Entry.Size()))
n4, err := m.Entry.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 *Operation_Diff) 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 *Operation_Diff) MarshalTo(data []byte) (n int, err error) {
var i int
_ = i
var l int
_ = l
if m.Entry != nil {
data[i] = 0xa
i++
i = encodeVarintState(data, i, uint64(m.Entry.Size()))
n5, err := m.Entry.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 (m *Operation_Expunge) 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 *Operation_Expunge) MarshalTo(data []byte) (n int, err error) {
var i int
_ = i
var l int
_ = l
if m.Name != nil {
data[i] = 0xa
i++
i = encodeVarintState(data, i, uint64(len(*m.Name)))
i += copy(data[i:], *m.Name)
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeFixed64State(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 encodeFixed32State(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 encodeVarintState(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 (this *Entry) GoString() string {
if this == nil {
return "nil"
}
s := strings5.Join([]string{`&mesosproto.Entry{` +
`Name:` + valueToGoStringState(this.Name, "string"),
`Uuid:` + valueToGoStringState(this.Uuid, "byte"),
`Value:` + valueToGoStringState(this.Value, "byte"),
`XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
return s
}
func (this *Operation) GoString() string {
if this == nil {
return "nil"
}
s := strings5.Join([]string{`&mesosproto.Operation{` +
`Type:` + valueToGoStringState(this.Type, "mesosproto.Operation_Type"),
`Snapshot:` + fmt10.Sprintf("%#v", this.Snapshot),
`Diff:` + fmt10.Sprintf("%#v", this.Diff),
`Expunge:` + fmt10.Sprintf("%#v", this.Expunge),
`XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
return s
}
func (this *Operation_Snapshot) GoString() string {
if this == nil {
return "nil"
}
s := strings5.Join([]string{`&mesosproto.Operation_Snapshot{` +
`Entry:` + fmt10.Sprintf("%#v", this.Entry),
`XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
return s
}
func (this *Operation_Diff) GoString() string {
if this == nil {
return "nil"
}
s := strings5.Join([]string{`&mesosproto.Operation_Diff{` +
`Entry:` + fmt10.Sprintf("%#v", this.Entry),
`XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
return s
}
func (this *Operation_Expunge) GoString() string {
if this == nil {
return "nil"
}
s := strings5.Join([]string{`&mesosproto.Operation_Expunge{` +
`Name:` + valueToGoStringState(this.Name, "string"),
`XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
return s
}
func valueToGoStringState(v interface{}, typ string) string {
rv := reflect5.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect5.Indirect(rv).Interface()
return fmt10.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func extensionToGoStringState(e map[int32]github_com_gogo_protobuf_proto5.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))
}
sort2.Ints(keys)
ss := []string{}
for _, k := range keys {
ss = append(ss, strconv2.Itoa(k)+": "+e[int32(k)].GoString())
}
s += strings5.Join(ss, ",") + "}"
return s
}
func (this *Entry) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt11.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Entry)
if !ok {
return fmt11.Errorf("that is not of type *Entry")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt11.Errorf("that is type *Entry but is nil && this != nil")
} else if this == nil {
return fmt11.Errorf("that is type *Entrybut is not nil && this == nil")
}
if this.Name != nil && that1.Name != nil {
if *this.Name != *that1.Name {
return fmt11.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name)
}
} else if this.Name != nil {
return fmt11.Errorf("this.Name == nil && that.Name != nil")
} else if that1.Name != nil {
return fmt11.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name)
}
if !bytes2.Equal(this.Uuid, that1.Uuid) {
return fmt11.Errorf("Uuid this(%v) Not Equal that(%v)", this.Uuid, that1.Uuid)
}
if !bytes2.Equal(this.Value, that1.Value) {
return fmt11.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value)
}
if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Entry) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Entry)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.Name != nil && that1.Name != nil {
if *this.Name != *that1.Name {
return false
}
} else if this.Name != nil {
return false
} else if that1.Name != nil {
return false
}
if !bytes2.Equal(this.Uuid, that1.Uuid) {
return false
}
if !bytes2.Equal(this.Value, that1.Value) {
return false
}
if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Operation) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt11.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Operation)
if !ok {
return fmt11.Errorf("that is not of type *Operation")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt11.Errorf("that is type *Operation but is nil && this != nil")
} else if this == nil {
return fmt11.Errorf("that is type *Operationbut is not nil && this == nil")
}
if this.Type != nil && that1.Type != nil {
if *this.Type != *that1.Type {
return fmt11.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type)
}
} else if this.Type != nil {
return fmt11.Errorf("this.Type == nil && that.Type != nil")
} else if that1.Type != nil {
return fmt11.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type)
}
if !this.Snapshot.Equal(that1.Snapshot) {
return fmt11.Errorf("Snapshot this(%v) Not Equal that(%v)", this.Snapshot, that1.Snapshot)
}
if !this.Diff.Equal(that1.Diff) {
return fmt11.Errorf("Diff this(%v) Not Equal that(%v)", this.Diff, that1.Diff)
}
if !this.Expunge.Equal(that1.Expunge) {
return fmt11.Errorf("Expunge this(%v) Not Equal that(%v)", this.Expunge, that1.Expunge)
}
if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Operation) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Operation)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.Type != nil && that1.Type != nil {
if *this.Type != *that1.Type {
return false
}
} else if this.Type != nil {
return false
} else if that1.Type != nil {
return false
}
if !this.Snapshot.Equal(that1.Snapshot) {
return false
}
if !this.Diff.Equal(that1.Diff) {
return false
}
if !this.Expunge.Equal(that1.Expunge) {
return false
}
if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Operation_Snapshot) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt11.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Operation_Snapshot)
if !ok {
return fmt11.Errorf("that is not of type *Operation_Snapshot")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt11.Errorf("that is type *Operation_Snapshot but is nil && this != nil")
} else if this == nil {
return fmt11.Errorf("that is type *Operation_Snapshotbut is not nil && this == nil")
}
if !this.Entry.Equal(that1.Entry) {
return fmt11.Errorf("Entry this(%v) Not Equal that(%v)", this.Entry, that1.Entry)
}
if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Operation_Snapshot) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Operation_Snapshot)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if !this.Entry.Equal(that1.Entry) {
return false
}
if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Operation_Diff) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt11.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Operation_Diff)
if !ok {
return fmt11.Errorf("that is not of type *Operation_Diff")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt11.Errorf("that is type *Operation_Diff but is nil && this != nil")
} else if this == nil {
return fmt11.Errorf("that is type *Operation_Diffbut is not nil && this == nil")
}
if !this.Entry.Equal(that1.Entry) {
return fmt11.Errorf("Entry this(%v) Not Equal that(%v)", this.Entry, that1.Entry)
}
if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Operation_Diff) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Operation_Diff)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if !this.Entry.Equal(that1.Entry) {
return false
}
if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Operation_Expunge) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt11.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Operation_Expunge)
if !ok {
return fmt11.Errorf("that is not of type *Operation_Expunge")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt11.Errorf("that is type *Operation_Expunge but is nil && this != nil")
} else if this == nil {
return fmt11.Errorf("that is type *Operation_Expungebut is not nil && this == nil")
}
if this.Name != nil && that1.Name != nil {
if *this.Name != *that1.Name {
return fmt11.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name)
}
} else if this.Name != nil {
return fmt11.Errorf("this.Name == nil && that.Name != nil")
} else if that1.Name != nil {
return fmt11.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name)
}
if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Operation_Expunge) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Operation_Expunge)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.Name != nil && that1.Name != nil {
if *this.Name != *that1.Name {
return false
}
} else if this.Name != nil {
return false
} else if that1.Name != nil {
return false
}
if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
Go
1
https://gitee.com/meoom/kubernetes.git
git@gitee.com:meoom/kubernetes.git
meoom
kubernetes
kubernetes
v0.20.1

Search