1 Star 0 Fork 0

蒲杰 / canal-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CanalProtocol.pb.go 105.66 KB
一键复制 编辑 原始数据 按行查看 历史
jackey.pu 提交于 2021-04-16 17:00 . Init
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: CanalProtocol.proto
package packet
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
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
type Compression int32
const (
Compression_COMPRESSIONCOMPATIBLEPROTO2 Compression = 0
Compression_NONE Compression = 1
Compression_ZLIB Compression = 2
Compression_GZIP Compression = 3
Compression_LZF Compression = 4
)
var Compression_name = map[int32]string{
0: "COMPRESSIONCOMPATIBLEPROTO2",
1: "NONE",
2: "ZLIB",
3: "GZIP",
4: "LZF",
}
var Compression_value = map[string]int32{
"COMPRESSIONCOMPATIBLEPROTO2": 0,
"NONE": 1,
"ZLIB": 2,
"GZIP": 3,
"LZF": 4,
}
func (x Compression) String() string {
return proto.EnumName(Compression_name, int32(x))
}
func (Compression) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{0}
}
type PacketType int32
const (
//compatible
PacketType_PACKAGETYPECOMPATIBLEPROTO2 PacketType = 0
PacketType_HANDSHAKE PacketType = 1
PacketType_CLIENTAUTHENTICATION PacketType = 2
PacketType_ACK PacketType = 3
PacketType_SUBSCRIPTION PacketType = 4
PacketType_UNSUBSCRIPTION PacketType = 5
PacketType_GET PacketType = 6
PacketType_MESSAGES PacketType = 7
PacketType_CLIENTACK PacketType = 8
// management part
PacketType_SHUTDOWN PacketType = 9
// integration
PacketType_DUMP PacketType = 10
PacketType_HEARTBEAT PacketType = 11
PacketType_CLIENTROLLBACK PacketType = 12
)
var PacketType_name = map[int32]string{
0: "PACKAGETYPECOMPATIBLEPROTO2",
1: "HANDSHAKE",
2: "CLIENTAUTHENTICATION",
3: "ACK",
4: "SUBSCRIPTION",
5: "UNSUBSCRIPTION",
6: "GET",
7: "MESSAGES",
8: "CLIENTACK",
9: "SHUTDOWN",
10: "DUMP",
11: "HEARTBEAT",
12: "CLIENTROLLBACK",
}
var PacketType_value = map[string]int32{
"PACKAGETYPECOMPATIBLEPROTO2": 0,
"HANDSHAKE": 1,
"CLIENTAUTHENTICATION": 2,
"ACK": 3,
"SUBSCRIPTION": 4,
"UNSUBSCRIPTION": 5,
"GET": 6,
"MESSAGES": 7,
"CLIENTACK": 8,
"SHUTDOWN": 9,
"DUMP": 10,
"HEARTBEAT": 11,
"CLIENTROLLBACK": 12,
}
func (x PacketType) String() string {
return proto.EnumName(PacketType_name, int32(x))
}
func (PacketType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{1}
}
type Packet struct {
//[default = 17];
//
// Types that are valid to be assigned to MagicNumberPresent:
// *Packet_MagicNumber
MagicNumberPresent isPacket_MagicNumberPresent `protobuf_oneof:"magic_number_present"`
//[default = 1];
//
// Types that are valid to be assigned to VersionPresent:
// *Packet_Version
VersionPresent isPacket_VersionPresent `protobuf_oneof:"version_present"`
Type PacketType `protobuf:"varint,3,opt,name=type,proto3,enum=com.alibaba.otter.canal.protocol.packet.PacketType" json:"type,omitempty"`
//[default = NONE];
//
// Types that are valid to be assigned to CompressionPresent:
// *Packet_Compression
CompressionPresent isPacket_CompressionPresent `protobuf_oneof:"compression_present"`
Body []byte `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Packet) Reset() { *m = Packet{} }
func (m *Packet) String() string { return proto.CompactTextString(m) }
func (*Packet) ProtoMessage() {}
func (*Packet) Descriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{0}
}
func (m *Packet) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Packet.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 *Packet) XXX_Merge(src proto.Message) {
xxx_messageInfo_Packet.Merge(m, src)
}
func (m *Packet) XXX_Size() int {
return m.Size()
}
func (m *Packet) XXX_DiscardUnknown() {
xxx_messageInfo_Packet.DiscardUnknown(m)
}
var xxx_messageInfo_Packet proto.InternalMessageInfo
type isPacket_MagicNumberPresent interface {
isPacket_MagicNumberPresent()
MarshalTo([]byte) (int, error)
Size() int
}
type isPacket_VersionPresent interface {
isPacket_VersionPresent()
MarshalTo([]byte) (int, error)
Size() int
}
type isPacket_CompressionPresent interface {
isPacket_CompressionPresent()
MarshalTo([]byte) (int, error)
Size() int
}
type Packet_MagicNumber struct {
MagicNumber int32 `protobuf:"varint,1,opt,name=magic_number,json=magicNumber,proto3,oneof" json:"magic_number,omitempty"`
}
type Packet_Version struct {
Version int32 `protobuf:"varint,2,opt,name=version,proto3,oneof" json:"version,omitempty"`
}
type Packet_Compression struct {
Compression Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=com.alibaba.otter.canal.protocol.packet.Compression,oneof" json:"compression,omitempty"`
}
func (*Packet_MagicNumber) isPacket_MagicNumberPresent() {}
func (*Packet_Version) isPacket_VersionPresent() {}
func (*Packet_Compression) isPacket_CompressionPresent() {}
func (m *Packet) GetMagicNumberPresent() isPacket_MagicNumberPresent {
if m != nil {
return m.MagicNumberPresent
}
return nil
}
func (m *Packet) GetVersionPresent() isPacket_VersionPresent {
if m != nil {
return m.VersionPresent
}
return nil
}
func (m *Packet) GetCompressionPresent() isPacket_CompressionPresent {
if m != nil {
return m.CompressionPresent
}
return nil
}
func (m *Packet) GetMagicNumber() int32 {
if x, ok := m.GetMagicNumberPresent().(*Packet_MagicNumber); ok {
return x.MagicNumber
}
return 0
}
func (m *Packet) GetVersion() int32 {
if x, ok := m.GetVersionPresent().(*Packet_Version); ok {
return x.Version
}
return 0
}
func (m *Packet) GetType() PacketType {
if m != nil {
return m.Type
}
return PacketType_PACKAGETYPECOMPATIBLEPROTO2
}
func (m *Packet) GetCompression() Compression {
if x, ok := m.GetCompressionPresent().(*Packet_Compression); ok {
return x.Compression
}
return Compression_COMPRESSIONCOMPATIBLEPROTO2
}
func (m *Packet) GetBody() []byte {
if m != nil {
return m.Body
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*Packet) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*Packet_MagicNumber)(nil),
(*Packet_Version)(nil),
(*Packet_Compression)(nil),
}
}
type HeartBeat struct {
SendTimestamp int64 `protobuf:"varint,1,opt,name=send_timestamp,json=sendTimestamp,proto3" json:"send_timestamp,omitempty"`
StartTimestamp int64 `protobuf:"varint,2,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HeartBeat) Reset() { *m = HeartBeat{} }
func (m *HeartBeat) String() string { return proto.CompactTextString(m) }
func (*HeartBeat) ProtoMessage() {}
func (*HeartBeat) Descriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{1}
}
func (m *HeartBeat) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *HeartBeat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_HeartBeat.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 *HeartBeat) XXX_Merge(src proto.Message) {
xxx_messageInfo_HeartBeat.Merge(m, src)
}
func (m *HeartBeat) XXX_Size() int {
return m.Size()
}
func (m *HeartBeat) XXX_DiscardUnknown() {
xxx_messageInfo_HeartBeat.DiscardUnknown(m)
}
var xxx_messageInfo_HeartBeat proto.InternalMessageInfo
func (m *HeartBeat) GetSendTimestamp() int64 {
if m != nil {
return m.SendTimestamp
}
return 0
}
func (m *HeartBeat) GetStartTimestamp() int64 {
if m != nil {
return m.StartTimestamp
}
return 0
}
type Handshake struct {
// [default = "utf8"];
//
// Types that are valid to be assigned to CommunicationEncodingPresent:
// *Handshake_CommunicationEncoding
CommunicationEncodingPresent isHandshake_CommunicationEncodingPresent `protobuf_oneof:"communication_encoding_present"`
Seeds []byte `protobuf:"bytes,2,opt,name=seeds,proto3" json:"seeds,omitempty"`
SupportedCompressions Compression `protobuf:"varint,3,opt,name=supported_compressions,json=supportedCompressions,proto3,enum=com.alibaba.otter.canal.protocol.packet.Compression" json:"supported_compressions,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Handshake) Reset() { *m = Handshake{} }
func (m *Handshake) String() string { return proto.CompactTextString(m) }
func (*Handshake) ProtoMessage() {}
func (*Handshake) Descriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{2}
}
func (m *Handshake) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Handshake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Handshake.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 *Handshake) XXX_Merge(src proto.Message) {
xxx_messageInfo_Handshake.Merge(m, src)
}
func (m *Handshake) XXX_Size() int {
return m.Size()
}
func (m *Handshake) XXX_DiscardUnknown() {
xxx_messageInfo_Handshake.DiscardUnknown(m)
}
var xxx_messageInfo_Handshake proto.InternalMessageInfo
type isHandshake_CommunicationEncodingPresent interface {
isHandshake_CommunicationEncodingPresent()
MarshalTo([]byte) (int, error)
Size() int
}
type Handshake_CommunicationEncoding struct {
CommunicationEncoding string `protobuf:"bytes,1,opt,name=communication_encoding,json=communicationEncoding,proto3,oneof" json:"communication_encoding,omitempty"`
}
func (*Handshake_CommunicationEncoding) isHandshake_CommunicationEncodingPresent() {}
func (m *Handshake) GetCommunicationEncodingPresent() isHandshake_CommunicationEncodingPresent {
if m != nil {
return m.CommunicationEncodingPresent
}
return nil
}
func (m *Handshake) GetCommunicationEncoding() string {
if x, ok := m.GetCommunicationEncodingPresent().(*Handshake_CommunicationEncoding); ok {
return x.CommunicationEncoding
}
return ""
}
func (m *Handshake) GetSeeds() []byte {
if m != nil {
return m.Seeds
}
return nil
}
func (m *Handshake) GetSupportedCompressions() Compression {
if m != nil {
return m.SupportedCompressions
}
return Compression_COMPRESSIONCOMPATIBLEPROTO2
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*Handshake) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*Handshake_CommunicationEncoding)(nil),
}
}
// client authentication
type ClientAuth struct {
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
Password []byte `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
// [default = 0]
//
// Types that are valid to be assigned to NetReadTimeoutPresent:
// *ClientAuth_NetReadTimeout
NetReadTimeoutPresent isClientAuth_NetReadTimeoutPresent `protobuf_oneof:"net_read_timeout_present"`
// [default = 0];
//
// Types that are valid to be assigned to NetWriteTimeoutPresent:
// *ClientAuth_NetWriteTimeout
NetWriteTimeoutPresent isClientAuth_NetWriteTimeoutPresent `protobuf_oneof:"net_write_timeout_present"`
Destination string `protobuf:"bytes,5,opt,name=destination,proto3" json:"destination,omitempty"`
ClientId string `protobuf:"bytes,6,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
Filter string `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"`
StartTimestamp int64 `protobuf:"varint,8,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClientAuth) Reset() { *m = ClientAuth{} }
func (m *ClientAuth) String() string { return proto.CompactTextString(m) }
func (*ClientAuth) ProtoMessage() {}
func (*ClientAuth) Descriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{3}
}
func (m *ClientAuth) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ClientAuth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ClientAuth.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 *ClientAuth) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClientAuth.Merge(m, src)
}
func (m *ClientAuth) XXX_Size() int {
return m.Size()
}
func (m *ClientAuth) XXX_DiscardUnknown() {
xxx_messageInfo_ClientAuth.DiscardUnknown(m)
}
var xxx_messageInfo_ClientAuth proto.InternalMessageInfo
type isClientAuth_NetReadTimeoutPresent interface {
isClientAuth_NetReadTimeoutPresent()
MarshalTo([]byte) (int, error)
Size() int
}
type isClientAuth_NetWriteTimeoutPresent interface {
isClientAuth_NetWriteTimeoutPresent()
MarshalTo([]byte) (int, error)
Size() int
}
type ClientAuth_NetReadTimeout struct {
NetReadTimeout int32 `protobuf:"varint,3,opt,name=net_read_timeout,json=netReadTimeout,proto3,oneof" json:"net_read_timeout,omitempty"`
}
type ClientAuth_NetWriteTimeout struct {
NetWriteTimeout int32 `protobuf:"varint,4,opt,name=net_write_timeout,json=netWriteTimeout,proto3,oneof" json:"net_write_timeout,omitempty"`
}
func (*ClientAuth_NetReadTimeout) isClientAuth_NetReadTimeoutPresent() {}
func (*ClientAuth_NetWriteTimeout) isClientAuth_NetWriteTimeoutPresent() {}
func (m *ClientAuth) GetNetReadTimeoutPresent() isClientAuth_NetReadTimeoutPresent {
if m != nil {
return m.NetReadTimeoutPresent
}
return nil
}
func (m *ClientAuth) GetNetWriteTimeoutPresent() isClientAuth_NetWriteTimeoutPresent {
if m != nil {
return m.NetWriteTimeoutPresent
}
return nil
}
func (m *ClientAuth) GetUsername() string {
if m != nil {
return m.Username
}
return ""
}
func (m *ClientAuth) GetPassword() []byte {
if m != nil {
return m.Password
}
return nil
}
func (m *ClientAuth) GetNetReadTimeout() int32 {
if x, ok := m.GetNetReadTimeoutPresent().(*ClientAuth_NetReadTimeout); ok {
return x.NetReadTimeout
}
return 0
}
func (m *ClientAuth) GetNetWriteTimeout() int32 {
if x, ok := m.GetNetWriteTimeoutPresent().(*ClientAuth_NetWriteTimeout); ok {
return x.NetWriteTimeout
}
return 0
}
func (m *ClientAuth) GetDestination() string {
if m != nil {
return m.Destination
}
return ""
}
func (m *ClientAuth) GetClientId() string {
if m != nil {
return m.ClientId
}
return ""
}
func (m *ClientAuth) GetFilter() string {
if m != nil {
return m.Filter
}
return ""
}
func (m *ClientAuth) GetStartTimestamp() int64 {
if m != nil {
return m.StartTimestamp
}
return 0
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*ClientAuth) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*ClientAuth_NetReadTimeout)(nil),
(*ClientAuth_NetWriteTimeout)(nil),
}
}
type Ack struct {
//[default = 0]
//
// Types that are valid to be assigned to ErrorCodePresent:
// *Ack_ErrorCode
ErrorCodePresent isAck_ErrorCodePresent `protobuf_oneof:"error_code_present"`
ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Ack) Reset() { *m = Ack{} }
func (m *Ack) String() string { return proto.CompactTextString(m) }
func (*Ack) ProtoMessage() {}
func (*Ack) Descriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{4}
}
func (m *Ack) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Ack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Ack.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 *Ack) XXX_Merge(src proto.Message) {
xxx_messageInfo_Ack.Merge(m, src)
}
func (m *Ack) XXX_Size() int {
return m.Size()
}
func (m *Ack) XXX_DiscardUnknown() {
xxx_messageInfo_Ack.DiscardUnknown(m)
}
var xxx_messageInfo_Ack proto.InternalMessageInfo
type isAck_ErrorCodePresent interface {
isAck_ErrorCodePresent()
MarshalTo([]byte) (int, error)
Size() int
}
type Ack_ErrorCode struct {
ErrorCode int32 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3,oneof" json:"error_code,omitempty"`
}
func (*Ack_ErrorCode) isAck_ErrorCodePresent() {}
func (m *Ack) GetErrorCodePresent() isAck_ErrorCodePresent {
if m != nil {
return m.ErrorCodePresent
}
return nil
}
func (m *Ack) GetErrorCode() int32 {
if x, ok := m.GetErrorCodePresent().(*Ack_ErrorCode); ok {
return x.ErrorCode
}
return 0
}
func (m *Ack) GetErrorMessage() string {
if m != nil {
return m.ErrorMessage
}
return ""
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*Ack) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*Ack_ErrorCode)(nil),
}
}
type ClientAck struct {
Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
BatchId int64 `protobuf:"varint,3,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClientAck) Reset() { *m = ClientAck{} }
func (m *ClientAck) String() string { return proto.CompactTextString(m) }
func (*ClientAck) ProtoMessage() {}
func (*ClientAck) Descriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{5}
}
func (m *ClientAck) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ClientAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ClientAck.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 *ClientAck) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClientAck.Merge(m, src)
}
func (m *ClientAck) XXX_Size() int {
return m.Size()
}
func (m *ClientAck) XXX_DiscardUnknown() {
xxx_messageInfo_ClientAck.DiscardUnknown(m)
}
var xxx_messageInfo_ClientAck proto.InternalMessageInfo
func (m *ClientAck) GetDestination() string {
if m != nil {
return m.Destination
}
return ""
}
func (m *ClientAck) GetClientId() string {
if m != nil {
return m.ClientId
}
return ""
}
func (m *ClientAck) GetBatchId() int64 {
if m != nil {
return m.BatchId
}
return 0
}
// subscription
type Sub struct {
Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
Filter string `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Sub) Reset() { *m = Sub{} }
func (m *Sub) String() string { return proto.CompactTextString(m) }
func (*Sub) ProtoMessage() {}
func (*Sub) Descriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{6}
}
func (m *Sub) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Sub) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Sub.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 *Sub) XXX_Merge(src proto.Message) {
xxx_messageInfo_Sub.Merge(m, src)
}
func (m *Sub) XXX_Size() int {
return m.Size()
}
func (m *Sub) XXX_DiscardUnknown() {
xxx_messageInfo_Sub.DiscardUnknown(m)
}
var xxx_messageInfo_Sub proto.InternalMessageInfo
func (m *Sub) GetDestination() string {
if m != nil {
return m.Destination
}
return ""
}
func (m *Sub) GetClientId() string {
if m != nil {
return m.ClientId
}
return ""
}
func (m *Sub) GetFilter() string {
if m != nil {
return m.Filter
}
return ""
}
// Unsubscription
type Unsub struct {
Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
Filter string `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Unsub) Reset() { *m = Unsub{} }
func (m *Unsub) String() string { return proto.CompactTextString(m) }
func (*Unsub) ProtoMessage() {}
func (*Unsub) Descriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{7}
}
func (m *Unsub) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Unsub) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Unsub.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 *Unsub) XXX_Merge(src proto.Message) {
xxx_messageInfo_Unsub.Merge(m, src)
}
func (m *Unsub) XXX_Size() int {
return m.Size()
}
func (m *Unsub) XXX_DiscardUnknown() {
xxx_messageInfo_Unsub.DiscardUnknown(m)
}
var xxx_messageInfo_Unsub proto.InternalMessageInfo
func (m *Unsub) GetDestination() string {
if m != nil {
return m.Destination
}
return ""
}
func (m *Unsub) GetClientId() string {
if m != nil {
return m.ClientId
}
return ""
}
func (m *Unsub) GetFilter() string {
if m != nil {
return m.Filter
}
return ""
}
// PullRequest
type Get struct {
Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
FetchSize int32 `protobuf:"varint,3,opt,name=fetch_size,json=fetchSize,proto3" json:"fetch_size,omitempty"`
//[default = -1]
//
// Types that are valid to be assigned to TimeoutPresent:
// *Get_Timeout
TimeoutPresent isGet_TimeoutPresent `protobuf_oneof:"timeout_present"`
//[default = 2]
//
// Types that are valid to be assigned to UnitPresent:
// *Get_Unit
UnitPresent isGet_UnitPresent `protobuf_oneof:"unit_present"`
//[default = false]
//
// Types that are valid to be assigned to AutoAckPresent:
// *Get_AutoAck
AutoAckPresent isGet_AutoAckPresent `protobuf_oneof:"auto_ack_present"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Get) Reset() { *m = Get{} }
func (m *Get) String() string { return proto.CompactTextString(m) }
func (*Get) ProtoMessage() {}
func (*Get) Descriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{8}
}
func (m *Get) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Get) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Get.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 *Get) XXX_Merge(src proto.Message) {
xxx_messageInfo_Get.Merge(m, src)
}
func (m *Get) XXX_Size() int {
return m.Size()
}
func (m *Get) XXX_DiscardUnknown() {
xxx_messageInfo_Get.DiscardUnknown(m)
}
var xxx_messageInfo_Get proto.InternalMessageInfo
type isGet_TimeoutPresent interface {
isGet_TimeoutPresent()
MarshalTo([]byte) (int, error)
Size() int
}
type isGet_UnitPresent interface {
isGet_UnitPresent()
MarshalTo([]byte) (int, error)
Size() int
}
type isGet_AutoAckPresent interface {
isGet_AutoAckPresent()
MarshalTo([]byte) (int, error)
Size() int
}
type Get_Timeout struct {
Timeout int64 `protobuf:"varint,4,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
}
type Get_Unit struct {
Unit int32 `protobuf:"varint,5,opt,name=unit,proto3,oneof" json:"unit,omitempty"`
}
type Get_AutoAck struct {
AutoAck bool `protobuf:"varint,6,opt,name=auto_ack,json=autoAck,proto3,oneof" json:"auto_ack,omitempty"`
}
func (*Get_Timeout) isGet_TimeoutPresent() {}
func (*Get_Unit) isGet_UnitPresent() {}
func (*Get_AutoAck) isGet_AutoAckPresent() {}
func (m *Get) GetTimeoutPresent() isGet_TimeoutPresent {
if m != nil {
return m.TimeoutPresent
}
return nil
}
func (m *Get) GetUnitPresent() isGet_UnitPresent {
if m != nil {
return m.UnitPresent
}
return nil
}
func (m *Get) GetAutoAckPresent() isGet_AutoAckPresent {
if m != nil {
return m.AutoAckPresent
}
return nil
}
func (m *Get) GetDestination() string {
if m != nil {
return m.Destination
}
return ""
}
func (m *Get) GetClientId() string {
if m != nil {
return m.ClientId
}
return ""
}
func (m *Get) GetFetchSize() int32 {
if m != nil {
return m.FetchSize
}
return 0
}
func (m *Get) GetTimeout() int64 {
if x, ok := m.GetTimeoutPresent().(*Get_Timeout); ok {
return x.Timeout
}
return 0
}
func (m *Get) GetUnit() int32 {
if x, ok := m.GetUnitPresent().(*Get_Unit); ok {
return x.Unit
}
return 0
}
func (m *Get) GetAutoAck() bool {
if x, ok := m.GetAutoAckPresent().(*Get_AutoAck); ok {
return x.AutoAck
}
return false
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*Get) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*Get_Timeout)(nil),
(*Get_Unit)(nil),
(*Get_AutoAck)(nil),
}
}
//
type Messages struct {
BatchId int64 `protobuf:"varint,1,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
Messages [][]byte `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Messages) Reset() { *m = Messages{} }
func (m *Messages) String() string { return proto.CompactTextString(m) }
func (*Messages) ProtoMessage() {}
func (*Messages) Descriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{9}
}
func (m *Messages) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Messages) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Messages.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 *Messages) XXX_Merge(src proto.Message) {
xxx_messageInfo_Messages.Merge(m, src)
}
func (m *Messages) XXX_Size() int {
return m.Size()
}
func (m *Messages) XXX_DiscardUnknown() {
xxx_messageInfo_Messages.DiscardUnknown(m)
}
var xxx_messageInfo_Messages proto.InternalMessageInfo
func (m *Messages) GetBatchId() int64 {
if m != nil {
return m.BatchId
}
return 0
}
func (m *Messages) GetMessages() [][]byte {
if m != nil {
return m.Messages
}
return nil
}
// TBD when new packets are required
type Dump struct {
Journal string `protobuf:"bytes,1,opt,name=journal,proto3" json:"journal,omitempty"`
Position int64 `protobuf:"varint,2,opt,name=position,proto3" json:"position,omitempty"`
// [default = 0]
//
// Types that are valid to be assigned to TimestampPresent:
// *Dump_Timestamp
TimestampPresent isDump_TimestampPresent `protobuf_oneof:"timestamp_present"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Dump) Reset() { *m = Dump{} }
func (m *Dump) String() string { return proto.CompactTextString(m) }
func (*Dump) ProtoMessage() {}
func (*Dump) Descriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{10}
}
func (m *Dump) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Dump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Dump.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 *Dump) XXX_Merge(src proto.Message) {
xxx_messageInfo_Dump.Merge(m, src)
}
func (m *Dump) XXX_Size() int {
return m.Size()
}
func (m *Dump) XXX_DiscardUnknown() {
xxx_messageInfo_Dump.DiscardUnknown(m)
}
var xxx_messageInfo_Dump proto.InternalMessageInfo
type isDump_TimestampPresent interface {
isDump_TimestampPresent()
MarshalTo([]byte) (int, error)
Size() int
}
type Dump_Timestamp struct {
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"`
}
func (*Dump_Timestamp) isDump_TimestampPresent() {}
func (m *Dump) GetTimestampPresent() isDump_TimestampPresent {
if m != nil {
return m.TimestampPresent
}
return nil
}
func (m *Dump) GetJournal() string {
if m != nil {
return m.Journal
}
return ""
}
func (m *Dump) GetPosition() int64 {
if m != nil {
return m.Position
}
return 0
}
func (m *Dump) GetTimestamp() int64 {
if x, ok := m.GetTimestampPresent().(*Dump_Timestamp); ok {
return x.Timestamp
}
return 0
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*Dump) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*Dump_Timestamp)(nil),
}
}
type ClientRollback struct {
Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
BatchId int64 `protobuf:"varint,3,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClientRollback) Reset() { *m = ClientRollback{} }
func (m *ClientRollback) String() string { return proto.CompactTextString(m) }
func (*ClientRollback) ProtoMessage() {}
func (*ClientRollback) Descriptor() ([]byte, []int) {
return fileDescriptor_638f57be23f1b015, []int{11}
}
func (m *ClientRollback) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ClientRollback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ClientRollback.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 *ClientRollback) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClientRollback.Merge(m, src)
}
func (m *ClientRollback) XXX_Size() int {
return m.Size()
}
func (m *ClientRollback) XXX_DiscardUnknown() {
xxx_messageInfo_ClientRollback.DiscardUnknown(m)
}
var xxx_messageInfo_ClientRollback proto.InternalMessageInfo
func (m *ClientRollback) GetDestination() string {
if m != nil {
return m.Destination
}
return ""
}
func (m *ClientRollback) GetClientId() string {
if m != nil {
return m.ClientId
}
return ""
}
func (m *ClientRollback) GetBatchId() int64 {
if m != nil {
return m.BatchId
}
return 0
}
func init() {
proto.RegisterEnum("com.alibaba.otter.canal.protocol.packet.Compression", Compression_name, Compression_value)
proto.RegisterEnum("com.alibaba.otter.canal.protocol.packet.PacketType", PacketType_name, PacketType_value)
proto.RegisterType((*Packet)(nil), "com.alibaba.otter.canal.protocol.packet.Packet")
proto.RegisterType((*HeartBeat)(nil), "com.alibaba.otter.canal.protocol.packet.HeartBeat")
proto.RegisterType((*Handshake)(nil), "com.alibaba.otter.canal.protocol.packet.Handshake")
proto.RegisterType((*ClientAuth)(nil), "com.alibaba.otter.canal.protocol.packet.ClientAuth")
proto.RegisterType((*Ack)(nil), "com.alibaba.otter.canal.protocol.packet.Ack")
proto.RegisterType((*ClientAck)(nil), "com.alibaba.otter.canal.protocol.packet.ClientAck")
proto.RegisterType((*Sub)(nil), "com.alibaba.otter.canal.protocol.packet.Sub")
proto.RegisterType((*Unsub)(nil), "com.alibaba.otter.canal.protocol.packet.Unsub")
proto.RegisterType((*Get)(nil), "com.alibaba.otter.canal.protocol.packet.Get")
proto.RegisterType((*Messages)(nil), "com.alibaba.otter.canal.protocol.packet.Messages")
proto.RegisterType((*Dump)(nil), "com.alibaba.otter.canal.protocol.packet.Dump")
proto.RegisterType((*ClientRollback)(nil), "com.alibaba.otter.canal.protocol.packet.ClientRollback")
}
func init() { proto.RegisterFile("CanalProtocol.proto", fileDescriptor_638f57be23f1b015) }
var fileDescriptor_638f57be23f1b015 = []byte{
// 1049 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xdb, 0x46,
0x10, 0x36, 0x45, 0xc9, 0x12, 0x47, 0xb2, 0x4c, 0xaf, 0x7f, 0xa0, 0xd8, 0xa8, 0x22, 0x28, 0x28,
0x62, 0x18, 0x85, 0x0a, 0x24, 0x05, 0x7a, 0xe8, 0x89, 0x94, 0x59, 0x51, 0xb0, 0x2c, 0x09, 0x4b,
0x0a, 0x69, 0xdd, 0xa2, 0xc2, 0x8a, 0xdc, 0xd8, 0x8c, 0x44, 0x52, 0x25, 0x97, 0x0d, 0x9c, 0x27,
0xe9, 0xf3, 0xf4, 0xd4, 0x63, 0x6f, 0xbd, 0x16, 0x2e, 0x50, 0x20, 0x6f, 0x51, 0xec, 0x92, 0xa2,
0x65, 0xd7, 0x45, 0x82, 0x04, 0xb9, 0xed, 0x7c, 0x33, 0x3b, 0xb3, 0xf3, 0xcd, 0xb7, 0x4b, 0xc2,
0x6e, 0x97, 0x04, 0x64, 0x31, 0x8e, 0x42, 0x16, 0x3a, 0xe1, 0xa2, 0xb3, 0xe4, 0x0b, 0xf4, 0xd4,
0x09, 0xfd, 0x0e, 0x59, 0x78, 0x33, 0x32, 0x23, 0x9d, 0x90, 0x31, 0x1a, 0x75, 0x1c, 0x1e, 0x96,
0xba, 0x45, 0x1c, 0x71, 0xe6, 0x94, 0xb5, 0x7f, 0x2b, 0xc0, 0xe6, 0x58, 0x2c, 0xd1, 0x13, 0xa8,
0xf9, 0xe4, 0xd2, 0x73, 0xa6, 0x41, 0xe2, 0xcf, 0x68, 0xd4, 0x90, 0x5a, 0xd2, 0x71, 0xc9, 0xdc,
0xc0, 0x55, 0x81, 0x0e, 0x05, 0x88, 0x0e, 0xa1, 0xfc, 0x0b, 0x8d, 0x62, 0x2f, 0x0c, 0x1a, 0x05,
0xe1, 0x97, 0xf0, 0x0a, 0x40, 0x3d, 0x28, 0xb2, 0xeb, 0x25, 0x6d, 0xc8, 0x2d, 0xe9, 0xb8, 0xfe,
0xec, 0x79, 0xe7, 0x3d, 0xcf, 0xd0, 0x49, 0xeb, 0xdb, 0xd7, 0x4b, 0x8a, 0x45, 0x02, 0xf4, 0x1d,
0x54, 0x9d, 0xd0, 0x5f, 0x46, 0x34, 0x16, 0x85, 0x8a, 0x22, 0xdf, 0x57, 0xef, 0x9d, 0xaf, 0x7b,
0xbb, 0xd7, 0x2c, 0xe0, 0xf5, 0x54, 0x08, 0x41, 0x71, 0x16, 0xba, 0xd7, 0x8d, 0x52, 0x4b, 0x3a,
0xae, 0x61, 0xb1, 0xd6, 0x0f, 0x60, 0x6f, 0xbd, 0xef, 0x29, 0x0f, 0xa6, 0x01, 0xd3, 0x77, 0x60,
0x3b, 0xeb, 0x2c, 0x87, 0xf6, 0x61, 0x77, 0x2d, 0xdb, 0x0a, 0x6e, 0xff, 0x00, 0x8a, 0x49, 0x49,
0xc4, 0x74, 0x4a, 0x18, 0xfa, 0x1c, 0xea, 0x31, 0x0d, 0xdc, 0x29, 0xf3, 0x7c, 0x1a, 0x33, 0xe2,
0x2f, 0x05, 0x91, 0x32, 0xde, 0xe2, 0xa8, 0xbd, 0x02, 0xd1, 0x53, 0xd8, 0x8e, 0x19, 0x89, 0xd8,
0x5a, 0x5c, 0x41, 0xc4, 0xd5, 0x05, 0x9c, 0x07, 0xb6, 0xdf, 0x4a, 0xa0, 0x98, 0x24, 0x70, 0xe3,
0x2b, 0x32, 0xa7, 0xe8, 0x6b, 0x38, 0x70, 0x42, 0xdf, 0x4f, 0x02, 0xcf, 0x21, 0x8c, 0x9f, 0x81,
0x06, 0x4e, 0xe8, 0x7a, 0xc1, 0xa5, 0xa8, 0xa2, 0x98, 0x1b, 0x78, 0xff, 0x8e, 0xdf, 0xc8, 0xdc,
0x68, 0x0f, 0x4a, 0x31, 0xa5, 0x6e, 0x2c, 0xaa, 0xd4, 0x70, 0x6a, 0xa0, 0x39, 0x1c, 0xc4, 0xc9,
0x72, 0x19, 0x46, 0x8c, 0xba, 0xd3, 0xb5, 0xd6, 0xe2, 0x6c, 0x88, 0x1f, 0x44, 0x3a, 0xde, 0xcf,
0x73, 0xae, 0xa1, 0xb1, 0xde, 0x82, 0xe6, 0xc3, 0x67, 0xcf, 0x89, 0xfc, 0xb3, 0x00, 0xd0, 0x5d,
0x78, 0x34, 0x60, 0x5a, 0xc2, 0xae, 0xd0, 0x21, 0x54, 0x92, 0x98, 0x46, 0x01, 0xf1, 0x69, 0xda,
0x1e, 0xce, 0x6d, 0xee, 0x5b, 0x92, 0x38, 0x7e, 0x1d, 0x46, 0x6e, 0xd6, 0x52, 0x6e, 0xa3, 0x13,
0x50, 0x03, 0xca, 0xa6, 0x11, 0x25, 0xe9, 0x18, 0xc2, 0x84, 0x89, 0x7e, 0xb8, 0x9a, 0xeb, 0x01,
0x65, 0x98, 0x12, 0x31, 0x89, 0x30, 0x61, 0xe8, 0x0b, 0xd8, 0xe1, 0xb1, 0xaf, 0x23, 0x8f, 0xd1,
0x3c, 0xb8, 0x98, 0x49, 0x7b, 0x3b, 0xa0, 0xec, 0x05, 0xf7, 0xac, 0xa2, 0x5b, 0x50, 0x75, 0x69,
0xcc, 0xbc, 0x40, 0x34, 0x20, 0x64, 0xa4, 0xe0, 0x75, 0x08, 0x1d, 0x81, 0xe2, 0x88, 0x0e, 0xa6,
0x9e, 0xdb, 0xd8, 0x4c, 0x0f, 0x9d, 0x02, 0x7d, 0x17, 0x1d, 0xc0, 0xe6, 0x4b, 0x6f, 0xc1, 0x68,
0xd4, 0x28, 0x0b, 0x4f, 0x66, 0x3d, 0x24, 0x86, 0xca, 0x43, 0x62, 0xd0, 0x0f, 0xa1, 0x71, 0xbf,
0xb3, 0x5c, 0x9c, 0x47, 0xf0, 0xe8, 0x3f, 0x9d, 0xe4, 0xcc, 0x12, 0x90, 0x35, 0x67, 0x8e, 0x1e,
0x03, 0xd0, 0x28, 0x0a, 0xa3, 0xa9, 0x13, 0xba, 0x34, 0xbf, 0xe1, 0x8a, 0xc0, 0xba, 0xa1, 0x4b,
0xd1, 0x13, 0xd8, 0x4a, 0x03, 0x7c, 0x1a, 0xc7, 0xe4, 0x92, 0x0a, 0x6e, 0x15, 0x5c, 0x13, 0xe0,
0x79, 0x8a, 0xe9, 0x7b, 0x80, 0x6e, 0xb3, 0xe4, 0x25, 0x28, 0x28, 0xd9, 0xec, 0x9c, 0xf9, 0x7d,
0xa2, 0xa4, 0x77, 0x10, 0x55, 0xb8, 0x47, 0xd4, 0x23, 0xa8, 0xcc, 0x08, 0x73, 0xae, 0xb8, 0x4f,
0x16, 0x4c, 0x94, 0x85, 0xdd, 0x77, 0xdb, 0x3f, 0x82, 0x6c, 0x25, 0xb3, 0x8f, 0x2d, 0xf0, 0x3f,
0x93, 0x68, 0xff, 0x04, 0xa5, 0x49, 0x10, 0x7f, 0xba, 0xfc, 0x6f, 0x25, 0x90, 0x7b, 0x94, 0x7d,
0x6c, 0xfa, 0xcf, 0x00, 0x5e, 0x52, 0xce, 0x4f, 0xec, 0xbd, 0x49, 0x1f, 0xdc, 0x12, 0x56, 0x04,
0x62, 0x79, 0x6f, 0xf8, 0xe5, 0x28, 0xaf, 0x4b, 0x59, 0x36, 0x37, 0xf0, 0x0a, 0x40, 0x7b, 0x50,
0x4c, 0x02, 0x8f, 0x09, 0xed, 0x72, 0x8d, 0x0b, 0x0b, 0x1d, 0x41, 0x85, 0x24, 0x2c, 0x9c, 0x12,
0x67, 0x2e, 0x54, 0x5b, 0x31, 0x0b, 0xb8, 0xcc, 0x11, 0xcd, 0x99, 0xf3, 0x97, 0xf0, 0xbe, 0xd8,
0xea, 0x50, 0xe3, 0xfb, 0x72, 0x1b, 0x81, 0xba, 0xda, 0x9f, 0x0b, 0x42, 0x83, 0x4a, 0xa6, 0x98,
0xf8, 0xce, 0x40, 0xa5, 0x3b, 0x03, 0xe5, 0x37, 0x39, 0x13, 0x1b, 0x7f, 0x9c, 0x64, 0x7e, 0x93,
0x57, 0x76, 0xfb, 0x67, 0x28, 0x9e, 0x26, 0xfe, 0x12, 0x35, 0xa0, 0xfc, 0x2a, 0x4c, 0xa2, 0x80,
0x2c, 0x32, 0xaa, 0x56, 0xa6, 0x78, 0x07, 0xc2, 0xd8, 0x63, 0xab, 0x2f, 0x92, 0x8c, 0x73, 0x1b,
0x35, 0x41, 0xb9, 0xbd, 0x50, 0x72, 0x46, 0xc4, 0x2d, 0xa4, 0xef, 0xc2, 0x4e, 0x6e, 0xe4, 0xa7,
0x7e, 0x05, 0xf5, 0x54, 0xc6, 0x38, 0x5c, 0x2c, 0x66, 0xe4, 0x53, 0x6a, 0xf9, 0x64, 0x02, 0xd5,
0xb5, 0x17, 0x12, 0x3d, 0x86, 0xa3, 0xee, 0xe8, 0x7c, 0x8c, 0x0d, 0xcb, 0xea, 0x8f, 0x86, 0x7c,
0xa9, 0xd9, 0x7d, 0x7d, 0x60, 0x8c, 0xf1, 0xc8, 0x1e, 0x3d, 0x53, 0x37, 0x50, 0x05, 0x8a, 0xc3,
0xd1, 0xd0, 0x50, 0x25, 0xbe, 0xba, 0x18, 0xf4, 0x75, 0xb5, 0xc0, 0x57, 0xbd, 0x8b, 0xfe, 0x58,
0x95, 0x51, 0x19, 0xe4, 0xc1, 0xc5, 0xb7, 0x6a, 0xf1, 0xe4, 0x1f, 0x09, 0xe0, 0xf6, 0xa3, 0xca,
0xd3, 0x8e, 0xb5, 0xee, 0x99, 0xd6, 0x33, 0xec, 0xef, 0xc7, 0xc6, 0x03, 0x69, 0xb7, 0x40, 0x31,
0xb5, 0xe1, 0xa9, 0x65, 0x6a, 0x67, 0x3c, 0x77, 0x03, 0xf6, 0xba, 0x83, 0xbe, 0x31, 0xb4, 0xb5,
0x89, 0x6d, 0x1a, 0x43, 0xbb, 0xdf, 0xd5, 0xec, 0xfe, 0x68, 0xa8, 0x16, 0x78, 0x05, 0xad, 0x7b,
0xa6, 0xca, 0x48, 0x85, 0x9a, 0x35, 0xd1, 0xad, 0x2e, 0xee, 0x8f, 0x85, 0xab, 0x88, 0x10, 0xd4,
0x27, 0xc3, 0x3b, 0x58, 0x89, 0x87, 0xf7, 0x0c, 0x5b, 0xdd, 0x44, 0x35, 0xa8, 0x9c, 0x1b, 0x96,
0xa5, 0xf5, 0x0c, 0x4b, 0x2d, 0xf3, 0x72, 0x59, 0xfe, 0xee, 0x99, 0x5a, 0xe1, 0x4e, 0xcb, 0x9c,
0xd8, 0xa7, 0xa3, 0x17, 0x43, 0x55, 0xe1, 0xed, 0x9c, 0x4e, 0xce, 0xc7, 0x2a, 0x88, 0x53, 0x19,
0x1a, 0xb6, 0x75, 0x43, 0xb3, 0xd5, 0x2a, 0x2f, 0x90, 0xee, 0xc2, 0xa3, 0xc1, 0x40, 0xe7, 0x5b,
0x6b, 0xfa, 0xe0, 0xf7, 0x9b, 0xa6, 0xf4, 0xc7, 0x4d, 0x53, 0xfa, 0xeb, 0xa6, 0x29, 0xfd, 0xfa,
0x77, 0x73, 0x03, 0x5a, 0xef, 0xfa, 0x5e, 0xe9, 0xd5, 0xf4, 0x7f, 0x49, 0xd0, 0x63, 0x4a, 0x17,
0x4a, 0xe7, 0xcb, 0x6f, 0xd2, 0x4f, 0xd8, 0x6c, 0x53, 0xc4, 0x3c, 0xff, 0x37, 0x00, 0x00, 0xff,
0xff, 0xdd, 0x91, 0xf3, 0xed, 0x52, 0x09, 0x00, 0x00,
}
func (m *Packet) 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 *Packet) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Body) > 0 {
i -= len(m.Body)
copy(dAtA[i:], m.Body)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Body)))
i--
dAtA[i] = 0x2a
}
if m.CompressionPresent != nil {
{
size := m.CompressionPresent.Size()
i -= size
if _, err := m.CompressionPresent.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
if m.Type != 0 {
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Type))
i--
dAtA[i] = 0x18
}
if m.VersionPresent != nil {
{
size := m.VersionPresent.Size()
i -= size
if _, err := m.VersionPresent.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
if m.MagicNumberPresent != nil {
{
size := m.MagicNumberPresent.Size()
i -= size
if _, err := m.MagicNumberPresent.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
return len(dAtA) - i, nil
}
func (m *Packet_MagicNumber) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Packet_MagicNumber) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.MagicNumber))
i--
dAtA[i] = 0x8
return len(dAtA) - i, nil
}
func (m *Packet_Version) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Packet_Version) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Version))
i--
dAtA[i] = 0x10
return len(dAtA) - i, nil
}
func (m *Packet_Compression) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Packet_Compression) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Compression))
i--
dAtA[i] = 0x20
return len(dAtA) - i, nil
}
func (m *HeartBeat) 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 *HeartBeat) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *HeartBeat) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.StartTimestamp != 0 {
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.StartTimestamp))
i--
dAtA[i] = 0x10
}
if m.SendTimestamp != 0 {
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.SendTimestamp))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *Handshake) 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 *Handshake) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Handshake) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.SupportedCompressions != 0 {
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.SupportedCompressions))
i--
dAtA[i] = 0x18
}
if len(m.Seeds) > 0 {
i -= len(m.Seeds)
copy(dAtA[i:], m.Seeds)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Seeds)))
i--
dAtA[i] = 0x12
}
if m.CommunicationEncodingPresent != nil {
{
size := m.CommunicationEncodingPresent.Size()
i -= size
if _, err := m.CommunicationEncodingPresent.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
return len(dAtA) - i, nil
}
func (m *Handshake_CommunicationEncoding) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Handshake_CommunicationEncoding) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i -= len(m.CommunicationEncoding)
copy(dAtA[i:], m.CommunicationEncoding)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.CommunicationEncoding)))
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func (m *ClientAuth) 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 *ClientAuth) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ClientAuth) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.StartTimestamp != 0 {
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.StartTimestamp))
i--
dAtA[i] = 0x40
}
if len(m.Filter) > 0 {
i -= len(m.Filter)
copy(dAtA[i:], m.Filter)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Filter)))
i--
dAtA[i] = 0x3a
}
if len(m.ClientId) > 0 {
i -= len(m.ClientId)
copy(dAtA[i:], m.ClientId)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
i--
dAtA[i] = 0x32
}
if len(m.Destination) > 0 {
i -= len(m.Destination)
copy(dAtA[i:], m.Destination)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
i--
dAtA[i] = 0x2a
}
if m.NetWriteTimeoutPresent != nil {
{
size := m.NetWriteTimeoutPresent.Size()
i -= size
if _, err := m.NetWriteTimeoutPresent.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
if m.NetReadTimeoutPresent != nil {
{
size := m.NetReadTimeoutPresent.Size()
i -= size
if _, err := m.NetReadTimeoutPresent.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
if len(m.Password) > 0 {
i -= len(m.Password)
copy(dAtA[i:], m.Password)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Password)))
i--
dAtA[i] = 0x12
}
if len(m.Username) > 0 {
i -= len(m.Username)
copy(dAtA[i:], m.Username)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Username)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *ClientAuth_NetReadTimeout) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ClientAuth_NetReadTimeout) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.NetReadTimeout))
i--
dAtA[i] = 0x18
return len(dAtA) - i, nil
}
func (m *ClientAuth_NetWriteTimeout) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ClientAuth_NetWriteTimeout) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.NetWriteTimeout))
i--
dAtA[i] = 0x20
return len(dAtA) - i, nil
}
func (m *Ack) 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 *Ack) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Ack) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.ErrorMessage) > 0 {
i -= len(m.ErrorMessage)
copy(dAtA[i:], m.ErrorMessage)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ErrorMessage)))
i--
dAtA[i] = 0x12
}
if m.ErrorCodePresent != nil {
{
size := m.ErrorCodePresent.Size()
i -= size
if _, err := m.ErrorCodePresent.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
return len(dAtA) - i, nil
}
func (m *Ack_ErrorCode) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Ack_ErrorCode) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.ErrorCode))
i--
dAtA[i] = 0x8
return len(dAtA) - i, nil
}
func (m *ClientAck) 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 *ClientAck) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ClientAck) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.BatchId != 0 {
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.BatchId))
i--
dAtA[i] = 0x18
}
if len(m.ClientId) > 0 {
i -= len(m.ClientId)
copy(dAtA[i:], m.ClientId)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
i--
dAtA[i] = 0x12
}
if len(m.Destination) > 0 {
i -= len(m.Destination)
copy(dAtA[i:], m.Destination)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Sub) 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 *Sub) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Sub) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Filter) > 0 {
i -= len(m.Filter)
copy(dAtA[i:], m.Filter)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Filter)))
i--
dAtA[i] = 0x3a
}
if len(m.ClientId) > 0 {
i -= len(m.ClientId)
copy(dAtA[i:], m.ClientId)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
i--
dAtA[i] = 0x12
}
if len(m.Destination) > 0 {
i -= len(m.Destination)
copy(dAtA[i:], m.Destination)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Unsub) 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 *Unsub) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Unsub) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Filter) > 0 {
i -= len(m.Filter)
copy(dAtA[i:], m.Filter)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Filter)))
i--
dAtA[i] = 0x3a
}
if len(m.ClientId) > 0 {
i -= len(m.ClientId)
copy(dAtA[i:], m.ClientId)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
i--
dAtA[i] = 0x12
}
if len(m.Destination) > 0 {
i -= len(m.Destination)
copy(dAtA[i:], m.Destination)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Get) 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 *Get) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Get) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.AutoAckPresent != nil {
{
size := m.AutoAckPresent.Size()
i -= size
if _, err := m.AutoAckPresent.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
if m.UnitPresent != nil {
{
size := m.UnitPresent.Size()
i -= size
if _, err := m.UnitPresent.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
if m.TimeoutPresent != nil {
{
size := m.TimeoutPresent.Size()
i -= size
if _, err := m.TimeoutPresent.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
if m.FetchSize != 0 {
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.FetchSize))
i--
dAtA[i] = 0x18
}
if len(m.ClientId) > 0 {
i -= len(m.ClientId)
copy(dAtA[i:], m.ClientId)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
i--
dAtA[i] = 0x12
}
if len(m.Destination) > 0 {
i -= len(m.Destination)
copy(dAtA[i:], m.Destination)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Get_Timeout) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Get_Timeout) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Timeout))
i--
dAtA[i] = 0x20
return len(dAtA) - i, nil
}
func (m *Get_Unit) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Get_Unit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Unit))
i--
dAtA[i] = 0x28
return len(dAtA) - i, nil
}
func (m *Get_AutoAck) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Get_AutoAck) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i--
if m.AutoAck {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x30
return len(dAtA) - i, nil
}
func (m *Messages) 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 *Messages) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Messages) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Messages) > 0 {
for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Messages[iNdEx])
copy(dAtA[i:], m.Messages[iNdEx])
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Messages[iNdEx])))
i--
dAtA[i] = 0x12
}
}
if m.BatchId != 0 {
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.BatchId))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *Dump) 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 *Dump) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Dump) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.TimestampPresent != nil {
{
size := m.TimestampPresent.Size()
i -= size
if _, err := m.TimestampPresent.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
if m.Position != 0 {
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Position))
i--
dAtA[i] = 0x10
}
if len(m.Journal) > 0 {
i -= len(m.Journal)
copy(dAtA[i:], m.Journal)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Journal)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Dump_Timestamp) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Dump_Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Timestamp))
i--
dAtA[i] = 0x18
return len(dAtA) - i, nil
}
func (m *ClientRollback) 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 *ClientRollback) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ClientRollback) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.BatchId != 0 {
i = encodeVarintCanalProtocol(dAtA, i, uint64(m.BatchId))
i--
dAtA[i] = 0x18
}
if len(m.ClientId) > 0 {
i -= len(m.ClientId)
copy(dAtA[i:], m.ClientId)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
i--
dAtA[i] = 0x12
}
if len(m.Destination) > 0 {
i -= len(m.Destination)
copy(dAtA[i:], m.Destination)
i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintCanalProtocol(dAtA []byte, offset int, v uint64) int {
offset -= sovCanalProtocol(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Packet) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.MagicNumberPresent != nil {
n += m.MagicNumberPresent.Size()
}
if m.VersionPresent != nil {
n += m.VersionPresent.Size()
}
if m.Type != 0 {
n += 1 + sovCanalProtocol(uint64(m.Type))
}
if m.CompressionPresent != nil {
n += m.CompressionPresent.Size()
}
l = len(m.Body)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Packet_MagicNumber) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
n += 1 + sovCanalProtocol(uint64(m.MagicNumber))
return n
}
func (m *Packet_Version) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
n += 1 + sovCanalProtocol(uint64(m.Version))
return n
}
func (m *Packet_Compression) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
n += 1 + sovCanalProtocol(uint64(m.Compression))
return n
}
func (m *HeartBeat) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.SendTimestamp != 0 {
n += 1 + sovCanalProtocol(uint64(m.SendTimestamp))
}
if m.StartTimestamp != 0 {
n += 1 + sovCanalProtocol(uint64(m.StartTimestamp))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Handshake) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.CommunicationEncodingPresent != nil {
n += m.CommunicationEncodingPresent.Size()
}
l = len(m.Seeds)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
if m.SupportedCompressions != 0 {
n += 1 + sovCanalProtocol(uint64(m.SupportedCompressions))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Handshake_CommunicationEncoding) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.CommunicationEncoding)
n += 1 + l + sovCanalProtocol(uint64(l))
return n
}
func (m *ClientAuth) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Username)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
l = len(m.Password)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
if m.NetReadTimeoutPresent != nil {
n += m.NetReadTimeoutPresent.Size()
}
if m.NetWriteTimeoutPresent != nil {
n += m.NetWriteTimeoutPresent.Size()
}
l = len(m.Destination)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
l = len(m.ClientId)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
l = len(m.Filter)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
if m.StartTimestamp != 0 {
n += 1 + sovCanalProtocol(uint64(m.StartTimestamp))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ClientAuth_NetReadTimeout) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
n += 1 + sovCanalProtocol(uint64(m.NetReadTimeout))
return n
}
func (m *ClientAuth_NetWriteTimeout) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
n += 1 + sovCanalProtocol(uint64(m.NetWriteTimeout))
return n
}
func (m *Ack) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.ErrorCodePresent != nil {
n += m.ErrorCodePresent.Size()
}
l = len(m.ErrorMessage)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Ack_ErrorCode) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
n += 1 + sovCanalProtocol(uint64(m.ErrorCode))
return n
}
func (m *ClientAck) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Destination)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
l = len(m.ClientId)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
if m.BatchId != 0 {
n += 1 + sovCanalProtocol(uint64(m.BatchId))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Sub) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Destination)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
l = len(m.ClientId)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
l = len(m.Filter)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Unsub) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Destination)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
l = len(m.ClientId)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
l = len(m.Filter)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Get) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Destination)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
l = len(m.ClientId)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
if m.FetchSize != 0 {
n += 1 + sovCanalProtocol(uint64(m.FetchSize))
}
if m.TimeoutPresent != nil {
n += m.TimeoutPresent.Size()
}
if m.UnitPresent != nil {
n += m.UnitPresent.Size()
}
if m.AutoAckPresent != nil {
n += m.AutoAckPresent.Size()
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Get_Timeout) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
n += 1 + sovCanalProtocol(uint64(m.Timeout))
return n
}
func (m *Get_Unit) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
n += 1 + sovCanalProtocol(uint64(m.Unit))
return n
}
func (m *Get_AutoAck) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
n += 2
return n
}
func (m *Messages) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.BatchId != 0 {
n += 1 + sovCanalProtocol(uint64(m.BatchId))
}
if len(m.Messages) > 0 {
for _, b := range m.Messages {
l = len(b)
n += 1 + l + sovCanalProtocol(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Dump) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Journal)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
if m.Position != 0 {
n += 1 + sovCanalProtocol(uint64(m.Position))
}
if m.TimestampPresent != nil {
n += m.TimestampPresent.Size()
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Dump_Timestamp) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
n += 1 + sovCanalProtocol(uint64(m.Timestamp))
return n
}
func (m *ClientRollback) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Destination)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
l = len(m.ClientId)
if l > 0 {
n += 1 + l + sovCanalProtocol(uint64(l))
}
if m.BatchId != 0 {
n += 1 + sovCanalProtocol(uint64(m.BatchId))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovCanalProtocol(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozCanalProtocol(x uint64) (n int) {
return sovCanalProtocol(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Packet) 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 ErrIntOverflowCanalProtocol
}
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: Packet: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Packet: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MagicNumber", wireType)
}
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.MagicNumberPresent = &Packet_MagicNumber{v}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
}
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.VersionPresent = &Packet_Version{v}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
}
m.Type = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Type |= PacketType(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
}
var v Compression
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= Compression(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.CompressionPresent = &Packet_Compression{v}
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Body = append(m.Body[:0], dAtA[iNdEx:postIndex]...)
if m.Body == nil {
m.Body = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipCanalProtocol(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCanalProtocol
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *HeartBeat) 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 ErrIntOverflowCanalProtocol
}
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: HeartBeat: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HeartBeat: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SendTimestamp", wireType)
}
m.SendTimestamp = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.SendTimestamp |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field StartTimestamp", wireType)
}
m.StartTimestamp = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.StartTimestamp |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipCanalProtocol(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCanalProtocol
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Handshake) 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 ErrIntOverflowCanalProtocol
}
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: Handshake: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Handshake: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CommunicationEncoding", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CommunicationEncodingPresent = &Handshake_CommunicationEncoding{string(dAtA[iNdEx:postIndex])}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Seeds", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Seeds = append(m.Seeds[:0], dAtA[iNdEx:postIndex]...)
if m.Seeds == nil {
m.Seeds = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SupportedCompressions", wireType)
}
m.SupportedCompressions = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.SupportedCompressions |= Compression(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipCanalProtocol(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCanalProtocol
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ClientAuth) 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 ErrIntOverflowCanalProtocol
}
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: ClientAuth: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ClientAuth: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Username = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Password = append(m.Password[:0], dAtA[iNdEx:postIndex]...)
if m.Password == nil {
m.Password = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field NetReadTimeout", wireType)
}
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.NetReadTimeoutPresent = &ClientAuth_NetReadTimeout{v}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field NetWriteTimeout", wireType)
}
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.NetWriteTimeoutPresent = &ClientAuth_NetWriteTimeout{v}
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Destination = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ClientId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Filter = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 8:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field StartTimestamp", wireType)
}
m.StartTimestamp = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.StartTimestamp |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipCanalProtocol(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCanalProtocol
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Ack) 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 ErrIntOverflowCanalProtocol
}
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: Ack: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Ack: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ErrorCode", wireType)
}
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.ErrorCodePresent = &Ack_ErrorCode{v}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ErrorMessage = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipCanalProtocol(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCanalProtocol
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ClientAck) 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 ErrIntOverflowCanalProtocol
}
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: ClientAck: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ClientAck: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Destination = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ClientId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field BatchId", wireType)
}
m.BatchId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.BatchId |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipCanalProtocol(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCanalProtocol
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Sub) 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 ErrIntOverflowCanalProtocol
}
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: Sub: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Sub: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Destination = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ClientId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Filter = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipCanalProtocol(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCanalProtocol
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Unsub) 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 ErrIntOverflowCanalProtocol
}
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: Unsub: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Unsub: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Destination = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ClientId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Filter = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipCanalProtocol(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCanalProtocol
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Get) 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 ErrIntOverflowCanalProtocol
}
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: Get: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Get: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Destination = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ClientId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field FetchSize", wireType)
}
m.FetchSize = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.FetchSize |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
}
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.TimeoutPresent = &Get_Timeout{v}
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType)
}
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.UnitPresent = &Get_Unit{v}
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field AutoAck", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
b := bool(v != 0)
m.AutoAckPresent = &Get_AutoAck{b}
default:
iNdEx = preIndex
skippy, err := skipCanalProtocol(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCanalProtocol
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Messages) 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 ErrIntOverflowCanalProtocol
}
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: Messages: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Messages: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field BatchId", wireType)
}
m.BatchId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.BatchId |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Messages = append(m.Messages, make([]byte, postIndex-iNdEx))
copy(m.Messages[len(m.Messages)-1], dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipCanalProtocol(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCanalProtocol
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Dump) 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 ErrIntOverflowCanalProtocol
}
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: Dump: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Dump: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Journal", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Journal = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType)
}
m.Position = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Position |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
}
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.TimestampPresent = &Dump_Timestamp{v}
default:
iNdEx = preIndex
skippy, err := skipCanalProtocol(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCanalProtocol
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ClientRollback) 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 ErrIntOverflowCanalProtocol
}
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: ClientRollback: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ClientRollback: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Destination = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
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 ErrInvalidLengthCanalProtocol
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCanalProtocol
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ClientId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field BatchId", wireType)
}
m.BatchId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanalProtocol
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.BatchId |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipCanalProtocol(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCanalProtocol
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipCanalProtocol(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, ErrIntOverflowCanalProtocol
}
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, ErrIntOverflowCanalProtocol
}
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, ErrIntOverflowCanalProtocol
}
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, ErrInvalidLengthCanalProtocol
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupCanalProtocol
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthCanalProtocol
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthCanalProtocol = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowCanalProtocol = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupCanalProtocol = fmt.Errorf("proto: unexpected end of group")
)
1
https://gitee.com/bhpujie/canal-go.git
git@gitee.com:bhpujie/canal-go.git
bhpujie
canal-go
canal-go
f553f2580d95

搜索帮助