github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/proto/canal/CanalProtocol.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: CanalProtocol.proto
     3  
     4  package com_alibaba_otter_canal_protocol
     5  
     6  import (
     7  	fmt "fmt"
     8  	proto "github.com/gogo/protobuf/proto"
     9  	io "io"
    10  	math "math"
    11  	math_bits "math/bits"
    12  )
    13  
    14  // Reference imports to suppress errors if they are not otherwise used.
    15  var _ = proto.Marshal
    16  var _ = fmt.Errorf
    17  var _ = math.Inf
    18  
    19  // This is a compile-time assertion to ensure that this generated file
    20  // is compatible with the proto package it is being compiled against.
    21  // A compilation error at this line likely means your copy of the
    22  // proto package needs to be updated.
    23  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    24  
    25  type Compression int32
    26  
    27  const (
    28  	Compression_COMPRESSIONCOMPATIBLEPROTO2 Compression = 0
    29  	Compression_NONE                        Compression = 1
    30  	Compression_ZLIB                        Compression = 2
    31  	Compression_GZIP                        Compression = 3
    32  	Compression_LZF                         Compression = 4
    33  )
    34  
    35  var Compression_name = map[int32]string{
    36  	0: "COMPRESSIONCOMPATIBLEPROTO2",
    37  	1: "NONE",
    38  	2: "ZLIB",
    39  	3: "GZIP",
    40  	4: "LZF",
    41  }
    42  
    43  var Compression_value = map[string]int32{
    44  	"COMPRESSIONCOMPATIBLEPROTO2": 0,
    45  	"NONE":                        1,
    46  	"ZLIB":                        2,
    47  	"GZIP":                        3,
    48  	"LZF":                         4,
    49  }
    50  
    51  func (x Compression) String() string {
    52  	return proto.EnumName(Compression_name, int32(x))
    53  }
    54  
    55  func (Compression) EnumDescriptor() ([]byte, []int) {
    56  	return fileDescriptor_638f57be23f1b015, []int{0}
    57  }
    58  
    59  type PacketType int32
    60  
    61  const (
    62  	//compatible
    63  	PacketType_PACKAGETYPECOMPATIBLEPROTO2 PacketType = 0
    64  	PacketType_HANDSHAKE                   PacketType = 1
    65  	PacketType_CLIENTAUTHENTICATION        PacketType = 2
    66  	PacketType_ACK                         PacketType = 3
    67  	PacketType_SUBSCRIPTION                PacketType = 4
    68  	PacketType_UNSUBSCRIPTION              PacketType = 5
    69  	PacketType_GET                         PacketType = 6
    70  	PacketType_MESSAGES                    PacketType = 7
    71  	PacketType_CLIENTACK                   PacketType = 8
    72  	// management part
    73  	PacketType_SHUTDOWN PacketType = 9
    74  	// integration
    75  	PacketType_DUMP           PacketType = 10
    76  	PacketType_HEARTBEAT      PacketType = 11
    77  	PacketType_CLIENTROLLBACK PacketType = 12
    78  )
    79  
    80  var PacketType_name = map[int32]string{
    81  	0:  "PACKAGETYPECOMPATIBLEPROTO2",
    82  	1:  "HANDSHAKE",
    83  	2:  "CLIENTAUTHENTICATION",
    84  	3:  "ACK",
    85  	4:  "SUBSCRIPTION",
    86  	5:  "UNSUBSCRIPTION",
    87  	6:  "GET",
    88  	7:  "MESSAGES",
    89  	8:  "CLIENTACK",
    90  	9:  "SHUTDOWN",
    91  	10: "DUMP",
    92  	11: "HEARTBEAT",
    93  	12: "CLIENTROLLBACK",
    94  }
    95  
    96  var PacketType_value = map[string]int32{
    97  	"PACKAGETYPECOMPATIBLEPROTO2": 0,
    98  	"HANDSHAKE":                   1,
    99  	"CLIENTAUTHENTICATION":        2,
   100  	"ACK":                         3,
   101  	"SUBSCRIPTION":                4,
   102  	"UNSUBSCRIPTION":              5,
   103  	"GET":                         6,
   104  	"MESSAGES":                    7,
   105  	"CLIENTACK":                   8,
   106  	"SHUTDOWN":                    9,
   107  	"DUMP":                        10,
   108  	"HEARTBEAT":                   11,
   109  	"CLIENTROLLBACK":              12,
   110  }
   111  
   112  func (x PacketType) String() string {
   113  	return proto.EnumName(PacketType_name, int32(x))
   114  }
   115  
   116  func (PacketType) EnumDescriptor() ([]byte, []int) {
   117  	return fileDescriptor_638f57be23f1b015, []int{1}
   118  }
   119  
   120  type Packet struct {
   121  	// [default = 17];
   122  	//
   123  	// Types that are valid to be assigned to MagicNumberPresent:
   124  	//
   125  	//	*Packet_MagicNumber
   126  	MagicNumberPresent isPacket_MagicNumberPresent `protobuf_oneof:"magic_number_present"`
   127  	// [default = 1];
   128  	//
   129  	// Types that are valid to be assigned to VersionPresent:
   130  	//
   131  	//	*Packet_Version
   132  	VersionPresent isPacket_VersionPresent `protobuf_oneof:"version_present"`
   133  	Type           PacketType              `protobuf:"varint,3,opt,name=type,proto3,enum=com.alibaba.otter.canal.protocol.PacketType" json:"type,omitempty"`
   134  	// [default = NONE];
   135  	//
   136  	// Types that are valid to be assigned to CompressionPresent:
   137  	//
   138  	//	*Packet_Compression
   139  	CompressionPresent isPacket_CompressionPresent `protobuf_oneof:"compression_present"`
   140  	Body               []byte                      `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
   141  }
   142  
   143  func (m *Packet) Reset()         { *m = Packet{} }
   144  func (m *Packet) String() string { return proto.CompactTextString(m) }
   145  func (*Packet) ProtoMessage()    {}
   146  func (*Packet) Descriptor() ([]byte, []int) {
   147  	return fileDescriptor_638f57be23f1b015, []int{0}
   148  }
   149  func (m *Packet) XXX_Unmarshal(b []byte) error {
   150  	return m.Unmarshal(b)
   151  }
   152  func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   153  	if deterministic {
   154  		return xxx_messageInfo_Packet.Marshal(b, m, deterministic)
   155  	} else {
   156  		b = b[:cap(b)]
   157  		n, err := m.MarshalToSizedBuffer(b)
   158  		if err != nil {
   159  			return nil, err
   160  		}
   161  		return b[:n], nil
   162  	}
   163  }
   164  func (m *Packet) XXX_Merge(src proto.Message) {
   165  	xxx_messageInfo_Packet.Merge(m, src)
   166  }
   167  func (m *Packet) XXX_Size() int {
   168  	return m.Size()
   169  }
   170  func (m *Packet) XXX_DiscardUnknown() {
   171  	xxx_messageInfo_Packet.DiscardUnknown(m)
   172  }
   173  
   174  var xxx_messageInfo_Packet proto.InternalMessageInfo
   175  
   176  type isPacket_MagicNumberPresent interface {
   177  	isPacket_MagicNumberPresent()
   178  	MarshalTo([]byte) (int, error)
   179  	Size() int
   180  }
   181  type isPacket_VersionPresent interface {
   182  	isPacket_VersionPresent()
   183  	MarshalTo([]byte) (int, error)
   184  	Size() int
   185  }
   186  type isPacket_CompressionPresent interface {
   187  	isPacket_CompressionPresent()
   188  	MarshalTo([]byte) (int, error)
   189  	Size() int
   190  }
   191  
   192  type Packet_MagicNumber struct {
   193  	MagicNumber int32 `protobuf:"varint,1,opt,name=magic_number,json=magicNumber,proto3,oneof" json:"magic_number,omitempty"`
   194  }
   195  type Packet_Version struct {
   196  	Version int32 `protobuf:"varint,2,opt,name=version,proto3,oneof" json:"version,omitempty"`
   197  }
   198  type Packet_Compression struct {
   199  	Compression Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=com.alibaba.otter.canal.protocol.Compression,oneof" json:"compression,omitempty"`
   200  }
   201  
   202  func (*Packet_MagicNumber) isPacket_MagicNumberPresent() {}
   203  func (*Packet_Version) isPacket_VersionPresent()         {}
   204  func (*Packet_Compression) isPacket_CompressionPresent() {}
   205  
   206  func (m *Packet) GetMagicNumberPresent() isPacket_MagicNumberPresent {
   207  	if m != nil {
   208  		return m.MagicNumberPresent
   209  	}
   210  	return nil
   211  }
   212  func (m *Packet) GetVersionPresent() isPacket_VersionPresent {
   213  	if m != nil {
   214  		return m.VersionPresent
   215  	}
   216  	return nil
   217  }
   218  func (m *Packet) GetCompressionPresent() isPacket_CompressionPresent {
   219  	if m != nil {
   220  		return m.CompressionPresent
   221  	}
   222  	return nil
   223  }
   224  
   225  func (m *Packet) GetMagicNumber() int32 {
   226  	if x, ok := m.GetMagicNumberPresent().(*Packet_MagicNumber); ok {
   227  		return x.MagicNumber
   228  	}
   229  	return 0
   230  }
   231  
   232  func (m *Packet) GetVersion() int32 {
   233  	if x, ok := m.GetVersionPresent().(*Packet_Version); ok {
   234  		return x.Version
   235  	}
   236  	return 0
   237  }
   238  
   239  func (m *Packet) GetType() PacketType {
   240  	if m != nil {
   241  		return m.Type
   242  	}
   243  	return PacketType_PACKAGETYPECOMPATIBLEPROTO2
   244  }
   245  
   246  func (m *Packet) GetCompression() Compression {
   247  	if x, ok := m.GetCompressionPresent().(*Packet_Compression); ok {
   248  		return x.Compression
   249  	}
   250  	return Compression_COMPRESSIONCOMPATIBLEPROTO2
   251  }
   252  
   253  func (m *Packet) GetBody() []byte {
   254  	if m != nil {
   255  		return m.Body
   256  	}
   257  	return nil
   258  }
   259  
   260  // XXX_OneofWrappers is for the internal use of the proto package.
   261  func (*Packet) XXX_OneofWrappers() []interface{} {
   262  	return []interface{}{
   263  		(*Packet_MagicNumber)(nil),
   264  		(*Packet_Version)(nil),
   265  		(*Packet_Compression)(nil),
   266  	}
   267  }
   268  
   269  type HeartBeat struct {
   270  	SendTimestamp  int64 `protobuf:"varint,1,opt,name=send_timestamp,json=sendTimestamp,proto3" json:"send_timestamp,omitempty"`
   271  	StartTimestamp int64 `protobuf:"varint,2,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
   272  }
   273  
   274  func (m *HeartBeat) Reset()         { *m = HeartBeat{} }
   275  func (m *HeartBeat) String() string { return proto.CompactTextString(m) }
   276  func (*HeartBeat) ProtoMessage()    {}
   277  func (*HeartBeat) Descriptor() ([]byte, []int) {
   278  	return fileDescriptor_638f57be23f1b015, []int{1}
   279  }
   280  func (m *HeartBeat) XXX_Unmarshal(b []byte) error {
   281  	return m.Unmarshal(b)
   282  }
   283  func (m *HeartBeat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   284  	if deterministic {
   285  		return xxx_messageInfo_HeartBeat.Marshal(b, m, deterministic)
   286  	} else {
   287  		b = b[:cap(b)]
   288  		n, err := m.MarshalToSizedBuffer(b)
   289  		if err != nil {
   290  			return nil, err
   291  		}
   292  		return b[:n], nil
   293  	}
   294  }
   295  func (m *HeartBeat) XXX_Merge(src proto.Message) {
   296  	xxx_messageInfo_HeartBeat.Merge(m, src)
   297  }
   298  func (m *HeartBeat) XXX_Size() int {
   299  	return m.Size()
   300  }
   301  func (m *HeartBeat) XXX_DiscardUnknown() {
   302  	xxx_messageInfo_HeartBeat.DiscardUnknown(m)
   303  }
   304  
   305  var xxx_messageInfo_HeartBeat proto.InternalMessageInfo
   306  
   307  func (m *HeartBeat) GetSendTimestamp() int64 {
   308  	if m != nil {
   309  		return m.SendTimestamp
   310  	}
   311  	return 0
   312  }
   313  
   314  func (m *HeartBeat) GetStartTimestamp() int64 {
   315  	if m != nil {
   316  		return m.StartTimestamp
   317  	}
   318  	return 0
   319  }
   320  
   321  type Handshake struct {
   322  	//	[default = "utf8"];
   323  	//
   324  	// Types that are valid to be assigned to CommunicationEncodingPresent:
   325  	//
   326  	//	*Handshake_CommunicationEncoding
   327  	CommunicationEncodingPresent isHandshake_CommunicationEncodingPresent `protobuf_oneof:"communication_encoding_present"`
   328  	Seeds                        []byte                                   `protobuf:"bytes,2,opt,name=seeds,proto3" json:"seeds,omitempty"`
   329  	SupportedCompressions        Compression                              `protobuf:"varint,3,opt,name=supported_compressions,json=supportedCompressions,proto3,enum=com.alibaba.otter.canal.protocol.Compression" json:"supported_compressions,omitempty"`
   330  }
   331  
   332  func (m *Handshake) Reset()         { *m = Handshake{} }
   333  func (m *Handshake) String() string { return proto.CompactTextString(m) }
   334  func (*Handshake) ProtoMessage()    {}
   335  func (*Handshake) Descriptor() ([]byte, []int) {
   336  	return fileDescriptor_638f57be23f1b015, []int{2}
   337  }
   338  func (m *Handshake) XXX_Unmarshal(b []byte) error {
   339  	return m.Unmarshal(b)
   340  }
   341  func (m *Handshake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   342  	if deterministic {
   343  		return xxx_messageInfo_Handshake.Marshal(b, m, deterministic)
   344  	} else {
   345  		b = b[:cap(b)]
   346  		n, err := m.MarshalToSizedBuffer(b)
   347  		if err != nil {
   348  			return nil, err
   349  		}
   350  		return b[:n], nil
   351  	}
   352  }
   353  func (m *Handshake) XXX_Merge(src proto.Message) {
   354  	xxx_messageInfo_Handshake.Merge(m, src)
   355  }
   356  func (m *Handshake) XXX_Size() int {
   357  	return m.Size()
   358  }
   359  func (m *Handshake) XXX_DiscardUnknown() {
   360  	xxx_messageInfo_Handshake.DiscardUnknown(m)
   361  }
   362  
   363  var xxx_messageInfo_Handshake proto.InternalMessageInfo
   364  
   365  type isHandshake_CommunicationEncodingPresent interface {
   366  	isHandshake_CommunicationEncodingPresent()
   367  	MarshalTo([]byte) (int, error)
   368  	Size() int
   369  }
   370  
   371  type Handshake_CommunicationEncoding struct {
   372  	CommunicationEncoding string `protobuf:"bytes,1,opt,name=communication_encoding,json=communicationEncoding,proto3,oneof" json:"communication_encoding,omitempty"`
   373  }
   374  
   375  func (*Handshake_CommunicationEncoding) isHandshake_CommunicationEncodingPresent() {}
   376  
   377  func (m *Handshake) GetCommunicationEncodingPresent() isHandshake_CommunicationEncodingPresent {
   378  	if m != nil {
   379  		return m.CommunicationEncodingPresent
   380  	}
   381  	return nil
   382  }
   383  
   384  func (m *Handshake) GetCommunicationEncoding() string {
   385  	if x, ok := m.GetCommunicationEncodingPresent().(*Handshake_CommunicationEncoding); ok {
   386  		return x.CommunicationEncoding
   387  	}
   388  	return ""
   389  }
   390  
   391  func (m *Handshake) GetSeeds() []byte {
   392  	if m != nil {
   393  		return m.Seeds
   394  	}
   395  	return nil
   396  }
   397  
   398  func (m *Handshake) GetSupportedCompressions() Compression {
   399  	if m != nil {
   400  		return m.SupportedCompressions
   401  	}
   402  	return Compression_COMPRESSIONCOMPATIBLEPROTO2
   403  }
   404  
   405  // XXX_OneofWrappers is for the internal use of the proto package.
   406  func (*Handshake) XXX_OneofWrappers() []interface{} {
   407  	return []interface{}{
   408  		(*Handshake_CommunicationEncoding)(nil),
   409  	}
   410  }
   411  
   412  // client authentication
   413  type ClientAuth struct {
   414  	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
   415  	Password []byte `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
   416  	// [default = 0]
   417  	//
   418  	// Types that are valid to be assigned to NetReadTimeoutPresent:
   419  	//
   420  	//	*ClientAuth_NetReadTimeout
   421  	NetReadTimeoutPresent isClientAuth_NetReadTimeoutPresent `protobuf_oneof:"net_read_timeout_present"`
   422  	// [default = 0];
   423  	//
   424  	// Types that are valid to be assigned to NetWriteTimeoutPresent:
   425  	//
   426  	//	*ClientAuth_NetWriteTimeout
   427  	NetWriteTimeoutPresent isClientAuth_NetWriteTimeoutPresent `protobuf_oneof:"net_write_timeout_present"`
   428  	Destination            string                              `protobuf:"bytes,5,opt,name=destination,proto3" json:"destination,omitempty"`
   429  	ClientId               string                              `protobuf:"bytes,6,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
   430  	Filter                 string                              `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"`
   431  	StartTimestamp         int64                               `protobuf:"varint,8,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
   432  }
   433  
   434  func (m *ClientAuth) Reset()         { *m = ClientAuth{} }
   435  func (m *ClientAuth) String() string { return proto.CompactTextString(m) }
   436  func (*ClientAuth) ProtoMessage()    {}
   437  func (*ClientAuth) Descriptor() ([]byte, []int) {
   438  	return fileDescriptor_638f57be23f1b015, []int{3}
   439  }
   440  func (m *ClientAuth) XXX_Unmarshal(b []byte) error {
   441  	return m.Unmarshal(b)
   442  }
   443  func (m *ClientAuth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   444  	if deterministic {
   445  		return xxx_messageInfo_ClientAuth.Marshal(b, m, deterministic)
   446  	} else {
   447  		b = b[:cap(b)]
   448  		n, err := m.MarshalToSizedBuffer(b)
   449  		if err != nil {
   450  			return nil, err
   451  		}
   452  		return b[:n], nil
   453  	}
   454  }
   455  func (m *ClientAuth) XXX_Merge(src proto.Message) {
   456  	xxx_messageInfo_ClientAuth.Merge(m, src)
   457  }
   458  func (m *ClientAuth) XXX_Size() int {
   459  	return m.Size()
   460  }
   461  func (m *ClientAuth) XXX_DiscardUnknown() {
   462  	xxx_messageInfo_ClientAuth.DiscardUnknown(m)
   463  }
   464  
   465  var xxx_messageInfo_ClientAuth proto.InternalMessageInfo
   466  
   467  type isClientAuth_NetReadTimeoutPresent interface {
   468  	isClientAuth_NetReadTimeoutPresent()
   469  	MarshalTo([]byte) (int, error)
   470  	Size() int
   471  }
   472  type isClientAuth_NetWriteTimeoutPresent interface {
   473  	isClientAuth_NetWriteTimeoutPresent()
   474  	MarshalTo([]byte) (int, error)
   475  	Size() int
   476  }
   477  
   478  type ClientAuth_NetReadTimeout struct {
   479  	NetReadTimeout int32 `protobuf:"varint,3,opt,name=net_read_timeout,json=netReadTimeout,proto3,oneof" json:"net_read_timeout,omitempty"`
   480  }
   481  type ClientAuth_NetWriteTimeout struct {
   482  	NetWriteTimeout int32 `protobuf:"varint,4,opt,name=net_write_timeout,json=netWriteTimeout,proto3,oneof" json:"net_write_timeout,omitempty"`
   483  }
   484  
   485  func (*ClientAuth_NetReadTimeout) isClientAuth_NetReadTimeoutPresent()   {}
   486  func (*ClientAuth_NetWriteTimeout) isClientAuth_NetWriteTimeoutPresent() {}
   487  
   488  func (m *ClientAuth) GetNetReadTimeoutPresent() isClientAuth_NetReadTimeoutPresent {
   489  	if m != nil {
   490  		return m.NetReadTimeoutPresent
   491  	}
   492  	return nil
   493  }
   494  func (m *ClientAuth) GetNetWriteTimeoutPresent() isClientAuth_NetWriteTimeoutPresent {
   495  	if m != nil {
   496  		return m.NetWriteTimeoutPresent
   497  	}
   498  	return nil
   499  }
   500  
   501  func (m *ClientAuth) GetUsername() string {
   502  	if m != nil {
   503  		return m.Username
   504  	}
   505  	return ""
   506  }
   507  
   508  func (m *ClientAuth) GetPassword() []byte {
   509  	if m != nil {
   510  		return m.Password
   511  	}
   512  	return nil
   513  }
   514  
   515  func (m *ClientAuth) GetNetReadTimeout() int32 {
   516  	if x, ok := m.GetNetReadTimeoutPresent().(*ClientAuth_NetReadTimeout); ok {
   517  		return x.NetReadTimeout
   518  	}
   519  	return 0
   520  }
   521  
   522  func (m *ClientAuth) GetNetWriteTimeout() int32 {
   523  	if x, ok := m.GetNetWriteTimeoutPresent().(*ClientAuth_NetWriteTimeout); ok {
   524  		return x.NetWriteTimeout
   525  	}
   526  	return 0
   527  }
   528  
   529  func (m *ClientAuth) GetDestination() string {
   530  	if m != nil {
   531  		return m.Destination
   532  	}
   533  	return ""
   534  }
   535  
   536  func (m *ClientAuth) GetClientId() string {
   537  	if m != nil {
   538  		return m.ClientId
   539  	}
   540  	return ""
   541  }
   542  
   543  func (m *ClientAuth) GetFilter() string {
   544  	if m != nil {
   545  		return m.Filter
   546  	}
   547  	return ""
   548  }
   549  
   550  func (m *ClientAuth) GetStartTimestamp() int64 {
   551  	if m != nil {
   552  		return m.StartTimestamp
   553  	}
   554  	return 0
   555  }
   556  
   557  // XXX_OneofWrappers is for the internal use of the proto package.
   558  func (*ClientAuth) XXX_OneofWrappers() []interface{} {
   559  	return []interface{}{
   560  		(*ClientAuth_NetReadTimeout)(nil),
   561  		(*ClientAuth_NetWriteTimeout)(nil),
   562  	}
   563  }
   564  
   565  type Ack struct {
   566  	// [default = 0]
   567  	//
   568  	// Types that are valid to be assigned to ErrorCodePresent:
   569  	//
   570  	//	*Ack_ErrorCode
   571  	ErrorCodePresent isAck_ErrorCodePresent `protobuf_oneof:"error_code_present"`
   572  	ErrorMessage     string                 `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
   573  }
   574  
   575  func (m *Ack) Reset()         { *m = Ack{} }
   576  func (m *Ack) String() string { return proto.CompactTextString(m) }
   577  func (*Ack) ProtoMessage()    {}
   578  func (*Ack) Descriptor() ([]byte, []int) {
   579  	return fileDescriptor_638f57be23f1b015, []int{4}
   580  }
   581  func (m *Ack) XXX_Unmarshal(b []byte) error {
   582  	return m.Unmarshal(b)
   583  }
   584  func (m *Ack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   585  	if deterministic {
   586  		return xxx_messageInfo_Ack.Marshal(b, m, deterministic)
   587  	} else {
   588  		b = b[:cap(b)]
   589  		n, err := m.MarshalToSizedBuffer(b)
   590  		if err != nil {
   591  			return nil, err
   592  		}
   593  		return b[:n], nil
   594  	}
   595  }
   596  func (m *Ack) XXX_Merge(src proto.Message) {
   597  	xxx_messageInfo_Ack.Merge(m, src)
   598  }
   599  func (m *Ack) XXX_Size() int {
   600  	return m.Size()
   601  }
   602  func (m *Ack) XXX_DiscardUnknown() {
   603  	xxx_messageInfo_Ack.DiscardUnknown(m)
   604  }
   605  
   606  var xxx_messageInfo_Ack proto.InternalMessageInfo
   607  
   608  type isAck_ErrorCodePresent interface {
   609  	isAck_ErrorCodePresent()
   610  	MarshalTo([]byte) (int, error)
   611  	Size() int
   612  }
   613  
   614  type Ack_ErrorCode struct {
   615  	ErrorCode int32 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3,oneof" json:"error_code,omitempty"`
   616  }
   617  
   618  func (*Ack_ErrorCode) isAck_ErrorCodePresent() {}
   619  
   620  func (m *Ack) GetErrorCodePresent() isAck_ErrorCodePresent {
   621  	if m != nil {
   622  		return m.ErrorCodePresent
   623  	}
   624  	return nil
   625  }
   626  
   627  func (m *Ack) GetErrorCode() int32 {
   628  	if x, ok := m.GetErrorCodePresent().(*Ack_ErrorCode); ok {
   629  		return x.ErrorCode
   630  	}
   631  	return 0
   632  }
   633  
   634  func (m *Ack) GetErrorMessage() string {
   635  	if m != nil {
   636  		return m.ErrorMessage
   637  	}
   638  	return ""
   639  }
   640  
   641  // XXX_OneofWrappers is for the internal use of the proto package.
   642  func (*Ack) XXX_OneofWrappers() []interface{} {
   643  	return []interface{}{
   644  		(*Ack_ErrorCode)(nil),
   645  	}
   646  }
   647  
   648  type ClientAck struct {
   649  	Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
   650  	ClientId    string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
   651  	BatchId     int64  `protobuf:"varint,3,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
   652  }
   653  
   654  func (m *ClientAck) Reset()         { *m = ClientAck{} }
   655  func (m *ClientAck) String() string { return proto.CompactTextString(m) }
   656  func (*ClientAck) ProtoMessage()    {}
   657  func (*ClientAck) Descriptor() ([]byte, []int) {
   658  	return fileDescriptor_638f57be23f1b015, []int{5}
   659  }
   660  func (m *ClientAck) XXX_Unmarshal(b []byte) error {
   661  	return m.Unmarshal(b)
   662  }
   663  func (m *ClientAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   664  	if deterministic {
   665  		return xxx_messageInfo_ClientAck.Marshal(b, m, deterministic)
   666  	} else {
   667  		b = b[:cap(b)]
   668  		n, err := m.MarshalToSizedBuffer(b)
   669  		if err != nil {
   670  			return nil, err
   671  		}
   672  		return b[:n], nil
   673  	}
   674  }
   675  func (m *ClientAck) XXX_Merge(src proto.Message) {
   676  	xxx_messageInfo_ClientAck.Merge(m, src)
   677  }
   678  func (m *ClientAck) XXX_Size() int {
   679  	return m.Size()
   680  }
   681  func (m *ClientAck) XXX_DiscardUnknown() {
   682  	xxx_messageInfo_ClientAck.DiscardUnknown(m)
   683  }
   684  
   685  var xxx_messageInfo_ClientAck proto.InternalMessageInfo
   686  
   687  func (m *ClientAck) GetDestination() string {
   688  	if m != nil {
   689  		return m.Destination
   690  	}
   691  	return ""
   692  }
   693  
   694  func (m *ClientAck) GetClientId() string {
   695  	if m != nil {
   696  		return m.ClientId
   697  	}
   698  	return ""
   699  }
   700  
   701  func (m *ClientAck) GetBatchId() int64 {
   702  	if m != nil {
   703  		return m.BatchId
   704  	}
   705  	return 0
   706  }
   707  
   708  // subscription
   709  type Sub struct {
   710  	Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
   711  	ClientId    string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
   712  	Filter      string `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"`
   713  }
   714  
   715  func (m *Sub) Reset()         { *m = Sub{} }
   716  func (m *Sub) String() string { return proto.CompactTextString(m) }
   717  func (*Sub) ProtoMessage()    {}
   718  func (*Sub) Descriptor() ([]byte, []int) {
   719  	return fileDescriptor_638f57be23f1b015, []int{6}
   720  }
   721  func (m *Sub) XXX_Unmarshal(b []byte) error {
   722  	return m.Unmarshal(b)
   723  }
   724  func (m *Sub) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   725  	if deterministic {
   726  		return xxx_messageInfo_Sub.Marshal(b, m, deterministic)
   727  	} else {
   728  		b = b[:cap(b)]
   729  		n, err := m.MarshalToSizedBuffer(b)
   730  		if err != nil {
   731  			return nil, err
   732  		}
   733  		return b[:n], nil
   734  	}
   735  }
   736  func (m *Sub) XXX_Merge(src proto.Message) {
   737  	xxx_messageInfo_Sub.Merge(m, src)
   738  }
   739  func (m *Sub) XXX_Size() int {
   740  	return m.Size()
   741  }
   742  func (m *Sub) XXX_DiscardUnknown() {
   743  	xxx_messageInfo_Sub.DiscardUnknown(m)
   744  }
   745  
   746  var xxx_messageInfo_Sub proto.InternalMessageInfo
   747  
   748  func (m *Sub) GetDestination() string {
   749  	if m != nil {
   750  		return m.Destination
   751  	}
   752  	return ""
   753  }
   754  
   755  func (m *Sub) GetClientId() string {
   756  	if m != nil {
   757  		return m.ClientId
   758  	}
   759  	return ""
   760  }
   761  
   762  func (m *Sub) GetFilter() string {
   763  	if m != nil {
   764  		return m.Filter
   765  	}
   766  	return ""
   767  }
   768  
   769  // Unsubscription
   770  type Unsub struct {
   771  	Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
   772  	ClientId    string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
   773  	Filter      string `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"`
   774  }
   775  
   776  func (m *Unsub) Reset()         { *m = Unsub{} }
   777  func (m *Unsub) String() string { return proto.CompactTextString(m) }
   778  func (*Unsub) ProtoMessage()    {}
   779  func (*Unsub) Descriptor() ([]byte, []int) {
   780  	return fileDescriptor_638f57be23f1b015, []int{7}
   781  }
   782  func (m *Unsub) XXX_Unmarshal(b []byte) error {
   783  	return m.Unmarshal(b)
   784  }
   785  func (m *Unsub) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   786  	if deterministic {
   787  		return xxx_messageInfo_Unsub.Marshal(b, m, deterministic)
   788  	} else {
   789  		b = b[:cap(b)]
   790  		n, err := m.MarshalToSizedBuffer(b)
   791  		if err != nil {
   792  			return nil, err
   793  		}
   794  		return b[:n], nil
   795  	}
   796  }
   797  func (m *Unsub) XXX_Merge(src proto.Message) {
   798  	xxx_messageInfo_Unsub.Merge(m, src)
   799  }
   800  func (m *Unsub) XXX_Size() int {
   801  	return m.Size()
   802  }
   803  func (m *Unsub) XXX_DiscardUnknown() {
   804  	xxx_messageInfo_Unsub.DiscardUnknown(m)
   805  }
   806  
   807  var xxx_messageInfo_Unsub proto.InternalMessageInfo
   808  
   809  func (m *Unsub) GetDestination() string {
   810  	if m != nil {
   811  		return m.Destination
   812  	}
   813  	return ""
   814  }
   815  
   816  func (m *Unsub) GetClientId() string {
   817  	if m != nil {
   818  		return m.ClientId
   819  	}
   820  	return ""
   821  }
   822  
   823  func (m *Unsub) GetFilter() string {
   824  	if m != nil {
   825  		return m.Filter
   826  	}
   827  	return ""
   828  }
   829  
   830  // PullRequest
   831  type Get struct {
   832  	Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
   833  	ClientId    string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
   834  	FetchSize   int32  `protobuf:"varint,3,opt,name=fetch_size,json=fetchSize,proto3" json:"fetch_size,omitempty"`
   835  	// [default = -1]
   836  	//
   837  	// Types that are valid to be assigned to TimeoutPresent:
   838  	//
   839  	//	*Get_Timeout
   840  	TimeoutPresent isGet_TimeoutPresent `protobuf_oneof:"timeout_present"`
   841  	// [default = 2]
   842  	//
   843  	// Types that are valid to be assigned to UnitPresent:
   844  	//
   845  	//	*Get_Unit
   846  	UnitPresent isGet_UnitPresent `protobuf_oneof:"unit_present"`
   847  	// [default = false]
   848  	//
   849  	// Types that are valid to be assigned to AutoAckPresent:
   850  	//
   851  	//	*Get_AutoAck
   852  	AutoAckPresent isGet_AutoAckPresent `protobuf_oneof:"auto_ack_present"`
   853  }
   854  
   855  func (m *Get) Reset()         { *m = Get{} }
   856  func (m *Get) String() string { return proto.CompactTextString(m) }
   857  func (*Get) ProtoMessage()    {}
   858  func (*Get) Descriptor() ([]byte, []int) {
   859  	return fileDescriptor_638f57be23f1b015, []int{8}
   860  }
   861  func (m *Get) XXX_Unmarshal(b []byte) error {
   862  	return m.Unmarshal(b)
   863  }
   864  func (m *Get) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   865  	if deterministic {
   866  		return xxx_messageInfo_Get.Marshal(b, m, deterministic)
   867  	} else {
   868  		b = b[:cap(b)]
   869  		n, err := m.MarshalToSizedBuffer(b)
   870  		if err != nil {
   871  			return nil, err
   872  		}
   873  		return b[:n], nil
   874  	}
   875  }
   876  func (m *Get) XXX_Merge(src proto.Message) {
   877  	xxx_messageInfo_Get.Merge(m, src)
   878  }
   879  func (m *Get) XXX_Size() int {
   880  	return m.Size()
   881  }
   882  func (m *Get) XXX_DiscardUnknown() {
   883  	xxx_messageInfo_Get.DiscardUnknown(m)
   884  }
   885  
   886  var xxx_messageInfo_Get proto.InternalMessageInfo
   887  
   888  type isGet_TimeoutPresent interface {
   889  	isGet_TimeoutPresent()
   890  	MarshalTo([]byte) (int, error)
   891  	Size() int
   892  }
   893  type isGet_UnitPresent interface {
   894  	isGet_UnitPresent()
   895  	MarshalTo([]byte) (int, error)
   896  	Size() int
   897  }
   898  type isGet_AutoAckPresent interface {
   899  	isGet_AutoAckPresent()
   900  	MarshalTo([]byte) (int, error)
   901  	Size() int
   902  }
   903  
   904  type Get_Timeout struct {
   905  	Timeout int64 `protobuf:"varint,4,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
   906  }
   907  type Get_Unit struct {
   908  	Unit int32 `protobuf:"varint,5,opt,name=unit,proto3,oneof" json:"unit,omitempty"`
   909  }
   910  type Get_AutoAck struct {
   911  	AutoAck bool `protobuf:"varint,6,opt,name=auto_ack,json=autoAck,proto3,oneof" json:"auto_ack,omitempty"`
   912  }
   913  
   914  func (*Get_Timeout) isGet_TimeoutPresent() {}
   915  func (*Get_Unit) isGet_UnitPresent()       {}
   916  func (*Get_AutoAck) isGet_AutoAckPresent() {}
   917  
   918  func (m *Get) GetTimeoutPresent() isGet_TimeoutPresent {
   919  	if m != nil {
   920  		return m.TimeoutPresent
   921  	}
   922  	return nil
   923  }
   924  func (m *Get) GetUnitPresent() isGet_UnitPresent {
   925  	if m != nil {
   926  		return m.UnitPresent
   927  	}
   928  	return nil
   929  }
   930  func (m *Get) GetAutoAckPresent() isGet_AutoAckPresent {
   931  	if m != nil {
   932  		return m.AutoAckPresent
   933  	}
   934  	return nil
   935  }
   936  
   937  func (m *Get) GetDestination() string {
   938  	if m != nil {
   939  		return m.Destination
   940  	}
   941  	return ""
   942  }
   943  
   944  func (m *Get) GetClientId() string {
   945  	if m != nil {
   946  		return m.ClientId
   947  	}
   948  	return ""
   949  }
   950  
   951  func (m *Get) GetFetchSize() int32 {
   952  	if m != nil {
   953  		return m.FetchSize
   954  	}
   955  	return 0
   956  }
   957  
   958  func (m *Get) GetTimeout() int64 {
   959  	if x, ok := m.GetTimeoutPresent().(*Get_Timeout); ok {
   960  		return x.Timeout
   961  	}
   962  	return 0
   963  }
   964  
   965  func (m *Get) GetUnit() int32 {
   966  	if x, ok := m.GetUnitPresent().(*Get_Unit); ok {
   967  		return x.Unit
   968  	}
   969  	return 0
   970  }
   971  
   972  func (m *Get) GetAutoAck() bool {
   973  	if x, ok := m.GetAutoAckPresent().(*Get_AutoAck); ok {
   974  		return x.AutoAck
   975  	}
   976  	return false
   977  }
   978  
   979  // XXX_OneofWrappers is for the internal use of the proto package.
   980  func (*Get) XXX_OneofWrappers() []interface{} {
   981  	return []interface{}{
   982  		(*Get_Timeout)(nil),
   983  		(*Get_Unit)(nil),
   984  		(*Get_AutoAck)(nil),
   985  	}
   986  }
   987  
   988  type Messages struct {
   989  	BatchId  int64    `protobuf:"varint,1,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
   990  	Messages [][]byte `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
   991  }
   992  
   993  func (m *Messages) Reset()         { *m = Messages{} }
   994  func (m *Messages) String() string { return proto.CompactTextString(m) }
   995  func (*Messages) ProtoMessage()    {}
   996  func (*Messages) Descriptor() ([]byte, []int) {
   997  	return fileDescriptor_638f57be23f1b015, []int{9}
   998  }
   999  func (m *Messages) XXX_Unmarshal(b []byte) error {
  1000  	return m.Unmarshal(b)
  1001  }
  1002  func (m *Messages) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1003  	if deterministic {
  1004  		return xxx_messageInfo_Messages.Marshal(b, m, deterministic)
  1005  	} else {
  1006  		b = b[:cap(b)]
  1007  		n, err := m.MarshalToSizedBuffer(b)
  1008  		if err != nil {
  1009  			return nil, err
  1010  		}
  1011  		return b[:n], nil
  1012  	}
  1013  }
  1014  func (m *Messages) XXX_Merge(src proto.Message) {
  1015  	xxx_messageInfo_Messages.Merge(m, src)
  1016  }
  1017  func (m *Messages) XXX_Size() int {
  1018  	return m.Size()
  1019  }
  1020  func (m *Messages) XXX_DiscardUnknown() {
  1021  	xxx_messageInfo_Messages.DiscardUnknown(m)
  1022  }
  1023  
  1024  var xxx_messageInfo_Messages proto.InternalMessageInfo
  1025  
  1026  func (m *Messages) GetBatchId() int64 {
  1027  	if m != nil {
  1028  		return m.BatchId
  1029  	}
  1030  	return 0
  1031  }
  1032  
  1033  func (m *Messages) GetMessages() [][]byte {
  1034  	if m != nil {
  1035  		return m.Messages
  1036  	}
  1037  	return nil
  1038  }
  1039  
  1040  // TBD when new packets are required
  1041  type Dump struct {
  1042  	Journal  string `protobuf:"bytes,1,opt,name=journal,proto3" json:"journal,omitempty"`
  1043  	Position int64  `protobuf:"varint,2,opt,name=position,proto3" json:"position,omitempty"`
  1044  	// [default = 0]
  1045  	//
  1046  	// Types that are valid to be assigned to TimestampPresent:
  1047  	//
  1048  	//	*Dump_Timestamp
  1049  	TimestampPresent isDump_TimestampPresent `protobuf_oneof:"timestamp_present"`
  1050  }
  1051  
  1052  func (m *Dump) Reset()         { *m = Dump{} }
  1053  func (m *Dump) String() string { return proto.CompactTextString(m) }
  1054  func (*Dump) ProtoMessage()    {}
  1055  func (*Dump) Descriptor() ([]byte, []int) {
  1056  	return fileDescriptor_638f57be23f1b015, []int{10}
  1057  }
  1058  func (m *Dump) XXX_Unmarshal(b []byte) error {
  1059  	return m.Unmarshal(b)
  1060  }
  1061  func (m *Dump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1062  	if deterministic {
  1063  		return xxx_messageInfo_Dump.Marshal(b, m, deterministic)
  1064  	} else {
  1065  		b = b[:cap(b)]
  1066  		n, err := m.MarshalToSizedBuffer(b)
  1067  		if err != nil {
  1068  			return nil, err
  1069  		}
  1070  		return b[:n], nil
  1071  	}
  1072  }
  1073  func (m *Dump) XXX_Merge(src proto.Message) {
  1074  	xxx_messageInfo_Dump.Merge(m, src)
  1075  }
  1076  func (m *Dump) XXX_Size() int {
  1077  	return m.Size()
  1078  }
  1079  func (m *Dump) XXX_DiscardUnknown() {
  1080  	xxx_messageInfo_Dump.DiscardUnknown(m)
  1081  }
  1082  
  1083  var xxx_messageInfo_Dump proto.InternalMessageInfo
  1084  
  1085  type isDump_TimestampPresent interface {
  1086  	isDump_TimestampPresent()
  1087  	MarshalTo([]byte) (int, error)
  1088  	Size() int
  1089  }
  1090  
  1091  type Dump_Timestamp struct {
  1092  	Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"`
  1093  }
  1094  
  1095  func (*Dump_Timestamp) isDump_TimestampPresent() {}
  1096  
  1097  func (m *Dump) GetTimestampPresent() isDump_TimestampPresent {
  1098  	if m != nil {
  1099  		return m.TimestampPresent
  1100  	}
  1101  	return nil
  1102  }
  1103  
  1104  func (m *Dump) GetJournal() string {
  1105  	if m != nil {
  1106  		return m.Journal
  1107  	}
  1108  	return ""
  1109  }
  1110  
  1111  func (m *Dump) GetPosition() int64 {
  1112  	if m != nil {
  1113  		return m.Position
  1114  	}
  1115  	return 0
  1116  }
  1117  
  1118  func (m *Dump) GetTimestamp() int64 {
  1119  	if x, ok := m.GetTimestampPresent().(*Dump_Timestamp); ok {
  1120  		return x.Timestamp
  1121  	}
  1122  	return 0
  1123  }
  1124  
  1125  // XXX_OneofWrappers is for the internal use of the proto package.
  1126  func (*Dump) XXX_OneofWrappers() []interface{} {
  1127  	return []interface{}{
  1128  		(*Dump_Timestamp)(nil),
  1129  	}
  1130  }
  1131  
  1132  type ClientRollback struct {
  1133  	Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
  1134  	ClientId    string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
  1135  	BatchId     int64  `protobuf:"varint,3,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
  1136  }
  1137  
  1138  func (m *ClientRollback) Reset()         { *m = ClientRollback{} }
  1139  func (m *ClientRollback) String() string { return proto.CompactTextString(m) }
  1140  func (*ClientRollback) ProtoMessage()    {}
  1141  func (*ClientRollback) Descriptor() ([]byte, []int) {
  1142  	return fileDescriptor_638f57be23f1b015, []int{11}
  1143  }
  1144  func (m *ClientRollback) XXX_Unmarshal(b []byte) error {
  1145  	return m.Unmarshal(b)
  1146  }
  1147  func (m *ClientRollback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1148  	if deterministic {
  1149  		return xxx_messageInfo_ClientRollback.Marshal(b, m, deterministic)
  1150  	} else {
  1151  		b = b[:cap(b)]
  1152  		n, err := m.MarshalToSizedBuffer(b)
  1153  		if err != nil {
  1154  			return nil, err
  1155  		}
  1156  		return b[:n], nil
  1157  	}
  1158  }
  1159  func (m *ClientRollback) XXX_Merge(src proto.Message) {
  1160  	xxx_messageInfo_ClientRollback.Merge(m, src)
  1161  }
  1162  func (m *ClientRollback) XXX_Size() int {
  1163  	return m.Size()
  1164  }
  1165  func (m *ClientRollback) XXX_DiscardUnknown() {
  1166  	xxx_messageInfo_ClientRollback.DiscardUnknown(m)
  1167  }
  1168  
  1169  var xxx_messageInfo_ClientRollback proto.InternalMessageInfo
  1170  
  1171  func (m *ClientRollback) GetDestination() string {
  1172  	if m != nil {
  1173  		return m.Destination
  1174  	}
  1175  	return ""
  1176  }
  1177  
  1178  func (m *ClientRollback) GetClientId() string {
  1179  	if m != nil {
  1180  		return m.ClientId
  1181  	}
  1182  	return ""
  1183  }
  1184  
  1185  func (m *ClientRollback) GetBatchId() int64 {
  1186  	if m != nil {
  1187  		return m.BatchId
  1188  	}
  1189  	return 0
  1190  }
  1191  
  1192  func init() {
  1193  	proto.RegisterEnum("com.alibaba.otter.canal.protocol.Compression", Compression_name, Compression_value)
  1194  	proto.RegisterEnum("com.alibaba.otter.canal.protocol.PacketType", PacketType_name, PacketType_value)
  1195  	proto.RegisterType((*Packet)(nil), "com.alibaba.otter.canal.protocol.Packet")
  1196  	proto.RegisterType((*HeartBeat)(nil), "com.alibaba.otter.canal.protocol.HeartBeat")
  1197  	proto.RegisterType((*Handshake)(nil), "com.alibaba.otter.canal.protocol.Handshake")
  1198  	proto.RegisterType((*ClientAuth)(nil), "com.alibaba.otter.canal.protocol.ClientAuth")
  1199  	proto.RegisterType((*Ack)(nil), "com.alibaba.otter.canal.protocol.Ack")
  1200  	proto.RegisterType((*ClientAck)(nil), "com.alibaba.otter.canal.protocol.ClientAck")
  1201  	proto.RegisterType((*Sub)(nil), "com.alibaba.otter.canal.protocol.Sub")
  1202  	proto.RegisterType((*Unsub)(nil), "com.alibaba.otter.canal.protocol.Unsub")
  1203  	proto.RegisterType((*Get)(nil), "com.alibaba.otter.canal.protocol.Get")
  1204  	proto.RegisterType((*Messages)(nil), "com.alibaba.otter.canal.protocol.Messages")
  1205  	proto.RegisterType((*Dump)(nil), "com.alibaba.otter.canal.protocol.Dump")
  1206  	proto.RegisterType((*ClientRollback)(nil), "com.alibaba.otter.canal.protocol.ClientRollback")
  1207  }
  1208  
  1209  func init() { proto.RegisterFile("CanalProtocol.proto", fileDescriptor_638f57be23f1b015) }
  1210  
  1211  var fileDescriptor_638f57be23f1b015 = []byte{
  1212  	// 1048 bytes of a gzipped FileDescriptorProto
  1213  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdf, 0x6e, 0xe2, 0xc6,
  1214  	0x17, 0xc6, 0x18, 0x02, 0x3e, 0x10, 0xe2, 0x4c, 0xfe, 0x88, 0x4d, 0xf4, 0x63, 0x11, 0xab, 0x9f,
  1215  	0x1a, 0x45, 0x5b, 0x2e, 0xb6, 0x17, 0xbd, 0xad, 0x4d, 0xdc, 0x18, 0x85, 0x00, 0x1d, 0x8c, 0x56,
  1216  	0x4d, 0xab, 0xa2, 0xc1, 0x9e, 0x4d, 0xbc, 0x80, 0x87, 0xda, 0xe3, 0xae, 0xb2, 0x4f, 0xd1, 0x87,
  1217  	0xe9, 0x43, 0xf4, 0x72, 0xef, 0xda, 0xcb, 0x2a, 0x91, 0x2a, 0xf5, 0x2d, 0xaa, 0x19, 0x1b, 0x87,
  1218  	0xa4, 0xa9, 0xa2, 0x6a, 0xb5, 0x77, 0x73, 0xbe, 0x73, 0xe6, 0x9c, 0x39, 0xdf, 0xf9, 0x66, 0x6c,
  1219  	0xd8, 0xe9, 0x90, 0x80, 0xcc, 0x87, 0x21, 0xe3, 0xcc, 0x65, 0xf3, 0xf6, 0x52, 0x2c, 0x50, 0xd3,
  1220  	0x65, 0x8b, 0x36, 0x99, 0xfb, 0x53, 0x32, 0x25, 0x6d, 0xc6, 0x39, 0x0d, 0xdb, 0xae, 0x08, 0x4b,
  1221  	0xdc, 0x2e, 0x9b, 0xb7, 0x7e, 0xc9, 0xc3, 0xc6, 0x90, 0xb8, 0x33, 0xca, 0xd1, 0x0b, 0xa8, 0x2e,
  1222  	0xc8, 0xa5, 0xef, 0x4e, 0x82, 0x78, 0x31, 0xa5, 0x61, 0x5d, 0x69, 0x2a, 0x47, 0x45, 0x3b, 0x87,
  1223  	0x2b, 0x12, 0xed, 0x4b, 0x10, 0x1d, 0x40, 0xe9, 0x27, 0x1a, 0x46, 0x3e, 0x0b, 0xea, 0x79, 0xe9,
  1224  	0x57, 0xf0, 0x0a, 0x40, 0x5f, 0x41, 0x81, 0x5f, 0x2f, 0x69, 0x5d, 0x6d, 0x2a, 0x47, 0xb5, 0x57,
  1225  	0x2f, 0xdb, 0x4f, 0x15, 0x6f, 0x27, 0x85, 0x9d, 0xeb, 0x25, 0xc5, 0x72, 0x27, 0xfa, 0x06, 0x2a,
  1226  	0x2e, 0x5b, 0x2c, 0x43, 0x1a, 0xc9, 0x0a, 0x05, 0x99, 0xe8, 0xf3, 0xa7, 0x13, 0x75, 0xee, 0x36,
  1227  	0xd9, 0x79, 0xbc, 0x9e, 0x03, 0x21, 0x28, 0x4c, 0x99, 0x77, 0x5d, 0x2f, 0x36, 0x95, 0xa3, 0x2a,
  1228  	0x96, 0x6b, 0x73, 0x1f, 0x76, 0xd7, 0x3b, 0x9d, 0x88, 0x60, 0x1a, 0x70, 0x73, 0x1b, 0xb6, 0xd2,
  1229  	0x5e, 0x32, 0x68, 0x0f, 0x76, 0xd6, 0xb2, 0xad, 0xe0, 0xd6, 0x77, 0xa0, 0xd9, 0x94, 0x84, 0xdc,
  1230  	0xa4, 0x84, 0xa3, 0xff, 0x43, 0x2d, 0xa2, 0x81, 0x37, 0xe1, 0xfe, 0x82, 0x46, 0x9c, 0x2c, 0x96,
  1231  	0x92, 0x3a, 0x15, 0x6f, 0x0a, 0xd4, 0x59, 0x81, 0xe8, 0x33, 0xd8, 0x8a, 0x38, 0x09, 0xf9, 0x5a,
  1232  	0x5c, 0x5e, 0xc6, 0xd5, 0x24, 0x9c, 0x05, 0xb6, 0x6e, 0x14, 0xd0, 0x6c, 0x12, 0x78, 0xd1, 0x15,
  1233  	0x99, 0x51, 0xf4, 0x25, 0xec, 0xbb, 0x6c, 0xb1, 0x88, 0x03, 0xdf, 0x25, 0x5c, 0x9c, 0x81, 0x06,
  1234  	0x2e, 0xf3, 0xfc, 0xe0, 0x52, 0x56, 0xd1, 0xec, 0x1c, 0xde, 0xbb, 0xe7, 0xb7, 0x52, 0x37, 0xda,
  1235  	0x85, 0x62, 0x44, 0xa9, 0x17, 0xc9, 0x2a, 0x55, 0x9c, 0x18, 0xc8, 0x83, 0xfd, 0x28, 0x5e, 0x2e,
  1236  	0x59, 0xc8, 0xa9, 0x37, 0x59, 0x6b, 0x2d, 0x4a, 0xc7, 0xf6, 0xdf, 0xd8, 0xc6, 0x7b, 0x59, 0xb2,
  1237  	0x35, 0x34, 0x32, 0x9b, 0xd0, 0x78, 0xfc, 0xd0, 0x19, 0x83, 0xbf, 0xe5, 0x01, 0x3a, 0x73, 0x9f,
  1238  	0x06, 0xdc, 0x88, 0xf9, 0x15, 0x3a, 0x80, 0x72, 0x1c, 0xd1, 0x30, 0x20, 0x0b, 0x9a, 0xf4, 0x85,
  1239  	0x33, 0x5b, 0xf8, 0x96, 0x24, 0x8a, 0xde, 0xb1, 0xd0, 0x4b, 0x7b, 0xc9, 0x6c, 0x74, 0x0c, 0x7a,
  1240  	0x40, 0xf9, 0x24, 0xa4, 0x24, 0xe1, 0x9f, 0xc5, 0x5c, 0x36, 0x22, 0x84, 0x5b, 0x0b, 0x28, 0xc7,
  1241  	0x94, 0xc8, 0x11, 0xb0, 0x98, 0xa3, 0x97, 0xb0, 0x2d, 0x62, 0xdf, 0x85, 0x3e, 0xa7, 0x59, 0x70,
  1242  	0x21, 0x55, 0xf1, 0x56, 0x40, 0xf9, 0x6b, 0xe1, 0x59, 0x45, 0x37, 0xa1, 0xe2, 0xd1, 0x88, 0xfb,
  1243  	0x81, 0x6c, 0x40, 0xea, 0x47, 0xc3, 0xeb, 0x10, 0x3a, 0x04, 0xcd, 0x95, 0x1d, 0x4c, 0x7c, 0xaf,
  1244  	0xbe, 0x91, 0x1c, 0x3a, 0x01, 0xba, 0x1e, 0xda, 0x87, 0x8d, 0x37, 0xfe, 0x9c, 0xd3, 0xb0, 0x5e,
  1245  	0x92, 0x9e, 0xd4, 0x7a, 0x4c, 0x05, 0xe5, 0xc7, 0x54, 0x60, 0x1e, 0x40, 0xfd, 0x61, 0x67, 0x99,
  1246  	0x2a, 0x0f, 0xe1, 0xd9, 0x3f, 0x3a, 0xc9, 0x98, 0x25, 0xa0, 0x1a, 0xee, 0x0c, 0x3d, 0x07, 0xa0,
  1247  	0x61, 0xc8, 0xc2, 0x89, 0xcb, 0x3c, 0x9a, 0x5d, 0x66, 0x4d, 0x62, 0x1d, 0xe6, 0x51, 0xf4, 0x02,
  1248  	0x36, 0x93, 0x80, 0x05, 0x8d, 0x22, 0x72, 0x49, 0x25, 0xb7, 0x1a, 0xae, 0x4a, 0xf0, 0x3c, 0xc1,
  1249  	0xcc, 0x5d, 0x40, 0x77, 0x59, 0xb2, 0x12, 0x14, 0xb4, 0x74, 0x76, 0xee, 0xec, 0x21, 0x51, 0xca,
  1250  	0x13, 0x44, 0xe5, 0x1f, 0x10, 0xf5, 0x0c, 0xca, 0x53, 0xc2, 0xdd, 0x2b, 0xe1, 0x53, 0x25, 0x13,
  1251  	0x25, 0x69, 0x77, 0xbd, 0xd6, 0xf7, 0xa0, 0x8e, 0xe2, 0xe9, 0xc7, 0x16, 0xf8, 0x97, 0x49, 0xb4,
  1252  	0x7e, 0x80, 0xe2, 0x38, 0x88, 0x3e, 0x5d, 0xfe, 0xbf, 0x14, 0x50, 0x4f, 0x29, 0xff, 0xd8, 0xf4,
  1253  	0xff, 0x03, 0x78, 0x43, 0x05, 0x3f, 0x91, 0xff, 0x3e, 0x79, 0x5b, 0x8b, 0x58, 0x93, 0xc8, 0xc8,
  1254  	0x7f, 0x2f, 0x2e, 0x47, 0x69, 0x5d, 0xca, 0xaa, 0x9d, 0xc3, 0x2b, 0x00, 0xed, 0x42, 0x21, 0x0e,
  1255  	0x7c, 0x2e, 0xb5, 0x2b, 0x34, 0x2e, 0x2d, 0x74, 0x08, 0x65, 0x12, 0x73, 0x36, 0x21, 0xee, 0x4c,
  1256  	0xaa, 0xb6, 0x6c, 0xe7, 0x71, 0x49, 0x20, 0x86, 0x3b, 0x13, 0x4f, 0xe0, 0x43, 0xb1, 0xd5, 0xa0,
  1257  	0x2a, 0xf6, 0x65, 0x36, 0x02, 0x7d, 0xb5, 0x3f, 0x13, 0x84, 0x01, 0xe5, 0x54, 0x31, 0xd1, 0xbd,
  1258  	0x81, 0x2a, 0xf7, 0x06, 0x2a, 0x6e, 0x72, 0x2a, 0x36, 0xf1, 0x2a, 0xa9, 0xe2, 0x26, 0xaf, 0xec,
  1259  	0xd6, 0x8f, 0x50, 0x38, 0x89, 0x17, 0x4b, 0x54, 0x87, 0xd2, 0x5b, 0x16, 0x87, 0x01, 0x99, 0xa7,
  1260  	0x54, 0xad, 0x4c, 0xf9, 0x0e, 0xb0, 0xc8, 0xe7, 0xab, 0x8f, 0x8f, 0x8a, 0x33, 0x1b, 0x35, 0x40,
  1261  	0xbb, 0xbb, 0x50, 0x6a, 0x4a, 0xc4, 0x1d, 0x64, 0xee, 0xc0, 0x76, 0x66, 0x64, 0xa7, 0x7e, 0x0b,
  1262  	0xb5, 0x44, 0xc6, 0x98, 0xcd, 0xe7, 0x53, 0xf2, 0x29, 0xb5, 0x7c, 0x3c, 0x86, 0xca, 0xda, 0x0b,
  1263  	0x89, 0x9e, 0xc3, 0x61, 0x67, 0x70, 0x3e, 0xc4, 0xd6, 0x68, 0xd4, 0x1d, 0xf4, 0xc5, 0xd2, 0x70,
  1264  	0xba, 0x66, 0xcf, 0x1a, 0xe2, 0x81, 0x33, 0x78, 0xa5, 0xe7, 0x50, 0x19, 0x0a, 0xfd, 0x41, 0xdf,
  1265  	0xd2, 0x15, 0xb1, 0xba, 0xe8, 0x75, 0x4d, 0x3d, 0x2f, 0x56, 0xa7, 0x17, 0xdd, 0xa1, 0xae, 0xa2,
  1266  	0x12, 0xa8, 0xbd, 0x8b, 0xaf, 0xf5, 0xc2, 0xf1, 0x9f, 0x0a, 0xc0, 0xdd, 0x67, 0x54, 0xa4, 0x1d,
  1267  	0x1a, 0x9d, 0x33, 0xe3, 0xd4, 0x72, 0xbe, 0x1d, 0x5a, 0x8f, 0xa4, 0xdd, 0x04, 0xcd, 0x36, 0xfa,
  1268  	0x27, 0x23, 0xdb, 0x38, 0x13, 0xb9, 0xeb, 0xb0, 0xdb, 0xe9, 0x75, 0xad, 0xbe, 0x63, 0x8c, 0x1d,
  1269  	0xdb, 0xea, 0x3b, 0xdd, 0x8e, 0xe1, 0x74, 0x07, 0x7d, 0x3d, 0x2f, 0x2a, 0x18, 0x9d, 0x33, 0x5d,
  1270  	0x45, 0x3a, 0x54, 0x47, 0x63, 0x73, 0xd4, 0xc1, 0xdd, 0xa1, 0x74, 0x15, 0x10, 0x82, 0xda, 0xb8,
  1271  	0x7f, 0x0f, 0x2b, 0x8a, 0xf0, 0x53, 0xcb, 0xd1, 0x37, 0x50, 0x15, 0xca, 0xe7, 0xd6, 0x68, 0x64,
  1272  	0x9c, 0x5a, 0x23, 0xbd, 0x24, 0xca, 0xa5, 0xf9, 0x3b, 0x67, 0x7a, 0x59, 0x38, 0x47, 0xf6, 0xd8,
  1273  	0x39, 0x19, 0xbc, 0xee, 0xeb, 0x9a, 0x68, 0xe7, 0x64, 0x7c, 0x3e, 0xd4, 0x41, 0x9e, 0xca, 0x32,
  1274  	0xb0, 0x63, 0x5a, 0x86, 0xa3, 0x57, 0x44, 0x81, 0x64, 0x17, 0x1e, 0xf4, 0x7a, 0xa6, 0xd8, 0x5a,
  1275  	0x35, 0xbb, 0xbf, 0xde, 0x34, 0x94, 0x0f, 0x37, 0x0d, 0xe5, 0x8f, 0x9b, 0x86, 0xf2, 0xf3, 0x6d,
  1276  	0x23, 0xf7, 0xe1, 0xb6, 0x91, 0xfb, 0xfd, 0xb6, 0x91, 0x83, 0x27, 0x7f, 0x72, 0xcc, 0x4a, 0xf2,
  1277  	0x6f, 0x24, 0x69, 0xb2, 0x95, 0xe9, 0x86, 0x74, 0x7c, 0xf1, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff,
  1278  	0xa4, 0x4a, 0x77, 0x25, 0x33, 0x09, 0x00, 0x00,
  1279  }
  1280  
  1281  func (m *Packet) Marshal() (dAtA []byte, err error) {
  1282  	size := m.Size()
  1283  	dAtA = make([]byte, size)
  1284  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1285  	if err != nil {
  1286  		return nil, err
  1287  	}
  1288  	return dAtA[:n], nil
  1289  }
  1290  
  1291  func (m *Packet) MarshalTo(dAtA []byte) (int, error) {
  1292  	size := m.Size()
  1293  	return m.MarshalToSizedBuffer(dAtA[:size])
  1294  }
  1295  
  1296  func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1297  	i := len(dAtA)
  1298  	_ = i
  1299  	var l int
  1300  	_ = l
  1301  	if len(m.Body) > 0 {
  1302  		i -= len(m.Body)
  1303  		copy(dAtA[i:], m.Body)
  1304  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Body)))
  1305  		i--
  1306  		dAtA[i] = 0x2a
  1307  	}
  1308  	if m.CompressionPresent != nil {
  1309  		{
  1310  			size := m.CompressionPresent.Size()
  1311  			i -= size
  1312  			if _, err := m.CompressionPresent.MarshalTo(dAtA[i:]); err != nil {
  1313  				return 0, err
  1314  			}
  1315  		}
  1316  	}
  1317  	if m.Type != 0 {
  1318  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Type))
  1319  		i--
  1320  		dAtA[i] = 0x18
  1321  	}
  1322  	if m.VersionPresent != nil {
  1323  		{
  1324  			size := m.VersionPresent.Size()
  1325  			i -= size
  1326  			if _, err := m.VersionPresent.MarshalTo(dAtA[i:]); err != nil {
  1327  				return 0, err
  1328  			}
  1329  		}
  1330  	}
  1331  	if m.MagicNumberPresent != nil {
  1332  		{
  1333  			size := m.MagicNumberPresent.Size()
  1334  			i -= size
  1335  			if _, err := m.MagicNumberPresent.MarshalTo(dAtA[i:]); err != nil {
  1336  				return 0, err
  1337  			}
  1338  		}
  1339  	}
  1340  	return len(dAtA) - i, nil
  1341  }
  1342  
  1343  func (m *Packet_MagicNumber) MarshalTo(dAtA []byte) (int, error) {
  1344  	size := m.Size()
  1345  	return m.MarshalToSizedBuffer(dAtA[:size])
  1346  }
  1347  
  1348  func (m *Packet_MagicNumber) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1349  	i := len(dAtA)
  1350  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.MagicNumber))
  1351  	i--
  1352  	dAtA[i] = 0x8
  1353  	return len(dAtA) - i, nil
  1354  }
  1355  func (m *Packet_Version) MarshalTo(dAtA []byte) (int, error) {
  1356  	size := m.Size()
  1357  	return m.MarshalToSizedBuffer(dAtA[:size])
  1358  }
  1359  
  1360  func (m *Packet_Version) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1361  	i := len(dAtA)
  1362  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Version))
  1363  	i--
  1364  	dAtA[i] = 0x10
  1365  	return len(dAtA) - i, nil
  1366  }
  1367  func (m *Packet_Compression) MarshalTo(dAtA []byte) (int, error) {
  1368  	size := m.Size()
  1369  	return m.MarshalToSizedBuffer(dAtA[:size])
  1370  }
  1371  
  1372  func (m *Packet_Compression) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1373  	i := len(dAtA)
  1374  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Compression))
  1375  	i--
  1376  	dAtA[i] = 0x20
  1377  	return len(dAtA) - i, nil
  1378  }
  1379  func (m *HeartBeat) Marshal() (dAtA []byte, err error) {
  1380  	size := m.Size()
  1381  	dAtA = make([]byte, size)
  1382  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1383  	if err != nil {
  1384  		return nil, err
  1385  	}
  1386  	return dAtA[:n], nil
  1387  }
  1388  
  1389  func (m *HeartBeat) MarshalTo(dAtA []byte) (int, error) {
  1390  	size := m.Size()
  1391  	return m.MarshalToSizedBuffer(dAtA[:size])
  1392  }
  1393  
  1394  func (m *HeartBeat) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1395  	i := len(dAtA)
  1396  	_ = i
  1397  	var l int
  1398  	_ = l
  1399  	if m.StartTimestamp != 0 {
  1400  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.StartTimestamp))
  1401  		i--
  1402  		dAtA[i] = 0x10
  1403  	}
  1404  	if m.SendTimestamp != 0 {
  1405  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.SendTimestamp))
  1406  		i--
  1407  		dAtA[i] = 0x8
  1408  	}
  1409  	return len(dAtA) - i, nil
  1410  }
  1411  
  1412  func (m *Handshake) Marshal() (dAtA []byte, err error) {
  1413  	size := m.Size()
  1414  	dAtA = make([]byte, size)
  1415  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1416  	if err != nil {
  1417  		return nil, err
  1418  	}
  1419  	return dAtA[:n], nil
  1420  }
  1421  
  1422  func (m *Handshake) MarshalTo(dAtA []byte) (int, error) {
  1423  	size := m.Size()
  1424  	return m.MarshalToSizedBuffer(dAtA[:size])
  1425  }
  1426  
  1427  func (m *Handshake) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1428  	i := len(dAtA)
  1429  	_ = i
  1430  	var l int
  1431  	_ = l
  1432  	if m.SupportedCompressions != 0 {
  1433  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.SupportedCompressions))
  1434  		i--
  1435  		dAtA[i] = 0x18
  1436  	}
  1437  	if len(m.Seeds) > 0 {
  1438  		i -= len(m.Seeds)
  1439  		copy(dAtA[i:], m.Seeds)
  1440  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Seeds)))
  1441  		i--
  1442  		dAtA[i] = 0x12
  1443  	}
  1444  	if m.CommunicationEncodingPresent != nil {
  1445  		{
  1446  			size := m.CommunicationEncodingPresent.Size()
  1447  			i -= size
  1448  			if _, err := m.CommunicationEncodingPresent.MarshalTo(dAtA[i:]); err != nil {
  1449  				return 0, err
  1450  			}
  1451  		}
  1452  	}
  1453  	return len(dAtA) - i, nil
  1454  }
  1455  
  1456  func (m *Handshake_CommunicationEncoding) MarshalTo(dAtA []byte) (int, error) {
  1457  	size := m.Size()
  1458  	return m.MarshalToSizedBuffer(dAtA[:size])
  1459  }
  1460  
  1461  func (m *Handshake_CommunicationEncoding) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1462  	i := len(dAtA)
  1463  	i -= len(m.CommunicationEncoding)
  1464  	copy(dAtA[i:], m.CommunicationEncoding)
  1465  	i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.CommunicationEncoding)))
  1466  	i--
  1467  	dAtA[i] = 0xa
  1468  	return len(dAtA) - i, nil
  1469  }
  1470  func (m *ClientAuth) Marshal() (dAtA []byte, err error) {
  1471  	size := m.Size()
  1472  	dAtA = make([]byte, size)
  1473  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1474  	if err != nil {
  1475  		return nil, err
  1476  	}
  1477  	return dAtA[:n], nil
  1478  }
  1479  
  1480  func (m *ClientAuth) MarshalTo(dAtA []byte) (int, error) {
  1481  	size := m.Size()
  1482  	return m.MarshalToSizedBuffer(dAtA[:size])
  1483  }
  1484  
  1485  func (m *ClientAuth) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1486  	i := len(dAtA)
  1487  	_ = i
  1488  	var l int
  1489  	_ = l
  1490  	if m.StartTimestamp != 0 {
  1491  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.StartTimestamp))
  1492  		i--
  1493  		dAtA[i] = 0x40
  1494  	}
  1495  	if len(m.Filter) > 0 {
  1496  		i -= len(m.Filter)
  1497  		copy(dAtA[i:], m.Filter)
  1498  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Filter)))
  1499  		i--
  1500  		dAtA[i] = 0x3a
  1501  	}
  1502  	if len(m.ClientId) > 0 {
  1503  		i -= len(m.ClientId)
  1504  		copy(dAtA[i:], m.ClientId)
  1505  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
  1506  		i--
  1507  		dAtA[i] = 0x32
  1508  	}
  1509  	if len(m.Destination) > 0 {
  1510  		i -= len(m.Destination)
  1511  		copy(dAtA[i:], m.Destination)
  1512  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
  1513  		i--
  1514  		dAtA[i] = 0x2a
  1515  	}
  1516  	if m.NetWriteTimeoutPresent != nil {
  1517  		{
  1518  			size := m.NetWriteTimeoutPresent.Size()
  1519  			i -= size
  1520  			if _, err := m.NetWriteTimeoutPresent.MarshalTo(dAtA[i:]); err != nil {
  1521  				return 0, err
  1522  			}
  1523  		}
  1524  	}
  1525  	if m.NetReadTimeoutPresent != nil {
  1526  		{
  1527  			size := m.NetReadTimeoutPresent.Size()
  1528  			i -= size
  1529  			if _, err := m.NetReadTimeoutPresent.MarshalTo(dAtA[i:]); err != nil {
  1530  				return 0, err
  1531  			}
  1532  		}
  1533  	}
  1534  	if len(m.Password) > 0 {
  1535  		i -= len(m.Password)
  1536  		copy(dAtA[i:], m.Password)
  1537  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Password)))
  1538  		i--
  1539  		dAtA[i] = 0x12
  1540  	}
  1541  	if len(m.Username) > 0 {
  1542  		i -= len(m.Username)
  1543  		copy(dAtA[i:], m.Username)
  1544  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Username)))
  1545  		i--
  1546  		dAtA[i] = 0xa
  1547  	}
  1548  	return len(dAtA) - i, nil
  1549  }
  1550  
  1551  func (m *ClientAuth_NetReadTimeout) MarshalTo(dAtA []byte) (int, error) {
  1552  	size := m.Size()
  1553  	return m.MarshalToSizedBuffer(dAtA[:size])
  1554  }
  1555  
  1556  func (m *ClientAuth_NetReadTimeout) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1557  	i := len(dAtA)
  1558  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.NetReadTimeout))
  1559  	i--
  1560  	dAtA[i] = 0x18
  1561  	return len(dAtA) - i, nil
  1562  }
  1563  func (m *ClientAuth_NetWriteTimeout) MarshalTo(dAtA []byte) (int, error) {
  1564  	size := m.Size()
  1565  	return m.MarshalToSizedBuffer(dAtA[:size])
  1566  }
  1567  
  1568  func (m *ClientAuth_NetWriteTimeout) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1569  	i := len(dAtA)
  1570  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.NetWriteTimeout))
  1571  	i--
  1572  	dAtA[i] = 0x20
  1573  	return len(dAtA) - i, nil
  1574  }
  1575  func (m *Ack) Marshal() (dAtA []byte, err error) {
  1576  	size := m.Size()
  1577  	dAtA = make([]byte, size)
  1578  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1579  	if err != nil {
  1580  		return nil, err
  1581  	}
  1582  	return dAtA[:n], nil
  1583  }
  1584  
  1585  func (m *Ack) MarshalTo(dAtA []byte) (int, error) {
  1586  	size := m.Size()
  1587  	return m.MarshalToSizedBuffer(dAtA[:size])
  1588  }
  1589  
  1590  func (m *Ack) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1591  	i := len(dAtA)
  1592  	_ = i
  1593  	var l int
  1594  	_ = l
  1595  	if len(m.ErrorMessage) > 0 {
  1596  		i -= len(m.ErrorMessage)
  1597  		copy(dAtA[i:], m.ErrorMessage)
  1598  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ErrorMessage)))
  1599  		i--
  1600  		dAtA[i] = 0x12
  1601  	}
  1602  	if m.ErrorCodePresent != nil {
  1603  		{
  1604  			size := m.ErrorCodePresent.Size()
  1605  			i -= size
  1606  			if _, err := m.ErrorCodePresent.MarshalTo(dAtA[i:]); err != nil {
  1607  				return 0, err
  1608  			}
  1609  		}
  1610  	}
  1611  	return len(dAtA) - i, nil
  1612  }
  1613  
  1614  func (m *Ack_ErrorCode) MarshalTo(dAtA []byte) (int, error) {
  1615  	size := m.Size()
  1616  	return m.MarshalToSizedBuffer(dAtA[:size])
  1617  }
  1618  
  1619  func (m *Ack_ErrorCode) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1620  	i := len(dAtA)
  1621  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.ErrorCode))
  1622  	i--
  1623  	dAtA[i] = 0x8
  1624  	return len(dAtA) - i, nil
  1625  }
  1626  func (m *ClientAck) Marshal() (dAtA []byte, err error) {
  1627  	size := m.Size()
  1628  	dAtA = make([]byte, size)
  1629  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1630  	if err != nil {
  1631  		return nil, err
  1632  	}
  1633  	return dAtA[:n], nil
  1634  }
  1635  
  1636  func (m *ClientAck) MarshalTo(dAtA []byte) (int, error) {
  1637  	size := m.Size()
  1638  	return m.MarshalToSizedBuffer(dAtA[:size])
  1639  }
  1640  
  1641  func (m *ClientAck) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1642  	i := len(dAtA)
  1643  	_ = i
  1644  	var l int
  1645  	_ = l
  1646  	if m.BatchId != 0 {
  1647  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.BatchId))
  1648  		i--
  1649  		dAtA[i] = 0x18
  1650  	}
  1651  	if len(m.ClientId) > 0 {
  1652  		i -= len(m.ClientId)
  1653  		copy(dAtA[i:], m.ClientId)
  1654  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
  1655  		i--
  1656  		dAtA[i] = 0x12
  1657  	}
  1658  	if len(m.Destination) > 0 {
  1659  		i -= len(m.Destination)
  1660  		copy(dAtA[i:], m.Destination)
  1661  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
  1662  		i--
  1663  		dAtA[i] = 0xa
  1664  	}
  1665  	return len(dAtA) - i, nil
  1666  }
  1667  
  1668  func (m *Sub) Marshal() (dAtA []byte, err error) {
  1669  	size := m.Size()
  1670  	dAtA = make([]byte, size)
  1671  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1672  	if err != nil {
  1673  		return nil, err
  1674  	}
  1675  	return dAtA[:n], nil
  1676  }
  1677  
  1678  func (m *Sub) MarshalTo(dAtA []byte) (int, error) {
  1679  	size := m.Size()
  1680  	return m.MarshalToSizedBuffer(dAtA[:size])
  1681  }
  1682  
  1683  func (m *Sub) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1684  	i := len(dAtA)
  1685  	_ = i
  1686  	var l int
  1687  	_ = l
  1688  	if len(m.Filter) > 0 {
  1689  		i -= len(m.Filter)
  1690  		copy(dAtA[i:], m.Filter)
  1691  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Filter)))
  1692  		i--
  1693  		dAtA[i] = 0x3a
  1694  	}
  1695  	if len(m.ClientId) > 0 {
  1696  		i -= len(m.ClientId)
  1697  		copy(dAtA[i:], m.ClientId)
  1698  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
  1699  		i--
  1700  		dAtA[i] = 0x12
  1701  	}
  1702  	if len(m.Destination) > 0 {
  1703  		i -= len(m.Destination)
  1704  		copy(dAtA[i:], m.Destination)
  1705  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
  1706  		i--
  1707  		dAtA[i] = 0xa
  1708  	}
  1709  	return len(dAtA) - i, nil
  1710  }
  1711  
  1712  func (m *Unsub) Marshal() (dAtA []byte, err error) {
  1713  	size := m.Size()
  1714  	dAtA = make([]byte, size)
  1715  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1716  	if err != nil {
  1717  		return nil, err
  1718  	}
  1719  	return dAtA[:n], nil
  1720  }
  1721  
  1722  func (m *Unsub) MarshalTo(dAtA []byte) (int, error) {
  1723  	size := m.Size()
  1724  	return m.MarshalToSizedBuffer(dAtA[:size])
  1725  }
  1726  
  1727  func (m *Unsub) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1728  	i := len(dAtA)
  1729  	_ = i
  1730  	var l int
  1731  	_ = l
  1732  	if len(m.Filter) > 0 {
  1733  		i -= len(m.Filter)
  1734  		copy(dAtA[i:], m.Filter)
  1735  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Filter)))
  1736  		i--
  1737  		dAtA[i] = 0x3a
  1738  	}
  1739  	if len(m.ClientId) > 0 {
  1740  		i -= len(m.ClientId)
  1741  		copy(dAtA[i:], m.ClientId)
  1742  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
  1743  		i--
  1744  		dAtA[i] = 0x12
  1745  	}
  1746  	if len(m.Destination) > 0 {
  1747  		i -= len(m.Destination)
  1748  		copy(dAtA[i:], m.Destination)
  1749  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
  1750  		i--
  1751  		dAtA[i] = 0xa
  1752  	}
  1753  	return len(dAtA) - i, nil
  1754  }
  1755  
  1756  func (m *Get) Marshal() (dAtA []byte, err error) {
  1757  	size := m.Size()
  1758  	dAtA = make([]byte, size)
  1759  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1760  	if err != nil {
  1761  		return nil, err
  1762  	}
  1763  	return dAtA[:n], nil
  1764  }
  1765  
  1766  func (m *Get) MarshalTo(dAtA []byte) (int, error) {
  1767  	size := m.Size()
  1768  	return m.MarshalToSizedBuffer(dAtA[:size])
  1769  }
  1770  
  1771  func (m *Get) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1772  	i := len(dAtA)
  1773  	_ = i
  1774  	var l int
  1775  	_ = l
  1776  	if m.AutoAckPresent != nil {
  1777  		{
  1778  			size := m.AutoAckPresent.Size()
  1779  			i -= size
  1780  			if _, err := m.AutoAckPresent.MarshalTo(dAtA[i:]); err != nil {
  1781  				return 0, err
  1782  			}
  1783  		}
  1784  	}
  1785  	if m.UnitPresent != nil {
  1786  		{
  1787  			size := m.UnitPresent.Size()
  1788  			i -= size
  1789  			if _, err := m.UnitPresent.MarshalTo(dAtA[i:]); err != nil {
  1790  				return 0, err
  1791  			}
  1792  		}
  1793  	}
  1794  	if m.TimeoutPresent != nil {
  1795  		{
  1796  			size := m.TimeoutPresent.Size()
  1797  			i -= size
  1798  			if _, err := m.TimeoutPresent.MarshalTo(dAtA[i:]); err != nil {
  1799  				return 0, err
  1800  			}
  1801  		}
  1802  	}
  1803  	if m.FetchSize != 0 {
  1804  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.FetchSize))
  1805  		i--
  1806  		dAtA[i] = 0x18
  1807  	}
  1808  	if len(m.ClientId) > 0 {
  1809  		i -= len(m.ClientId)
  1810  		copy(dAtA[i:], m.ClientId)
  1811  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
  1812  		i--
  1813  		dAtA[i] = 0x12
  1814  	}
  1815  	if len(m.Destination) > 0 {
  1816  		i -= len(m.Destination)
  1817  		copy(dAtA[i:], m.Destination)
  1818  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
  1819  		i--
  1820  		dAtA[i] = 0xa
  1821  	}
  1822  	return len(dAtA) - i, nil
  1823  }
  1824  
  1825  func (m *Get_Timeout) MarshalTo(dAtA []byte) (int, error) {
  1826  	size := m.Size()
  1827  	return m.MarshalToSizedBuffer(dAtA[:size])
  1828  }
  1829  
  1830  func (m *Get_Timeout) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1831  	i := len(dAtA)
  1832  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Timeout))
  1833  	i--
  1834  	dAtA[i] = 0x20
  1835  	return len(dAtA) - i, nil
  1836  }
  1837  func (m *Get_Unit) MarshalTo(dAtA []byte) (int, error) {
  1838  	size := m.Size()
  1839  	return m.MarshalToSizedBuffer(dAtA[:size])
  1840  }
  1841  
  1842  func (m *Get_Unit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1843  	i := len(dAtA)
  1844  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Unit))
  1845  	i--
  1846  	dAtA[i] = 0x28
  1847  	return len(dAtA) - i, nil
  1848  }
  1849  func (m *Get_AutoAck) MarshalTo(dAtA []byte) (int, error) {
  1850  	size := m.Size()
  1851  	return m.MarshalToSizedBuffer(dAtA[:size])
  1852  }
  1853  
  1854  func (m *Get_AutoAck) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1855  	i := len(dAtA)
  1856  	i--
  1857  	if m.AutoAck {
  1858  		dAtA[i] = 1
  1859  	} else {
  1860  		dAtA[i] = 0
  1861  	}
  1862  	i--
  1863  	dAtA[i] = 0x30
  1864  	return len(dAtA) - i, nil
  1865  }
  1866  func (m *Messages) Marshal() (dAtA []byte, err error) {
  1867  	size := m.Size()
  1868  	dAtA = make([]byte, size)
  1869  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1870  	if err != nil {
  1871  		return nil, err
  1872  	}
  1873  	return dAtA[:n], nil
  1874  }
  1875  
  1876  func (m *Messages) MarshalTo(dAtA []byte) (int, error) {
  1877  	size := m.Size()
  1878  	return m.MarshalToSizedBuffer(dAtA[:size])
  1879  }
  1880  
  1881  func (m *Messages) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1882  	i := len(dAtA)
  1883  	_ = i
  1884  	var l int
  1885  	_ = l
  1886  	if len(m.Messages) > 0 {
  1887  		for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- {
  1888  			i -= len(m.Messages[iNdEx])
  1889  			copy(dAtA[i:], m.Messages[iNdEx])
  1890  			i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Messages[iNdEx])))
  1891  			i--
  1892  			dAtA[i] = 0x12
  1893  		}
  1894  	}
  1895  	if m.BatchId != 0 {
  1896  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.BatchId))
  1897  		i--
  1898  		dAtA[i] = 0x8
  1899  	}
  1900  	return len(dAtA) - i, nil
  1901  }
  1902  
  1903  func (m *Dump) Marshal() (dAtA []byte, err error) {
  1904  	size := m.Size()
  1905  	dAtA = make([]byte, size)
  1906  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1907  	if err != nil {
  1908  		return nil, err
  1909  	}
  1910  	return dAtA[:n], nil
  1911  }
  1912  
  1913  func (m *Dump) MarshalTo(dAtA []byte) (int, error) {
  1914  	size := m.Size()
  1915  	return m.MarshalToSizedBuffer(dAtA[:size])
  1916  }
  1917  
  1918  func (m *Dump) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1919  	i := len(dAtA)
  1920  	_ = i
  1921  	var l int
  1922  	_ = l
  1923  	if m.TimestampPresent != nil {
  1924  		{
  1925  			size := m.TimestampPresent.Size()
  1926  			i -= size
  1927  			if _, err := m.TimestampPresent.MarshalTo(dAtA[i:]); err != nil {
  1928  				return 0, err
  1929  			}
  1930  		}
  1931  	}
  1932  	if m.Position != 0 {
  1933  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Position))
  1934  		i--
  1935  		dAtA[i] = 0x10
  1936  	}
  1937  	if len(m.Journal) > 0 {
  1938  		i -= len(m.Journal)
  1939  		copy(dAtA[i:], m.Journal)
  1940  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Journal)))
  1941  		i--
  1942  		dAtA[i] = 0xa
  1943  	}
  1944  	return len(dAtA) - i, nil
  1945  }
  1946  
  1947  func (m *Dump_Timestamp) MarshalTo(dAtA []byte) (int, error) {
  1948  	size := m.Size()
  1949  	return m.MarshalToSizedBuffer(dAtA[:size])
  1950  }
  1951  
  1952  func (m *Dump_Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1953  	i := len(dAtA)
  1954  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Timestamp))
  1955  	i--
  1956  	dAtA[i] = 0x18
  1957  	return len(dAtA) - i, nil
  1958  }
  1959  func (m *ClientRollback) Marshal() (dAtA []byte, err error) {
  1960  	size := m.Size()
  1961  	dAtA = make([]byte, size)
  1962  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1963  	if err != nil {
  1964  		return nil, err
  1965  	}
  1966  	return dAtA[:n], nil
  1967  }
  1968  
  1969  func (m *ClientRollback) MarshalTo(dAtA []byte) (int, error) {
  1970  	size := m.Size()
  1971  	return m.MarshalToSizedBuffer(dAtA[:size])
  1972  }
  1973  
  1974  func (m *ClientRollback) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1975  	i := len(dAtA)
  1976  	_ = i
  1977  	var l int
  1978  	_ = l
  1979  	if m.BatchId != 0 {
  1980  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.BatchId))
  1981  		i--
  1982  		dAtA[i] = 0x18
  1983  	}
  1984  	if len(m.ClientId) > 0 {
  1985  		i -= len(m.ClientId)
  1986  		copy(dAtA[i:], m.ClientId)
  1987  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
  1988  		i--
  1989  		dAtA[i] = 0x12
  1990  	}
  1991  	if len(m.Destination) > 0 {
  1992  		i -= len(m.Destination)
  1993  		copy(dAtA[i:], m.Destination)
  1994  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
  1995  		i--
  1996  		dAtA[i] = 0xa
  1997  	}
  1998  	return len(dAtA) - i, nil
  1999  }
  2000  
  2001  func encodeVarintCanalProtocol(dAtA []byte, offset int, v uint64) int {
  2002  	offset -= sovCanalProtocol(v)
  2003  	base := offset
  2004  	for v >= 1<<7 {
  2005  		dAtA[offset] = uint8(v&0x7f | 0x80)
  2006  		v >>= 7
  2007  		offset++
  2008  	}
  2009  	dAtA[offset] = uint8(v)
  2010  	return base
  2011  }
  2012  func (m *Packet) Size() (n int) {
  2013  	if m == nil {
  2014  		return 0
  2015  	}
  2016  	var l int
  2017  	_ = l
  2018  	if m.MagicNumberPresent != nil {
  2019  		n += m.MagicNumberPresent.Size()
  2020  	}
  2021  	if m.VersionPresent != nil {
  2022  		n += m.VersionPresent.Size()
  2023  	}
  2024  	if m.Type != 0 {
  2025  		n += 1 + sovCanalProtocol(uint64(m.Type))
  2026  	}
  2027  	if m.CompressionPresent != nil {
  2028  		n += m.CompressionPresent.Size()
  2029  	}
  2030  	l = len(m.Body)
  2031  	if l > 0 {
  2032  		n += 1 + l + sovCanalProtocol(uint64(l))
  2033  	}
  2034  	return n
  2035  }
  2036  
  2037  func (m *Packet_MagicNumber) Size() (n int) {
  2038  	if m == nil {
  2039  		return 0
  2040  	}
  2041  	var l int
  2042  	_ = l
  2043  	n += 1 + sovCanalProtocol(uint64(m.MagicNumber))
  2044  	return n
  2045  }
  2046  func (m *Packet_Version) Size() (n int) {
  2047  	if m == nil {
  2048  		return 0
  2049  	}
  2050  	var l int
  2051  	_ = l
  2052  	n += 1 + sovCanalProtocol(uint64(m.Version))
  2053  	return n
  2054  }
  2055  func (m *Packet_Compression) Size() (n int) {
  2056  	if m == nil {
  2057  		return 0
  2058  	}
  2059  	var l int
  2060  	_ = l
  2061  	n += 1 + sovCanalProtocol(uint64(m.Compression))
  2062  	return n
  2063  }
  2064  func (m *HeartBeat) Size() (n int) {
  2065  	if m == nil {
  2066  		return 0
  2067  	}
  2068  	var l int
  2069  	_ = l
  2070  	if m.SendTimestamp != 0 {
  2071  		n += 1 + sovCanalProtocol(uint64(m.SendTimestamp))
  2072  	}
  2073  	if m.StartTimestamp != 0 {
  2074  		n += 1 + sovCanalProtocol(uint64(m.StartTimestamp))
  2075  	}
  2076  	return n
  2077  }
  2078  
  2079  func (m *Handshake) Size() (n int) {
  2080  	if m == nil {
  2081  		return 0
  2082  	}
  2083  	var l int
  2084  	_ = l
  2085  	if m.CommunicationEncodingPresent != nil {
  2086  		n += m.CommunicationEncodingPresent.Size()
  2087  	}
  2088  	l = len(m.Seeds)
  2089  	if l > 0 {
  2090  		n += 1 + l + sovCanalProtocol(uint64(l))
  2091  	}
  2092  	if m.SupportedCompressions != 0 {
  2093  		n += 1 + sovCanalProtocol(uint64(m.SupportedCompressions))
  2094  	}
  2095  	return n
  2096  }
  2097  
  2098  func (m *Handshake_CommunicationEncoding) Size() (n int) {
  2099  	if m == nil {
  2100  		return 0
  2101  	}
  2102  	var l int
  2103  	_ = l
  2104  	l = len(m.CommunicationEncoding)
  2105  	n += 1 + l + sovCanalProtocol(uint64(l))
  2106  	return n
  2107  }
  2108  func (m *ClientAuth) Size() (n int) {
  2109  	if m == nil {
  2110  		return 0
  2111  	}
  2112  	var l int
  2113  	_ = l
  2114  	l = len(m.Username)
  2115  	if l > 0 {
  2116  		n += 1 + l + sovCanalProtocol(uint64(l))
  2117  	}
  2118  	l = len(m.Password)
  2119  	if l > 0 {
  2120  		n += 1 + l + sovCanalProtocol(uint64(l))
  2121  	}
  2122  	if m.NetReadTimeoutPresent != nil {
  2123  		n += m.NetReadTimeoutPresent.Size()
  2124  	}
  2125  	if m.NetWriteTimeoutPresent != nil {
  2126  		n += m.NetWriteTimeoutPresent.Size()
  2127  	}
  2128  	l = len(m.Destination)
  2129  	if l > 0 {
  2130  		n += 1 + l + sovCanalProtocol(uint64(l))
  2131  	}
  2132  	l = len(m.ClientId)
  2133  	if l > 0 {
  2134  		n += 1 + l + sovCanalProtocol(uint64(l))
  2135  	}
  2136  	l = len(m.Filter)
  2137  	if l > 0 {
  2138  		n += 1 + l + sovCanalProtocol(uint64(l))
  2139  	}
  2140  	if m.StartTimestamp != 0 {
  2141  		n += 1 + sovCanalProtocol(uint64(m.StartTimestamp))
  2142  	}
  2143  	return n
  2144  }
  2145  
  2146  func (m *ClientAuth_NetReadTimeout) Size() (n int) {
  2147  	if m == nil {
  2148  		return 0
  2149  	}
  2150  	var l int
  2151  	_ = l
  2152  	n += 1 + sovCanalProtocol(uint64(m.NetReadTimeout))
  2153  	return n
  2154  }
  2155  func (m *ClientAuth_NetWriteTimeout) Size() (n int) {
  2156  	if m == nil {
  2157  		return 0
  2158  	}
  2159  	var l int
  2160  	_ = l
  2161  	n += 1 + sovCanalProtocol(uint64(m.NetWriteTimeout))
  2162  	return n
  2163  }
  2164  func (m *Ack) Size() (n int) {
  2165  	if m == nil {
  2166  		return 0
  2167  	}
  2168  	var l int
  2169  	_ = l
  2170  	if m.ErrorCodePresent != nil {
  2171  		n += m.ErrorCodePresent.Size()
  2172  	}
  2173  	l = len(m.ErrorMessage)
  2174  	if l > 0 {
  2175  		n += 1 + l + sovCanalProtocol(uint64(l))
  2176  	}
  2177  	return n
  2178  }
  2179  
  2180  func (m *Ack_ErrorCode) Size() (n int) {
  2181  	if m == nil {
  2182  		return 0
  2183  	}
  2184  	var l int
  2185  	_ = l
  2186  	n += 1 + sovCanalProtocol(uint64(m.ErrorCode))
  2187  	return n
  2188  }
  2189  func (m *ClientAck) Size() (n int) {
  2190  	if m == nil {
  2191  		return 0
  2192  	}
  2193  	var l int
  2194  	_ = l
  2195  	l = len(m.Destination)
  2196  	if l > 0 {
  2197  		n += 1 + l + sovCanalProtocol(uint64(l))
  2198  	}
  2199  	l = len(m.ClientId)
  2200  	if l > 0 {
  2201  		n += 1 + l + sovCanalProtocol(uint64(l))
  2202  	}
  2203  	if m.BatchId != 0 {
  2204  		n += 1 + sovCanalProtocol(uint64(m.BatchId))
  2205  	}
  2206  	return n
  2207  }
  2208  
  2209  func (m *Sub) Size() (n int) {
  2210  	if m == nil {
  2211  		return 0
  2212  	}
  2213  	var l int
  2214  	_ = l
  2215  	l = len(m.Destination)
  2216  	if l > 0 {
  2217  		n += 1 + l + sovCanalProtocol(uint64(l))
  2218  	}
  2219  	l = len(m.ClientId)
  2220  	if l > 0 {
  2221  		n += 1 + l + sovCanalProtocol(uint64(l))
  2222  	}
  2223  	l = len(m.Filter)
  2224  	if l > 0 {
  2225  		n += 1 + l + sovCanalProtocol(uint64(l))
  2226  	}
  2227  	return n
  2228  }
  2229  
  2230  func (m *Unsub) Size() (n int) {
  2231  	if m == nil {
  2232  		return 0
  2233  	}
  2234  	var l int
  2235  	_ = l
  2236  	l = len(m.Destination)
  2237  	if l > 0 {
  2238  		n += 1 + l + sovCanalProtocol(uint64(l))
  2239  	}
  2240  	l = len(m.ClientId)
  2241  	if l > 0 {
  2242  		n += 1 + l + sovCanalProtocol(uint64(l))
  2243  	}
  2244  	l = len(m.Filter)
  2245  	if l > 0 {
  2246  		n += 1 + l + sovCanalProtocol(uint64(l))
  2247  	}
  2248  	return n
  2249  }
  2250  
  2251  func (m *Get) Size() (n int) {
  2252  	if m == nil {
  2253  		return 0
  2254  	}
  2255  	var l int
  2256  	_ = l
  2257  	l = len(m.Destination)
  2258  	if l > 0 {
  2259  		n += 1 + l + sovCanalProtocol(uint64(l))
  2260  	}
  2261  	l = len(m.ClientId)
  2262  	if l > 0 {
  2263  		n += 1 + l + sovCanalProtocol(uint64(l))
  2264  	}
  2265  	if m.FetchSize != 0 {
  2266  		n += 1 + sovCanalProtocol(uint64(m.FetchSize))
  2267  	}
  2268  	if m.TimeoutPresent != nil {
  2269  		n += m.TimeoutPresent.Size()
  2270  	}
  2271  	if m.UnitPresent != nil {
  2272  		n += m.UnitPresent.Size()
  2273  	}
  2274  	if m.AutoAckPresent != nil {
  2275  		n += m.AutoAckPresent.Size()
  2276  	}
  2277  	return n
  2278  }
  2279  
  2280  func (m *Get_Timeout) Size() (n int) {
  2281  	if m == nil {
  2282  		return 0
  2283  	}
  2284  	var l int
  2285  	_ = l
  2286  	n += 1 + sovCanalProtocol(uint64(m.Timeout))
  2287  	return n
  2288  }
  2289  func (m *Get_Unit) Size() (n int) {
  2290  	if m == nil {
  2291  		return 0
  2292  	}
  2293  	var l int
  2294  	_ = l
  2295  	n += 1 + sovCanalProtocol(uint64(m.Unit))
  2296  	return n
  2297  }
  2298  func (m *Get_AutoAck) Size() (n int) {
  2299  	if m == nil {
  2300  		return 0
  2301  	}
  2302  	var l int
  2303  	_ = l
  2304  	n += 2
  2305  	return n
  2306  }
  2307  func (m *Messages) Size() (n int) {
  2308  	if m == nil {
  2309  		return 0
  2310  	}
  2311  	var l int
  2312  	_ = l
  2313  	if m.BatchId != 0 {
  2314  		n += 1 + sovCanalProtocol(uint64(m.BatchId))
  2315  	}
  2316  	if len(m.Messages) > 0 {
  2317  		for _, b := range m.Messages {
  2318  			l = len(b)
  2319  			n += 1 + l + sovCanalProtocol(uint64(l))
  2320  		}
  2321  	}
  2322  	return n
  2323  }
  2324  
  2325  func (m *Dump) Size() (n int) {
  2326  	if m == nil {
  2327  		return 0
  2328  	}
  2329  	var l int
  2330  	_ = l
  2331  	l = len(m.Journal)
  2332  	if l > 0 {
  2333  		n += 1 + l + sovCanalProtocol(uint64(l))
  2334  	}
  2335  	if m.Position != 0 {
  2336  		n += 1 + sovCanalProtocol(uint64(m.Position))
  2337  	}
  2338  	if m.TimestampPresent != nil {
  2339  		n += m.TimestampPresent.Size()
  2340  	}
  2341  	return n
  2342  }
  2343  
  2344  func (m *Dump_Timestamp) Size() (n int) {
  2345  	if m == nil {
  2346  		return 0
  2347  	}
  2348  	var l int
  2349  	_ = l
  2350  	n += 1 + sovCanalProtocol(uint64(m.Timestamp))
  2351  	return n
  2352  }
  2353  func (m *ClientRollback) Size() (n int) {
  2354  	if m == nil {
  2355  		return 0
  2356  	}
  2357  	var l int
  2358  	_ = l
  2359  	l = len(m.Destination)
  2360  	if l > 0 {
  2361  		n += 1 + l + sovCanalProtocol(uint64(l))
  2362  	}
  2363  	l = len(m.ClientId)
  2364  	if l > 0 {
  2365  		n += 1 + l + sovCanalProtocol(uint64(l))
  2366  	}
  2367  	if m.BatchId != 0 {
  2368  		n += 1 + sovCanalProtocol(uint64(m.BatchId))
  2369  	}
  2370  	return n
  2371  }
  2372  
  2373  func sovCanalProtocol(x uint64) (n int) {
  2374  	return (math_bits.Len64(x|1) + 6) / 7
  2375  }
  2376  func sozCanalProtocol(x uint64) (n int) {
  2377  	return sovCanalProtocol(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  2378  }
  2379  func (m *Packet) Unmarshal(dAtA []byte) error {
  2380  	l := len(dAtA)
  2381  	iNdEx := 0
  2382  	for iNdEx < l {
  2383  		preIndex := iNdEx
  2384  		var wire uint64
  2385  		for shift := uint(0); ; shift += 7 {
  2386  			if shift >= 64 {
  2387  				return ErrIntOverflowCanalProtocol
  2388  			}
  2389  			if iNdEx >= l {
  2390  				return io.ErrUnexpectedEOF
  2391  			}
  2392  			b := dAtA[iNdEx]
  2393  			iNdEx++
  2394  			wire |= uint64(b&0x7F) << shift
  2395  			if b < 0x80 {
  2396  				break
  2397  			}
  2398  		}
  2399  		fieldNum := int32(wire >> 3)
  2400  		wireType := int(wire & 0x7)
  2401  		if wireType == 4 {
  2402  			return fmt.Errorf("proto: Packet: wiretype end group for non-group")
  2403  		}
  2404  		if fieldNum <= 0 {
  2405  			return fmt.Errorf("proto: Packet: illegal tag %d (wire type %d)", fieldNum, wire)
  2406  		}
  2407  		switch fieldNum {
  2408  		case 1:
  2409  			if wireType != 0 {
  2410  				return fmt.Errorf("proto: wrong wireType = %d for field MagicNumber", wireType)
  2411  			}
  2412  			var v int32
  2413  			for shift := uint(0); ; shift += 7 {
  2414  				if shift >= 64 {
  2415  					return ErrIntOverflowCanalProtocol
  2416  				}
  2417  				if iNdEx >= l {
  2418  					return io.ErrUnexpectedEOF
  2419  				}
  2420  				b := dAtA[iNdEx]
  2421  				iNdEx++
  2422  				v |= int32(b&0x7F) << shift
  2423  				if b < 0x80 {
  2424  					break
  2425  				}
  2426  			}
  2427  			m.MagicNumberPresent = &Packet_MagicNumber{v}
  2428  		case 2:
  2429  			if wireType != 0 {
  2430  				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  2431  			}
  2432  			var v int32
  2433  			for shift := uint(0); ; shift += 7 {
  2434  				if shift >= 64 {
  2435  					return ErrIntOverflowCanalProtocol
  2436  				}
  2437  				if iNdEx >= l {
  2438  					return io.ErrUnexpectedEOF
  2439  				}
  2440  				b := dAtA[iNdEx]
  2441  				iNdEx++
  2442  				v |= int32(b&0x7F) << shift
  2443  				if b < 0x80 {
  2444  					break
  2445  				}
  2446  			}
  2447  			m.VersionPresent = &Packet_Version{v}
  2448  		case 3:
  2449  			if wireType != 0 {
  2450  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2451  			}
  2452  			m.Type = 0
  2453  			for shift := uint(0); ; shift += 7 {
  2454  				if shift >= 64 {
  2455  					return ErrIntOverflowCanalProtocol
  2456  				}
  2457  				if iNdEx >= l {
  2458  					return io.ErrUnexpectedEOF
  2459  				}
  2460  				b := dAtA[iNdEx]
  2461  				iNdEx++
  2462  				m.Type |= PacketType(b&0x7F) << shift
  2463  				if b < 0x80 {
  2464  					break
  2465  				}
  2466  			}
  2467  		case 4:
  2468  			if wireType != 0 {
  2469  				return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  2470  			}
  2471  			var v Compression
  2472  			for shift := uint(0); ; shift += 7 {
  2473  				if shift >= 64 {
  2474  					return ErrIntOverflowCanalProtocol
  2475  				}
  2476  				if iNdEx >= l {
  2477  					return io.ErrUnexpectedEOF
  2478  				}
  2479  				b := dAtA[iNdEx]
  2480  				iNdEx++
  2481  				v |= Compression(b&0x7F) << shift
  2482  				if b < 0x80 {
  2483  					break
  2484  				}
  2485  			}
  2486  			m.CompressionPresent = &Packet_Compression{v}
  2487  		case 5:
  2488  			if wireType != 2 {
  2489  				return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType)
  2490  			}
  2491  			var byteLen int
  2492  			for shift := uint(0); ; shift += 7 {
  2493  				if shift >= 64 {
  2494  					return ErrIntOverflowCanalProtocol
  2495  				}
  2496  				if iNdEx >= l {
  2497  					return io.ErrUnexpectedEOF
  2498  				}
  2499  				b := dAtA[iNdEx]
  2500  				iNdEx++
  2501  				byteLen |= int(b&0x7F) << shift
  2502  				if b < 0x80 {
  2503  					break
  2504  				}
  2505  			}
  2506  			if byteLen < 0 {
  2507  				return ErrInvalidLengthCanalProtocol
  2508  			}
  2509  			postIndex := iNdEx + byteLen
  2510  			if postIndex < 0 {
  2511  				return ErrInvalidLengthCanalProtocol
  2512  			}
  2513  			if postIndex > l {
  2514  				return io.ErrUnexpectedEOF
  2515  			}
  2516  			m.Body = append(m.Body[:0], dAtA[iNdEx:postIndex]...)
  2517  			if m.Body == nil {
  2518  				m.Body = []byte{}
  2519  			}
  2520  			iNdEx = postIndex
  2521  		default:
  2522  			iNdEx = preIndex
  2523  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  2524  			if err != nil {
  2525  				return err
  2526  			}
  2527  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2528  				return ErrInvalidLengthCanalProtocol
  2529  			}
  2530  			if (iNdEx + skippy) > l {
  2531  				return io.ErrUnexpectedEOF
  2532  			}
  2533  			iNdEx += skippy
  2534  		}
  2535  	}
  2536  
  2537  	if iNdEx > l {
  2538  		return io.ErrUnexpectedEOF
  2539  	}
  2540  	return nil
  2541  }
  2542  func (m *HeartBeat) Unmarshal(dAtA []byte) error {
  2543  	l := len(dAtA)
  2544  	iNdEx := 0
  2545  	for iNdEx < l {
  2546  		preIndex := iNdEx
  2547  		var wire uint64
  2548  		for shift := uint(0); ; shift += 7 {
  2549  			if shift >= 64 {
  2550  				return ErrIntOverflowCanalProtocol
  2551  			}
  2552  			if iNdEx >= l {
  2553  				return io.ErrUnexpectedEOF
  2554  			}
  2555  			b := dAtA[iNdEx]
  2556  			iNdEx++
  2557  			wire |= uint64(b&0x7F) << shift
  2558  			if b < 0x80 {
  2559  				break
  2560  			}
  2561  		}
  2562  		fieldNum := int32(wire >> 3)
  2563  		wireType := int(wire & 0x7)
  2564  		if wireType == 4 {
  2565  			return fmt.Errorf("proto: HeartBeat: wiretype end group for non-group")
  2566  		}
  2567  		if fieldNum <= 0 {
  2568  			return fmt.Errorf("proto: HeartBeat: illegal tag %d (wire type %d)", fieldNum, wire)
  2569  		}
  2570  		switch fieldNum {
  2571  		case 1:
  2572  			if wireType != 0 {
  2573  				return fmt.Errorf("proto: wrong wireType = %d for field SendTimestamp", wireType)
  2574  			}
  2575  			m.SendTimestamp = 0
  2576  			for shift := uint(0); ; shift += 7 {
  2577  				if shift >= 64 {
  2578  					return ErrIntOverflowCanalProtocol
  2579  				}
  2580  				if iNdEx >= l {
  2581  					return io.ErrUnexpectedEOF
  2582  				}
  2583  				b := dAtA[iNdEx]
  2584  				iNdEx++
  2585  				m.SendTimestamp |= int64(b&0x7F) << shift
  2586  				if b < 0x80 {
  2587  					break
  2588  				}
  2589  			}
  2590  		case 2:
  2591  			if wireType != 0 {
  2592  				return fmt.Errorf("proto: wrong wireType = %d for field StartTimestamp", wireType)
  2593  			}
  2594  			m.StartTimestamp = 0
  2595  			for shift := uint(0); ; shift += 7 {
  2596  				if shift >= 64 {
  2597  					return ErrIntOverflowCanalProtocol
  2598  				}
  2599  				if iNdEx >= l {
  2600  					return io.ErrUnexpectedEOF
  2601  				}
  2602  				b := dAtA[iNdEx]
  2603  				iNdEx++
  2604  				m.StartTimestamp |= int64(b&0x7F) << shift
  2605  				if b < 0x80 {
  2606  					break
  2607  				}
  2608  			}
  2609  		default:
  2610  			iNdEx = preIndex
  2611  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  2612  			if err != nil {
  2613  				return err
  2614  			}
  2615  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2616  				return ErrInvalidLengthCanalProtocol
  2617  			}
  2618  			if (iNdEx + skippy) > l {
  2619  				return io.ErrUnexpectedEOF
  2620  			}
  2621  			iNdEx += skippy
  2622  		}
  2623  	}
  2624  
  2625  	if iNdEx > l {
  2626  		return io.ErrUnexpectedEOF
  2627  	}
  2628  	return nil
  2629  }
  2630  func (m *Handshake) Unmarshal(dAtA []byte) error {
  2631  	l := len(dAtA)
  2632  	iNdEx := 0
  2633  	for iNdEx < l {
  2634  		preIndex := iNdEx
  2635  		var wire uint64
  2636  		for shift := uint(0); ; shift += 7 {
  2637  			if shift >= 64 {
  2638  				return ErrIntOverflowCanalProtocol
  2639  			}
  2640  			if iNdEx >= l {
  2641  				return io.ErrUnexpectedEOF
  2642  			}
  2643  			b := dAtA[iNdEx]
  2644  			iNdEx++
  2645  			wire |= uint64(b&0x7F) << shift
  2646  			if b < 0x80 {
  2647  				break
  2648  			}
  2649  		}
  2650  		fieldNum := int32(wire >> 3)
  2651  		wireType := int(wire & 0x7)
  2652  		if wireType == 4 {
  2653  			return fmt.Errorf("proto: Handshake: wiretype end group for non-group")
  2654  		}
  2655  		if fieldNum <= 0 {
  2656  			return fmt.Errorf("proto: Handshake: illegal tag %d (wire type %d)", fieldNum, wire)
  2657  		}
  2658  		switch fieldNum {
  2659  		case 1:
  2660  			if wireType != 2 {
  2661  				return fmt.Errorf("proto: wrong wireType = %d for field CommunicationEncoding", wireType)
  2662  			}
  2663  			var stringLen uint64
  2664  			for shift := uint(0); ; shift += 7 {
  2665  				if shift >= 64 {
  2666  					return ErrIntOverflowCanalProtocol
  2667  				}
  2668  				if iNdEx >= l {
  2669  					return io.ErrUnexpectedEOF
  2670  				}
  2671  				b := dAtA[iNdEx]
  2672  				iNdEx++
  2673  				stringLen |= uint64(b&0x7F) << shift
  2674  				if b < 0x80 {
  2675  					break
  2676  				}
  2677  			}
  2678  			intStringLen := int(stringLen)
  2679  			if intStringLen < 0 {
  2680  				return ErrInvalidLengthCanalProtocol
  2681  			}
  2682  			postIndex := iNdEx + intStringLen
  2683  			if postIndex < 0 {
  2684  				return ErrInvalidLengthCanalProtocol
  2685  			}
  2686  			if postIndex > l {
  2687  				return io.ErrUnexpectedEOF
  2688  			}
  2689  			m.CommunicationEncodingPresent = &Handshake_CommunicationEncoding{string(dAtA[iNdEx:postIndex])}
  2690  			iNdEx = postIndex
  2691  		case 2:
  2692  			if wireType != 2 {
  2693  				return fmt.Errorf("proto: wrong wireType = %d for field Seeds", wireType)
  2694  			}
  2695  			var byteLen int
  2696  			for shift := uint(0); ; shift += 7 {
  2697  				if shift >= 64 {
  2698  					return ErrIntOverflowCanalProtocol
  2699  				}
  2700  				if iNdEx >= l {
  2701  					return io.ErrUnexpectedEOF
  2702  				}
  2703  				b := dAtA[iNdEx]
  2704  				iNdEx++
  2705  				byteLen |= int(b&0x7F) << shift
  2706  				if b < 0x80 {
  2707  					break
  2708  				}
  2709  			}
  2710  			if byteLen < 0 {
  2711  				return ErrInvalidLengthCanalProtocol
  2712  			}
  2713  			postIndex := iNdEx + byteLen
  2714  			if postIndex < 0 {
  2715  				return ErrInvalidLengthCanalProtocol
  2716  			}
  2717  			if postIndex > l {
  2718  				return io.ErrUnexpectedEOF
  2719  			}
  2720  			m.Seeds = append(m.Seeds[:0], dAtA[iNdEx:postIndex]...)
  2721  			if m.Seeds == nil {
  2722  				m.Seeds = []byte{}
  2723  			}
  2724  			iNdEx = postIndex
  2725  		case 3:
  2726  			if wireType != 0 {
  2727  				return fmt.Errorf("proto: wrong wireType = %d for field SupportedCompressions", wireType)
  2728  			}
  2729  			m.SupportedCompressions = 0
  2730  			for shift := uint(0); ; shift += 7 {
  2731  				if shift >= 64 {
  2732  					return ErrIntOverflowCanalProtocol
  2733  				}
  2734  				if iNdEx >= l {
  2735  					return io.ErrUnexpectedEOF
  2736  				}
  2737  				b := dAtA[iNdEx]
  2738  				iNdEx++
  2739  				m.SupportedCompressions |= Compression(b&0x7F) << shift
  2740  				if b < 0x80 {
  2741  					break
  2742  				}
  2743  			}
  2744  		default:
  2745  			iNdEx = preIndex
  2746  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  2747  			if err != nil {
  2748  				return err
  2749  			}
  2750  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2751  				return ErrInvalidLengthCanalProtocol
  2752  			}
  2753  			if (iNdEx + skippy) > l {
  2754  				return io.ErrUnexpectedEOF
  2755  			}
  2756  			iNdEx += skippy
  2757  		}
  2758  	}
  2759  
  2760  	if iNdEx > l {
  2761  		return io.ErrUnexpectedEOF
  2762  	}
  2763  	return nil
  2764  }
  2765  func (m *ClientAuth) Unmarshal(dAtA []byte) error {
  2766  	l := len(dAtA)
  2767  	iNdEx := 0
  2768  	for iNdEx < l {
  2769  		preIndex := iNdEx
  2770  		var wire uint64
  2771  		for shift := uint(0); ; shift += 7 {
  2772  			if shift >= 64 {
  2773  				return ErrIntOverflowCanalProtocol
  2774  			}
  2775  			if iNdEx >= l {
  2776  				return io.ErrUnexpectedEOF
  2777  			}
  2778  			b := dAtA[iNdEx]
  2779  			iNdEx++
  2780  			wire |= uint64(b&0x7F) << shift
  2781  			if b < 0x80 {
  2782  				break
  2783  			}
  2784  		}
  2785  		fieldNum := int32(wire >> 3)
  2786  		wireType := int(wire & 0x7)
  2787  		if wireType == 4 {
  2788  			return fmt.Errorf("proto: ClientAuth: wiretype end group for non-group")
  2789  		}
  2790  		if fieldNum <= 0 {
  2791  			return fmt.Errorf("proto: ClientAuth: illegal tag %d (wire type %d)", fieldNum, wire)
  2792  		}
  2793  		switch fieldNum {
  2794  		case 1:
  2795  			if wireType != 2 {
  2796  				return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
  2797  			}
  2798  			var stringLen uint64
  2799  			for shift := uint(0); ; shift += 7 {
  2800  				if shift >= 64 {
  2801  					return ErrIntOverflowCanalProtocol
  2802  				}
  2803  				if iNdEx >= l {
  2804  					return io.ErrUnexpectedEOF
  2805  				}
  2806  				b := dAtA[iNdEx]
  2807  				iNdEx++
  2808  				stringLen |= uint64(b&0x7F) << shift
  2809  				if b < 0x80 {
  2810  					break
  2811  				}
  2812  			}
  2813  			intStringLen := int(stringLen)
  2814  			if intStringLen < 0 {
  2815  				return ErrInvalidLengthCanalProtocol
  2816  			}
  2817  			postIndex := iNdEx + intStringLen
  2818  			if postIndex < 0 {
  2819  				return ErrInvalidLengthCanalProtocol
  2820  			}
  2821  			if postIndex > l {
  2822  				return io.ErrUnexpectedEOF
  2823  			}
  2824  			m.Username = string(dAtA[iNdEx:postIndex])
  2825  			iNdEx = postIndex
  2826  		case 2:
  2827  			if wireType != 2 {
  2828  				return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
  2829  			}
  2830  			var byteLen int
  2831  			for shift := uint(0); ; shift += 7 {
  2832  				if shift >= 64 {
  2833  					return ErrIntOverflowCanalProtocol
  2834  				}
  2835  				if iNdEx >= l {
  2836  					return io.ErrUnexpectedEOF
  2837  				}
  2838  				b := dAtA[iNdEx]
  2839  				iNdEx++
  2840  				byteLen |= int(b&0x7F) << shift
  2841  				if b < 0x80 {
  2842  					break
  2843  				}
  2844  			}
  2845  			if byteLen < 0 {
  2846  				return ErrInvalidLengthCanalProtocol
  2847  			}
  2848  			postIndex := iNdEx + byteLen
  2849  			if postIndex < 0 {
  2850  				return ErrInvalidLengthCanalProtocol
  2851  			}
  2852  			if postIndex > l {
  2853  				return io.ErrUnexpectedEOF
  2854  			}
  2855  			m.Password = append(m.Password[:0], dAtA[iNdEx:postIndex]...)
  2856  			if m.Password == nil {
  2857  				m.Password = []byte{}
  2858  			}
  2859  			iNdEx = postIndex
  2860  		case 3:
  2861  			if wireType != 0 {
  2862  				return fmt.Errorf("proto: wrong wireType = %d for field NetReadTimeout", wireType)
  2863  			}
  2864  			var v int32
  2865  			for shift := uint(0); ; shift += 7 {
  2866  				if shift >= 64 {
  2867  					return ErrIntOverflowCanalProtocol
  2868  				}
  2869  				if iNdEx >= l {
  2870  					return io.ErrUnexpectedEOF
  2871  				}
  2872  				b := dAtA[iNdEx]
  2873  				iNdEx++
  2874  				v |= int32(b&0x7F) << shift
  2875  				if b < 0x80 {
  2876  					break
  2877  				}
  2878  			}
  2879  			m.NetReadTimeoutPresent = &ClientAuth_NetReadTimeout{v}
  2880  		case 4:
  2881  			if wireType != 0 {
  2882  				return fmt.Errorf("proto: wrong wireType = %d for field NetWriteTimeout", wireType)
  2883  			}
  2884  			var v int32
  2885  			for shift := uint(0); ; shift += 7 {
  2886  				if shift >= 64 {
  2887  					return ErrIntOverflowCanalProtocol
  2888  				}
  2889  				if iNdEx >= l {
  2890  					return io.ErrUnexpectedEOF
  2891  				}
  2892  				b := dAtA[iNdEx]
  2893  				iNdEx++
  2894  				v |= int32(b&0x7F) << shift
  2895  				if b < 0x80 {
  2896  					break
  2897  				}
  2898  			}
  2899  			m.NetWriteTimeoutPresent = &ClientAuth_NetWriteTimeout{v}
  2900  		case 5:
  2901  			if wireType != 2 {
  2902  				return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
  2903  			}
  2904  			var stringLen uint64
  2905  			for shift := uint(0); ; shift += 7 {
  2906  				if shift >= 64 {
  2907  					return ErrIntOverflowCanalProtocol
  2908  				}
  2909  				if iNdEx >= l {
  2910  					return io.ErrUnexpectedEOF
  2911  				}
  2912  				b := dAtA[iNdEx]
  2913  				iNdEx++
  2914  				stringLen |= uint64(b&0x7F) << shift
  2915  				if b < 0x80 {
  2916  					break
  2917  				}
  2918  			}
  2919  			intStringLen := int(stringLen)
  2920  			if intStringLen < 0 {
  2921  				return ErrInvalidLengthCanalProtocol
  2922  			}
  2923  			postIndex := iNdEx + intStringLen
  2924  			if postIndex < 0 {
  2925  				return ErrInvalidLengthCanalProtocol
  2926  			}
  2927  			if postIndex > l {
  2928  				return io.ErrUnexpectedEOF
  2929  			}
  2930  			m.Destination = string(dAtA[iNdEx:postIndex])
  2931  			iNdEx = postIndex
  2932  		case 6:
  2933  			if wireType != 2 {
  2934  				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
  2935  			}
  2936  			var stringLen uint64
  2937  			for shift := uint(0); ; shift += 7 {
  2938  				if shift >= 64 {
  2939  					return ErrIntOverflowCanalProtocol
  2940  				}
  2941  				if iNdEx >= l {
  2942  					return io.ErrUnexpectedEOF
  2943  				}
  2944  				b := dAtA[iNdEx]
  2945  				iNdEx++
  2946  				stringLen |= uint64(b&0x7F) << shift
  2947  				if b < 0x80 {
  2948  					break
  2949  				}
  2950  			}
  2951  			intStringLen := int(stringLen)
  2952  			if intStringLen < 0 {
  2953  				return ErrInvalidLengthCanalProtocol
  2954  			}
  2955  			postIndex := iNdEx + intStringLen
  2956  			if postIndex < 0 {
  2957  				return ErrInvalidLengthCanalProtocol
  2958  			}
  2959  			if postIndex > l {
  2960  				return io.ErrUnexpectedEOF
  2961  			}
  2962  			m.ClientId = string(dAtA[iNdEx:postIndex])
  2963  			iNdEx = postIndex
  2964  		case 7:
  2965  			if wireType != 2 {
  2966  				return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
  2967  			}
  2968  			var stringLen uint64
  2969  			for shift := uint(0); ; shift += 7 {
  2970  				if shift >= 64 {
  2971  					return ErrIntOverflowCanalProtocol
  2972  				}
  2973  				if iNdEx >= l {
  2974  					return io.ErrUnexpectedEOF
  2975  				}
  2976  				b := dAtA[iNdEx]
  2977  				iNdEx++
  2978  				stringLen |= uint64(b&0x7F) << shift
  2979  				if b < 0x80 {
  2980  					break
  2981  				}
  2982  			}
  2983  			intStringLen := int(stringLen)
  2984  			if intStringLen < 0 {
  2985  				return ErrInvalidLengthCanalProtocol
  2986  			}
  2987  			postIndex := iNdEx + intStringLen
  2988  			if postIndex < 0 {
  2989  				return ErrInvalidLengthCanalProtocol
  2990  			}
  2991  			if postIndex > l {
  2992  				return io.ErrUnexpectedEOF
  2993  			}
  2994  			m.Filter = string(dAtA[iNdEx:postIndex])
  2995  			iNdEx = postIndex
  2996  		case 8:
  2997  			if wireType != 0 {
  2998  				return fmt.Errorf("proto: wrong wireType = %d for field StartTimestamp", wireType)
  2999  			}
  3000  			m.StartTimestamp = 0
  3001  			for shift := uint(0); ; shift += 7 {
  3002  				if shift >= 64 {
  3003  					return ErrIntOverflowCanalProtocol
  3004  				}
  3005  				if iNdEx >= l {
  3006  					return io.ErrUnexpectedEOF
  3007  				}
  3008  				b := dAtA[iNdEx]
  3009  				iNdEx++
  3010  				m.StartTimestamp |= int64(b&0x7F) << shift
  3011  				if b < 0x80 {
  3012  					break
  3013  				}
  3014  			}
  3015  		default:
  3016  			iNdEx = preIndex
  3017  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3018  			if err != nil {
  3019  				return err
  3020  			}
  3021  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3022  				return ErrInvalidLengthCanalProtocol
  3023  			}
  3024  			if (iNdEx + skippy) > l {
  3025  				return io.ErrUnexpectedEOF
  3026  			}
  3027  			iNdEx += skippy
  3028  		}
  3029  	}
  3030  
  3031  	if iNdEx > l {
  3032  		return io.ErrUnexpectedEOF
  3033  	}
  3034  	return nil
  3035  }
  3036  func (m *Ack) Unmarshal(dAtA []byte) error {
  3037  	l := len(dAtA)
  3038  	iNdEx := 0
  3039  	for iNdEx < l {
  3040  		preIndex := iNdEx
  3041  		var wire uint64
  3042  		for shift := uint(0); ; shift += 7 {
  3043  			if shift >= 64 {
  3044  				return ErrIntOverflowCanalProtocol
  3045  			}
  3046  			if iNdEx >= l {
  3047  				return io.ErrUnexpectedEOF
  3048  			}
  3049  			b := dAtA[iNdEx]
  3050  			iNdEx++
  3051  			wire |= uint64(b&0x7F) << shift
  3052  			if b < 0x80 {
  3053  				break
  3054  			}
  3055  		}
  3056  		fieldNum := int32(wire >> 3)
  3057  		wireType := int(wire & 0x7)
  3058  		if wireType == 4 {
  3059  			return fmt.Errorf("proto: Ack: wiretype end group for non-group")
  3060  		}
  3061  		if fieldNum <= 0 {
  3062  			return fmt.Errorf("proto: Ack: illegal tag %d (wire type %d)", fieldNum, wire)
  3063  		}
  3064  		switch fieldNum {
  3065  		case 1:
  3066  			if wireType != 0 {
  3067  				return fmt.Errorf("proto: wrong wireType = %d for field ErrorCode", wireType)
  3068  			}
  3069  			var v int32
  3070  			for shift := uint(0); ; shift += 7 {
  3071  				if shift >= 64 {
  3072  					return ErrIntOverflowCanalProtocol
  3073  				}
  3074  				if iNdEx >= l {
  3075  					return io.ErrUnexpectedEOF
  3076  				}
  3077  				b := dAtA[iNdEx]
  3078  				iNdEx++
  3079  				v |= int32(b&0x7F) << shift
  3080  				if b < 0x80 {
  3081  					break
  3082  				}
  3083  			}
  3084  			m.ErrorCodePresent = &Ack_ErrorCode{v}
  3085  		case 2:
  3086  			if wireType != 2 {
  3087  				return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType)
  3088  			}
  3089  			var stringLen uint64
  3090  			for shift := uint(0); ; shift += 7 {
  3091  				if shift >= 64 {
  3092  					return ErrIntOverflowCanalProtocol
  3093  				}
  3094  				if iNdEx >= l {
  3095  					return io.ErrUnexpectedEOF
  3096  				}
  3097  				b := dAtA[iNdEx]
  3098  				iNdEx++
  3099  				stringLen |= uint64(b&0x7F) << shift
  3100  				if b < 0x80 {
  3101  					break
  3102  				}
  3103  			}
  3104  			intStringLen := int(stringLen)
  3105  			if intStringLen < 0 {
  3106  				return ErrInvalidLengthCanalProtocol
  3107  			}
  3108  			postIndex := iNdEx + intStringLen
  3109  			if postIndex < 0 {
  3110  				return ErrInvalidLengthCanalProtocol
  3111  			}
  3112  			if postIndex > l {
  3113  				return io.ErrUnexpectedEOF
  3114  			}
  3115  			m.ErrorMessage = string(dAtA[iNdEx:postIndex])
  3116  			iNdEx = postIndex
  3117  		default:
  3118  			iNdEx = preIndex
  3119  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3120  			if err != nil {
  3121  				return err
  3122  			}
  3123  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3124  				return ErrInvalidLengthCanalProtocol
  3125  			}
  3126  			if (iNdEx + skippy) > l {
  3127  				return io.ErrUnexpectedEOF
  3128  			}
  3129  			iNdEx += skippy
  3130  		}
  3131  	}
  3132  
  3133  	if iNdEx > l {
  3134  		return io.ErrUnexpectedEOF
  3135  	}
  3136  	return nil
  3137  }
  3138  func (m *ClientAck) Unmarshal(dAtA []byte) error {
  3139  	l := len(dAtA)
  3140  	iNdEx := 0
  3141  	for iNdEx < l {
  3142  		preIndex := iNdEx
  3143  		var wire uint64
  3144  		for shift := uint(0); ; shift += 7 {
  3145  			if shift >= 64 {
  3146  				return ErrIntOverflowCanalProtocol
  3147  			}
  3148  			if iNdEx >= l {
  3149  				return io.ErrUnexpectedEOF
  3150  			}
  3151  			b := dAtA[iNdEx]
  3152  			iNdEx++
  3153  			wire |= uint64(b&0x7F) << shift
  3154  			if b < 0x80 {
  3155  				break
  3156  			}
  3157  		}
  3158  		fieldNum := int32(wire >> 3)
  3159  		wireType := int(wire & 0x7)
  3160  		if wireType == 4 {
  3161  			return fmt.Errorf("proto: ClientAck: wiretype end group for non-group")
  3162  		}
  3163  		if fieldNum <= 0 {
  3164  			return fmt.Errorf("proto: ClientAck: illegal tag %d (wire type %d)", fieldNum, wire)
  3165  		}
  3166  		switch fieldNum {
  3167  		case 1:
  3168  			if wireType != 2 {
  3169  				return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
  3170  			}
  3171  			var stringLen uint64
  3172  			for shift := uint(0); ; shift += 7 {
  3173  				if shift >= 64 {
  3174  					return ErrIntOverflowCanalProtocol
  3175  				}
  3176  				if iNdEx >= l {
  3177  					return io.ErrUnexpectedEOF
  3178  				}
  3179  				b := dAtA[iNdEx]
  3180  				iNdEx++
  3181  				stringLen |= uint64(b&0x7F) << shift
  3182  				if b < 0x80 {
  3183  					break
  3184  				}
  3185  			}
  3186  			intStringLen := int(stringLen)
  3187  			if intStringLen < 0 {
  3188  				return ErrInvalidLengthCanalProtocol
  3189  			}
  3190  			postIndex := iNdEx + intStringLen
  3191  			if postIndex < 0 {
  3192  				return ErrInvalidLengthCanalProtocol
  3193  			}
  3194  			if postIndex > l {
  3195  				return io.ErrUnexpectedEOF
  3196  			}
  3197  			m.Destination = string(dAtA[iNdEx:postIndex])
  3198  			iNdEx = postIndex
  3199  		case 2:
  3200  			if wireType != 2 {
  3201  				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
  3202  			}
  3203  			var stringLen uint64
  3204  			for shift := uint(0); ; shift += 7 {
  3205  				if shift >= 64 {
  3206  					return ErrIntOverflowCanalProtocol
  3207  				}
  3208  				if iNdEx >= l {
  3209  					return io.ErrUnexpectedEOF
  3210  				}
  3211  				b := dAtA[iNdEx]
  3212  				iNdEx++
  3213  				stringLen |= uint64(b&0x7F) << shift
  3214  				if b < 0x80 {
  3215  					break
  3216  				}
  3217  			}
  3218  			intStringLen := int(stringLen)
  3219  			if intStringLen < 0 {
  3220  				return ErrInvalidLengthCanalProtocol
  3221  			}
  3222  			postIndex := iNdEx + intStringLen
  3223  			if postIndex < 0 {
  3224  				return ErrInvalidLengthCanalProtocol
  3225  			}
  3226  			if postIndex > l {
  3227  				return io.ErrUnexpectedEOF
  3228  			}
  3229  			m.ClientId = string(dAtA[iNdEx:postIndex])
  3230  			iNdEx = postIndex
  3231  		case 3:
  3232  			if wireType != 0 {
  3233  				return fmt.Errorf("proto: wrong wireType = %d for field BatchId", wireType)
  3234  			}
  3235  			m.BatchId = 0
  3236  			for shift := uint(0); ; shift += 7 {
  3237  				if shift >= 64 {
  3238  					return ErrIntOverflowCanalProtocol
  3239  				}
  3240  				if iNdEx >= l {
  3241  					return io.ErrUnexpectedEOF
  3242  				}
  3243  				b := dAtA[iNdEx]
  3244  				iNdEx++
  3245  				m.BatchId |= int64(b&0x7F) << shift
  3246  				if b < 0x80 {
  3247  					break
  3248  				}
  3249  			}
  3250  		default:
  3251  			iNdEx = preIndex
  3252  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3253  			if err != nil {
  3254  				return err
  3255  			}
  3256  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3257  				return ErrInvalidLengthCanalProtocol
  3258  			}
  3259  			if (iNdEx + skippy) > l {
  3260  				return io.ErrUnexpectedEOF
  3261  			}
  3262  			iNdEx += skippy
  3263  		}
  3264  	}
  3265  
  3266  	if iNdEx > l {
  3267  		return io.ErrUnexpectedEOF
  3268  	}
  3269  	return nil
  3270  }
  3271  func (m *Sub) Unmarshal(dAtA []byte) error {
  3272  	l := len(dAtA)
  3273  	iNdEx := 0
  3274  	for iNdEx < l {
  3275  		preIndex := iNdEx
  3276  		var wire uint64
  3277  		for shift := uint(0); ; shift += 7 {
  3278  			if shift >= 64 {
  3279  				return ErrIntOverflowCanalProtocol
  3280  			}
  3281  			if iNdEx >= l {
  3282  				return io.ErrUnexpectedEOF
  3283  			}
  3284  			b := dAtA[iNdEx]
  3285  			iNdEx++
  3286  			wire |= uint64(b&0x7F) << shift
  3287  			if b < 0x80 {
  3288  				break
  3289  			}
  3290  		}
  3291  		fieldNum := int32(wire >> 3)
  3292  		wireType := int(wire & 0x7)
  3293  		if wireType == 4 {
  3294  			return fmt.Errorf("proto: Sub: wiretype end group for non-group")
  3295  		}
  3296  		if fieldNum <= 0 {
  3297  			return fmt.Errorf("proto: Sub: illegal tag %d (wire type %d)", fieldNum, wire)
  3298  		}
  3299  		switch fieldNum {
  3300  		case 1:
  3301  			if wireType != 2 {
  3302  				return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
  3303  			}
  3304  			var stringLen uint64
  3305  			for shift := uint(0); ; shift += 7 {
  3306  				if shift >= 64 {
  3307  					return ErrIntOverflowCanalProtocol
  3308  				}
  3309  				if iNdEx >= l {
  3310  					return io.ErrUnexpectedEOF
  3311  				}
  3312  				b := dAtA[iNdEx]
  3313  				iNdEx++
  3314  				stringLen |= uint64(b&0x7F) << shift
  3315  				if b < 0x80 {
  3316  					break
  3317  				}
  3318  			}
  3319  			intStringLen := int(stringLen)
  3320  			if intStringLen < 0 {
  3321  				return ErrInvalidLengthCanalProtocol
  3322  			}
  3323  			postIndex := iNdEx + intStringLen
  3324  			if postIndex < 0 {
  3325  				return ErrInvalidLengthCanalProtocol
  3326  			}
  3327  			if postIndex > l {
  3328  				return io.ErrUnexpectedEOF
  3329  			}
  3330  			m.Destination = string(dAtA[iNdEx:postIndex])
  3331  			iNdEx = postIndex
  3332  		case 2:
  3333  			if wireType != 2 {
  3334  				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
  3335  			}
  3336  			var stringLen uint64
  3337  			for shift := uint(0); ; shift += 7 {
  3338  				if shift >= 64 {
  3339  					return ErrIntOverflowCanalProtocol
  3340  				}
  3341  				if iNdEx >= l {
  3342  					return io.ErrUnexpectedEOF
  3343  				}
  3344  				b := dAtA[iNdEx]
  3345  				iNdEx++
  3346  				stringLen |= uint64(b&0x7F) << shift
  3347  				if b < 0x80 {
  3348  					break
  3349  				}
  3350  			}
  3351  			intStringLen := int(stringLen)
  3352  			if intStringLen < 0 {
  3353  				return ErrInvalidLengthCanalProtocol
  3354  			}
  3355  			postIndex := iNdEx + intStringLen
  3356  			if postIndex < 0 {
  3357  				return ErrInvalidLengthCanalProtocol
  3358  			}
  3359  			if postIndex > l {
  3360  				return io.ErrUnexpectedEOF
  3361  			}
  3362  			m.ClientId = string(dAtA[iNdEx:postIndex])
  3363  			iNdEx = postIndex
  3364  		case 7:
  3365  			if wireType != 2 {
  3366  				return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
  3367  			}
  3368  			var stringLen uint64
  3369  			for shift := uint(0); ; shift += 7 {
  3370  				if shift >= 64 {
  3371  					return ErrIntOverflowCanalProtocol
  3372  				}
  3373  				if iNdEx >= l {
  3374  					return io.ErrUnexpectedEOF
  3375  				}
  3376  				b := dAtA[iNdEx]
  3377  				iNdEx++
  3378  				stringLen |= uint64(b&0x7F) << shift
  3379  				if b < 0x80 {
  3380  					break
  3381  				}
  3382  			}
  3383  			intStringLen := int(stringLen)
  3384  			if intStringLen < 0 {
  3385  				return ErrInvalidLengthCanalProtocol
  3386  			}
  3387  			postIndex := iNdEx + intStringLen
  3388  			if postIndex < 0 {
  3389  				return ErrInvalidLengthCanalProtocol
  3390  			}
  3391  			if postIndex > l {
  3392  				return io.ErrUnexpectedEOF
  3393  			}
  3394  			m.Filter = string(dAtA[iNdEx:postIndex])
  3395  			iNdEx = postIndex
  3396  		default:
  3397  			iNdEx = preIndex
  3398  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3399  			if err != nil {
  3400  				return err
  3401  			}
  3402  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3403  				return ErrInvalidLengthCanalProtocol
  3404  			}
  3405  			if (iNdEx + skippy) > l {
  3406  				return io.ErrUnexpectedEOF
  3407  			}
  3408  			iNdEx += skippy
  3409  		}
  3410  	}
  3411  
  3412  	if iNdEx > l {
  3413  		return io.ErrUnexpectedEOF
  3414  	}
  3415  	return nil
  3416  }
  3417  func (m *Unsub) Unmarshal(dAtA []byte) error {
  3418  	l := len(dAtA)
  3419  	iNdEx := 0
  3420  	for iNdEx < l {
  3421  		preIndex := iNdEx
  3422  		var wire uint64
  3423  		for shift := uint(0); ; shift += 7 {
  3424  			if shift >= 64 {
  3425  				return ErrIntOverflowCanalProtocol
  3426  			}
  3427  			if iNdEx >= l {
  3428  				return io.ErrUnexpectedEOF
  3429  			}
  3430  			b := dAtA[iNdEx]
  3431  			iNdEx++
  3432  			wire |= uint64(b&0x7F) << shift
  3433  			if b < 0x80 {
  3434  				break
  3435  			}
  3436  		}
  3437  		fieldNum := int32(wire >> 3)
  3438  		wireType := int(wire & 0x7)
  3439  		if wireType == 4 {
  3440  			return fmt.Errorf("proto: Unsub: wiretype end group for non-group")
  3441  		}
  3442  		if fieldNum <= 0 {
  3443  			return fmt.Errorf("proto: Unsub: illegal tag %d (wire type %d)", fieldNum, wire)
  3444  		}
  3445  		switch fieldNum {
  3446  		case 1:
  3447  			if wireType != 2 {
  3448  				return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
  3449  			}
  3450  			var stringLen uint64
  3451  			for shift := uint(0); ; shift += 7 {
  3452  				if shift >= 64 {
  3453  					return ErrIntOverflowCanalProtocol
  3454  				}
  3455  				if iNdEx >= l {
  3456  					return io.ErrUnexpectedEOF
  3457  				}
  3458  				b := dAtA[iNdEx]
  3459  				iNdEx++
  3460  				stringLen |= uint64(b&0x7F) << shift
  3461  				if b < 0x80 {
  3462  					break
  3463  				}
  3464  			}
  3465  			intStringLen := int(stringLen)
  3466  			if intStringLen < 0 {
  3467  				return ErrInvalidLengthCanalProtocol
  3468  			}
  3469  			postIndex := iNdEx + intStringLen
  3470  			if postIndex < 0 {
  3471  				return ErrInvalidLengthCanalProtocol
  3472  			}
  3473  			if postIndex > l {
  3474  				return io.ErrUnexpectedEOF
  3475  			}
  3476  			m.Destination = string(dAtA[iNdEx:postIndex])
  3477  			iNdEx = postIndex
  3478  		case 2:
  3479  			if wireType != 2 {
  3480  				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
  3481  			}
  3482  			var stringLen uint64
  3483  			for shift := uint(0); ; shift += 7 {
  3484  				if shift >= 64 {
  3485  					return ErrIntOverflowCanalProtocol
  3486  				}
  3487  				if iNdEx >= l {
  3488  					return io.ErrUnexpectedEOF
  3489  				}
  3490  				b := dAtA[iNdEx]
  3491  				iNdEx++
  3492  				stringLen |= uint64(b&0x7F) << shift
  3493  				if b < 0x80 {
  3494  					break
  3495  				}
  3496  			}
  3497  			intStringLen := int(stringLen)
  3498  			if intStringLen < 0 {
  3499  				return ErrInvalidLengthCanalProtocol
  3500  			}
  3501  			postIndex := iNdEx + intStringLen
  3502  			if postIndex < 0 {
  3503  				return ErrInvalidLengthCanalProtocol
  3504  			}
  3505  			if postIndex > l {
  3506  				return io.ErrUnexpectedEOF
  3507  			}
  3508  			m.ClientId = string(dAtA[iNdEx:postIndex])
  3509  			iNdEx = postIndex
  3510  		case 7:
  3511  			if wireType != 2 {
  3512  				return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
  3513  			}
  3514  			var stringLen uint64
  3515  			for shift := uint(0); ; shift += 7 {
  3516  				if shift >= 64 {
  3517  					return ErrIntOverflowCanalProtocol
  3518  				}
  3519  				if iNdEx >= l {
  3520  					return io.ErrUnexpectedEOF
  3521  				}
  3522  				b := dAtA[iNdEx]
  3523  				iNdEx++
  3524  				stringLen |= uint64(b&0x7F) << shift
  3525  				if b < 0x80 {
  3526  					break
  3527  				}
  3528  			}
  3529  			intStringLen := int(stringLen)
  3530  			if intStringLen < 0 {
  3531  				return ErrInvalidLengthCanalProtocol
  3532  			}
  3533  			postIndex := iNdEx + intStringLen
  3534  			if postIndex < 0 {
  3535  				return ErrInvalidLengthCanalProtocol
  3536  			}
  3537  			if postIndex > l {
  3538  				return io.ErrUnexpectedEOF
  3539  			}
  3540  			m.Filter = string(dAtA[iNdEx:postIndex])
  3541  			iNdEx = postIndex
  3542  		default:
  3543  			iNdEx = preIndex
  3544  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3545  			if err != nil {
  3546  				return err
  3547  			}
  3548  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3549  				return ErrInvalidLengthCanalProtocol
  3550  			}
  3551  			if (iNdEx + skippy) > l {
  3552  				return io.ErrUnexpectedEOF
  3553  			}
  3554  			iNdEx += skippy
  3555  		}
  3556  	}
  3557  
  3558  	if iNdEx > l {
  3559  		return io.ErrUnexpectedEOF
  3560  	}
  3561  	return nil
  3562  }
  3563  func (m *Get) Unmarshal(dAtA []byte) error {
  3564  	l := len(dAtA)
  3565  	iNdEx := 0
  3566  	for iNdEx < l {
  3567  		preIndex := iNdEx
  3568  		var wire uint64
  3569  		for shift := uint(0); ; shift += 7 {
  3570  			if shift >= 64 {
  3571  				return ErrIntOverflowCanalProtocol
  3572  			}
  3573  			if iNdEx >= l {
  3574  				return io.ErrUnexpectedEOF
  3575  			}
  3576  			b := dAtA[iNdEx]
  3577  			iNdEx++
  3578  			wire |= uint64(b&0x7F) << shift
  3579  			if b < 0x80 {
  3580  				break
  3581  			}
  3582  		}
  3583  		fieldNum := int32(wire >> 3)
  3584  		wireType := int(wire & 0x7)
  3585  		if wireType == 4 {
  3586  			return fmt.Errorf("proto: Get: wiretype end group for non-group")
  3587  		}
  3588  		if fieldNum <= 0 {
  3589  			return fmt.Errorf("proto: Get: illegal tag %d (wire type %d)", fieldNum, wire)
  3590  		}
  3591  		switch fieldNum {
  3592  		case 1:
  3593  			if wireType != 2 {
  3594  				return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
  3595  			}
  3596  			var stringLen uint64
  3597  			for shift := uint(0); ; shift += 7 {
  3598  				if shift >= 64 {
  3599  					return ErrIntOverflowCanalProtocol
  3600  				}
  3601  				if iNdEx >= l {
  3602  					return io.ErrUnexpectedEOF
  3603  				}
  3604  				b := dAtA[iNdEx]
  3605  				iNdEx++
  3606  				stringLen |= uint64(b&0x7F) << shift
  3607  				if b < 0x80 {
  3608  					break
  3609  				}
  3610  			}
  3611  			intStringLen := int(stringLen)
  3612  			if intStringLen < 0 {
  3613  				return ErrInvalidLengthCanalProtocol
  3614  			}
  3615  			postIndex := iNdEx + intStringLen
  3616  			if postIndex < 0 {
  3617  				return ErrInvalidLengthCanalProtocol
  3618  			}
  3619  			if postIndex > l {
  3620  				return io.ErrUnexpectedEOF
  3621  			}
  3622  			m.Destination = string(dAtA[iNdEx:postIndex])
  3623  			iNdEx = postIndex
  3624  		case 2:
  3625  			if wireType != 2 {
  3626  				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
  3627  			}
  3628  			var stringLen uint64
  3629  			for shift := uint(0); ; shift += 7 {
  3630  				if shift >= 64 {
  3631  					return ErrIntOverflowCanalProtocol
  3632  				}
  3633  				if iNdEx >= l {
  3634  					return io.ErrUnexpectedEOF
  3635  				}
  3636  				b := dAtA[iNdEx]
  3637  				iNdEx++
  3638  				stringLen |= uint64(b&0x7F) << shift
  3639  				if b < 0x80 {
  3640  					break
  3641  				}
  3642  			}
  3643  			intStringLen := int(stringLen)
  3644  			if intStringLen < 0 {
  3645  				return ErrInvalidLengthCanalProtocol
  3646  			}
  3647  			postIndex := iNdEx + intStringLen
  3648  			if postIndex < 0 {
  3649  				return ErrInvalidLengthCanalProtocol
  3650  			}
  3651  			if postIndex > l {
  3652  				return io.ErrUnexpectedEOF
  3653  			}
  3654  			m.ClientId = string(dAtA[iNdEx:postIndex])
  3655  			iNdEx = postIndex
  3656  		case 3:
  3657  			if wireType != 0 {
  3658  				return fmt.Errorf("proto: wrong wireType = %d for field FetchSize", wireType)
  3659  			}
  3660  			m.FetchSize = 0
  3661  			for shift := uint(0); ; shift += 7 {
  3662  				if shift >= 64 {
  3663  					return ErrIntOverflowCanalProtocol
  3664  				}
  3665  				if iNdEx >= l {
  3666  					return io.ErrUnexpectedEOF
  3667  				}
  3668  				b := dAtA[iNdEx]
  3669  				iNdEx++
  3670  				m.FetchSize |= int32(b&0x7F) << shift
  3671  				if b < 0x80 {
  3672  					break
  3673  				}
  3674  			}
  3675  		case 4:
  3676  			if wireType != 0 {
  3677  				return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
  3678  			}
  3679  			var v int64
  3680  			for shift := uint(0); ; shift += 7 {
  3681  				if shift >= 64 {
  3682  					return ErrIntOverflowCanalProtocol
  3683  				}
  3684  				if iNdEx >= l {
  3685  					return io.ErrUnexpectedEOF
  3686  				}
  3687  				b := dAtA[iNdEx]
  3688  				iNdEx++
  3689  				v |= int64(b&0x7F) << shift
  3690  				if b < 0x80 {
  3691  					break
  3692  				}
  3693  			}
  3694  			m.TimeoutPresent = &Get_Timeout{v}
  3695  		case 5:
  3696  			if wireType != 0 {
  3697  				return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType)
  3698  			}
  3699  			var v int32
  3700  			for shift := uint(0); ; shift += 7 {
  3701  				if shift >= 64 {
  3702  					return ErrIntOverflowCanalProtocol
  3703  				}
  3704  				if iNdEx >= l {
  3705  					return io.ErrUnexpectedEOF
  3706  				}
  3707  				b := dAtA[iNdEx]
  3708  				iNdEx++
  3709  				v |= int32(b&0x7F) << shift
  3710  				if b < 0x80 {
  3711  					break
  3712  				}
  3713  			}
  3714  			m.UnitPresent = &Get_Unit{v}
  3715  		case 6:
  3716  			if wireType != 0 {
  3717  				return fmt.Errorf("proto: wrong wireType = %d for field AutoAck", wireType)
  3718  			}
  3719  			var v int
  3720  			for shift := uint(0); ; shift += 7 {
  3721  				if shift >= 64 {
  3722  					return ErrIntOverflowCanalProtocol
  3723  				}
  3724  				if iNdEx >= l {
  3725  					return io.ErrUnexpectedEOF
  3726  				}
  3727  				b := dAtA[iNdEx]
  3728  				iNdEx++
  3729  				v |= int(b&0x7F) << shift
  3730  				if b < 0x80 {
  3731  					break
  3732  				}
  3733  			}
  3734  			b := bool(v != 0)
  3735  			m.AutoAckPresent = &Get_AutoAck{b}
  3736  		default:
  3737  			iNdEx = preIndex
  3738  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3739  			if err != nil {
  3740  				return err
  3741  			}
  3742  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3743  				return ErrInvalidLengthCanalProtocol
  3744  			}
  3745  			if (iNdEx + skippy) > l {
  3746  				return io.ErrUnexpectedEOF
  3747  			}
  3748  			iNdEx += skippy
  3749  		}
  3750  	}
  3751  
  3752  	if iNdEx > l {
  3753  		return io.ErrUnexpectedEOF
  3754  	}
  3755  	return nil
  3756  }
  3757  func (m *Messages) Unmarshal(dAtA []byte) error {
  3758  	l := len(dAtA)
  3759  	iNdEx := 0
  3760  	for iNdEx < l {
  3761  		preIndex := iNdEx
  3762  		var wire uint64
  3763  		for shift := uint(0); ; shift += 7 {
  3764  			if shift >= 64 {
  3765  				return ErrIntOverflowCanalProtocol
  3766  			}
  3767  			if iNdEx >= l {
  3768  				return io.ErrUnexpectedEOF
  3769  			}
  3770  			b := dAtA[iNdEx]
  3771  			iNdEx++
  3772  			wire |= uint64(b&0x7F) << shift
  3773  			if b < 0x80 {
  3774  				break
  3775  			}
  3776  		}
  3777  		fieldNum := int32(wire >> 3)
  3778  		wireType := int(wire & 0x7)
  3779  		if wireType == 4 {
  3780  			return fmt.Errorf("proto: Messages: wiretype end group for non-group")
  3781  		}
  3782  		if fieldNum <= 0 {
  3783  			return fmt.Errorf("proto: Messages: illegal tag %d (wire type %d)", fieldNum, wire)
  3784  		}
  3785  		switch fieldNum {
  3786  		case 1:
  3787  			if wireType != 0 {
  3788  				return fmt.Errorf("proto: wrong wireType = %d for field BatchId", wireType)
  3789  			}
  3790  			m.BatchId = 0
  3791  			for shift := uint(0); ; shift += 7 {
  3792  				if shift >= 64 {
  3793  					return ErrIntOverflowCanalProtocol
  3794  				}
  3795  				if iNdEx >= l {
  3796  					return io.ErrUnexpectedEOF
  3797  				}
  3798  				b := dAtA[iNdEx]
  3799  				iNdEx++
  3800  				m.BatchId |= int64(b&0x7F) << shift
  3801  				if b < 0x80 {
  3802  					break
  3803  				}
  3804  			}
  3805  		case 2:
  3806  			if wireType != 2 {
  3807  				return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType)
  3808  			}
  3809  			var byteLen int
  3810  			for shift := uint(0); ; shift += 7 {
  3811  				if shift >= 64 {
  3812  					return ErrIntOverflowCanalProtocol
  3813  				}
  3814  				if iNdEx >= l {
  3815  					return io.ErrUnexpectedEOF
  3816  				}
  3817  				b := dAtA[iNdEx]
  3818  				iNdEx++
  3819  				byteLen |= int(b&0x7F) << shift
  3820  				if b < 0x80 {
  3821  					break
  3822  				}
  3823  			}
  3824  			if byteLen < 0 {
  3825  				return ErrInvalidLengthCanalProtocol
  3826  			}
  3827  			postIndex := iNdEx + byteLen
  3828  			if postIndex < 0 {
  3829  				return ErrInvalidLengthCanalProtocol
  3830  			}
  3831  			if postIndex > l {
  3832  				return io.ErrUnexpectedEOF
  3833  			}
  3834  			m.Messages = append(m.Messages, make([]byte, postIndex-iNdEx))
  3835  			copy(m.Messages[len(m.Messages)-1], dAtA[iNdEx:postIndex])
  3836  			iNdEx = postIndex
  3837  		default:
  3838  			iNdEx = preIndex
  3839  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3840  			if err != nil {
  3841  				return err
  3842  			}
  3843  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3844  				return ErrInvalidLengthCanalProtocol
  3845  			}
  3846  			if (iNdEx + skippy) > l {
  3847  				return io.ErrUnexpectedEOF
  3848  			}
  3849  			iNdEx += skippy
  3850  		}
  3851  	}
  3852  
  3853  	if iNdEx > l {
  3854  		return io.ErrUnexpectedEOF
  3855  	}
  3856  	return nil
  3857  }
  3858  func (m *Dump) Unmarshal(dAtA []byte) error {
  3859  	l := len(dAtA)
  3860  	iNdEx := 0
  3861  	for iNdEx < l {
  3862  		preIndex := iNdEx
  3863  		var wire uint64
  3864  		for shift := uint(0); ; shift += 7 {
  3865  			if shift >= 64 {
  3866  				return ErrIntOverflowCanalProtocol
  3867  			}
  3868  			if iNdEx >= l {
  3869  				return io.ErrUnexpectedEOF
  3870  			}
  3871  			b := dAtA[iNdEx]
  3872  			iNdEx++
  3873  			wire |= uint64(b&0x7F) << shift
  3874  			if b < 0x80 {
  3875  				break
  3876  			}
  3877  		}
  3878  		fieldNum := int32(wire >> 3)
  3879  		wireType := int(wire & 0x7)
  3880  		if wireType == 4 {
  3881  			return fmt.Errorf("proto: Dump: wiretype end group for non-group")
  3882  		}
  3883  		if fieldNum <= 0 {
  3884  			return fmt.Errorf("proto: Dump: illegal tag %d (wire type %d)", fieldNum, wire)
  3885  		}
  3886  		switch fieldNum {
  3887  		case 1:
  3888  			if wireType != 2 {
  3889  				return fmt.Errorf("proto: wrong wireType = %d for field Journal", wireType)
  3890  			}
  3891  			var stringLen uint64
  3892  			for shift := uint(0); ; shift += 7 {
  3893  				if shift >= 64 {
  3894  					return ErrIntOverflowCanalProtocol
  3895  				}
  3896  				if iNdEx >= l {
  3897  					return io.ErrUnexpectedEOF
  3898  				}
  3899  				b := dAtA[iNdEx]
  3900  				iNdEx++
  3901  				stringLen |= uint64(b&0x7F) << shift
  3902  				if b < 0x80 {
  3903  					break
  3904  				}
  3905  			}
  3906  			intStringLen := int(stringLen)
  3907  			if intStringLen < 0 {
  3908  				return ErrInvalidLengthCanalProtocol
  3909  			}
  3910  			postIndex := iNdEx + intStringLen
  3911  			if postIndex < 0 {
  3912  				return ErrInvalidLengthCanalProtocol
  3913  			}
  3914  			if postIndex > l {
  3915  				return io.ErrUnexpectedEOF
  3916  			}
  3917  			m.Journal = string(dAtA[iNdEx:postIndex])
  3918  			iNdEx = postIndex
  3919  		case 2:
  3920  			if wireType != 0 {
  3921  				return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType)
  3922  			}
  3923  			m.Position = 0
  3924  			for shift := uint(0); ; shift += 7 {
  3925  				if shift >= 64 {
  3926  					return ErrIntOverflowCanalProtocol
  3927  				}
  3928  				if iNdEx >= l {
  3929  					return io.ErrUnexpectedEOF
  3930  				}
  3931  				b := dAtA[iNdEx]
  3932  				iNdEx++
  3933  				m.Position |= int64(b&0x7F) << shift
  3934  				if b < 0x80 {
  3935  					break
  3936  				}
  3937  			}
  3938  		case 3:
  3939  			if wireType != 0 {
  3940  				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
  3941  			}
  3942  			var v int64
  3943  			for shift := uint(0); ; shift += 7 {
  3944  				if shift >= 64 {
  3945  					return ErrIntOverflowCanalProtocol
  3946  				}
  3947  				if iNdEx >= l {
  3948  					return io.ErrUnexpectedEOF
  3949  				}
  3950  				b := dAtA[iNdEx]
  3951  				iNdEx++
  3952  				v |= int64(b&0x7F) << shift
  3953  				if b < 0x80 {
  3954  					break
  3955  				}
  3956  			}
  3957  			m.TimestampPresent = &Dump_Timestamp{v}
  3958  		default:
  3959  			iNdEx = preIndex
  3960  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3961  			if err != nil {
  3962  				return err
  3963  			}
  3964  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3965  				return ErrInvalidLengthCanalProtocol
  3966  			}
  3967  			if (iNdEx + skippy) > l {
  3968  				return io.ErrUnexpectedEOF
  3969  			}
  3970  			iNdEx += skippy
  3971  		}
  3972  	}
  3973  
  3974  	if iNdEx > l {
  3975  		return io.ErrUnexpectedEOF
  3976  	}
  3977  	return nil
  3978  }
  3979  func (m *ClientRollback) Unmarshal(dAtA []byte) error {
  3980  	l := len(dAtA)
  3981  	iNdEx := 0
  3982  	for iNdEx < l {
  3983  		preIndex := iNdEx
  3984  		var wire uint64
  3985  		for shift := uint(0); ; shift += 7 {
  3986  			if shift >= 64 {
  3987  				return ErrIntOverflowCanalProtocol
  3988  			}
  3989  			if iNdEx >= l {
  3990  				return io.ErrUnexpectedEOF
  3991  			}
  3992  			b := dAtA[iNdEx]
  3993  			iNdEx++
  3994  			wire |= uint64(b&0x7F) << shift
  3995  			if b < 0x80 {
  3996  				break
  3997  			}
  3998  		}
  3999  		fieldNum := int32(wire >> 3)
  4000  		wireType := int(wire & 0x7)
  4001  		if wireType == 4 {
  4002  			return fmt.Errorf("proto: ClientRollback: wiretype end group for non-group")
  4003  		}
  4004  		if fieldNum <= 0 {
  4005  			return fmt.Errorf("proto: ClientRollback: illegal tag %d (wire type %d)", fieldNum, wire)
  4006  		}
  4007  		switch fieldNum {
  4008  		case 1:
  4009  			if wireType != 2 {
  4010  				return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
  4011  			}
  4012  			var stringLen uint64
  4013  			for shift := uint(0); ; shift += 7 {
  4014  				if shift >= 64 {
  4015  					return ErrIntOverflowCanalProtocol
  4016  				}
  4017  				if iNdEx >= l {
  4018  					return io.ErrUnexpectedEOF
  4019  				}
  4020  				b := dAtA[iNdEx]
  4021  				iNdEx++
  4022  				stringLen |= uint64(b&0x7F) << shift
  4023  				if b < 0x80 {
  4024  					break
  4025  				}
  4026  			}
  4027  			intStringLen := int(stringLen)
  4028  			if intStringLen < 0 {
  4029  				return ErrInvalidLengthCanalProtocol
  4030  			}
  4031  			postIndex := iNdEx + intStringLen
  4032  			if postIndex < 0 {
  4033  				return ErrInvalidLengthCanalProtocol
  4034  			}
  4035  			if postIndex > l {
  4036  				return io.ErrUnexpectedEOF
  4037  			}
  4038  			m.Destination = string(dAtA[iNdEx:postIndex])
  4039  			iNdEx = postIndex
  4040  		case 2:
  4041  			if wireType != 2 {
  4042  				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
  4043  			}
  4044  			var stringLen uint64
  4045  			for shift := uint(0); ; shift += 7 {
  4046  				if shift >= 64 {
  4047  					return ErrIntOverflowCanalProtocol
  4048  				}
  4049  				if iNdEx >= l {
  4050  					return io.ErrUnexpectedEOF
  4051  				}
  4052  				b := dAtA[iNdEx]
  4053  				iNdEx++
  4054  				stringLen |= uint64(b&0x7F) << shift
  4055  				if b < 0x80 {
  4056  					break
  4057  				}
  4058  			}
  4059  			intStringLen := int(stringLen)
  4060  			if intStringLen < 0 {
  4061  				return ErrInvalidLengthCanalProtocol
  4062  			}
  4063  			postIndex := iNdEx + intStringLen
  4064  			if postIndex < 0 {
  4065  				return ErrInvalidLengthCanalProtocol
  4066  			}
  4067  			if postIndex > l {
  4068  				return io.ErrUnexpectedEOF
  4069  			}
  4070  			m.ClientId = string(dAtA[iNdEx:postIndex])
  4071  			iNdEx = postIndex
  4072  		case 3:
  4073  			if wireType != 0 {
  4074  				return fmt.Errorf("proto: wrong wireType = %d for field BatchId", wireType)
  4075  			}
  4076  			m.BatchId = 0
  4077  			for shift := uint(0); ; shift += 7 {
  4078  				if shift >= 64 {
  4079  					return ErrIntOverflowCanalProtocol
  4080  				}
  4081  				if iNdEx >= l {
  4082  					return io.ErrUnexpectedEOF
  4083  				}
  4084  				b := dAtA[iNdEx]
  4085  				iNdEx++
  4086  				m.BatchId |= int64(b&0x7F) << shift
  4087  				if b < 0x80 {
  4088  					break
  4089  				}
  4090  			}
  4091  		default:
  4092  			iNdEx = preIndex
  4093  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  4094  			if err != nil {
  4095  				return err
  4096  			}
  4097  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4098  				return ErrInvalidLengthCanalProtocol
  4099  			}
  4100  			if (iNdEx + skippy) > l {
  4101  				return io.ErrUnexpectedEOF
  4102  			}
  4103  			iNdEx += skippy
  4104  		}
  4105  	}
  4106  
  4107  	if iNdEx > l {
  4108  		return io.ErrUnexpectedEOF
  4109  	}
  4110  	return nil
  4111  }
  4112  func skipCanalProtocol(dAtA []byte) (n int, err error) {
  4113  	l := len(dAtA)
  4114  	iNdEx := 0
  4115  	depth := 0
  4116  	for iNdEx < l {
  4117  		var wire uint64
  4118  		for shift := uint(0); ; shift += 7 {
  4119  			if shift >= 64 {
  4120  				return 0, ErrIntOverflowCanalProtocol
  4121  			}
  4122  			if iNdEx >= l {
  4123  				return 0, io.ErrUnexpectedEOF
  4124  			}
  4125  			b := dAtA[iNdEx]
  4126  			iNdEx++
  4127  			wire |= (uint64(b) & 0x7F) << shift
  4128  			if b < 0x80 {
  4129  				break
  4130  			}
  4131  		}
  4132  		wireType := int(wire & 0x7)
  4133  		switch wireType {
  4134  		case 0:
  4135  			for shift := uint(0); ; shift += 7 {
  4136  				if shift >= 64 {
  4137  					return 0, ErrIntOverflowCanalProtocol
  4138  				}
  4139  				if iNdEx >= l {
  4140  					return 0, io.ErrUnexpectedEOF
  4141  				}
  4142  				iNdEx++
  4143  				if dAtA[iNdEx-1] < 0x80 {
  4144  					break
  4145  				}
  4146  			}
  4147  		case 1:
  4148  			iNdEx += 8
  4149  		case 2:
  4150  			var length int
  4151  			for shift := uint(0); ; shift += 7 {
  4152  				if shift >= 64 {
  4153  					return 0, ErrIntOverflowCanalProtocol
  4154  				}
  4155  				if iNdEx >= l {
  4156  					return 0, io.ErrUnexpectedEOF
  4157  				}
  4158  				b := dAtA[iNdEx]
  4159  				iNdEx++
  4160  				length |= (int(b) & 0x7F) << shift
  4161  				if b < 0x80 {
  4162  					break
  4163  				}
  4164  			}
  4165  			if length < 0 {
  4166  				return 0, ErrInvalidLengthCanalProtocol
  4167  			}
  4168  			iNdEx += length
  4169  		case 3:
  4170  			depth++
  4171  		case 4:
  4172  			if depth == 0 {
  4173  				return 0, ErrUnexpectedEndOfGroupCanalProtocol
  4174  			}
  4175  			depth--
  4176  		case 5:
  4177  			iNdEx += 4
  4178  		default:
  4179  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  4180  		}
  4181  		if iNdEx < 0 {
  4182  			return 0, ErrInvalidLengthCanalProtocol
  4183  		}
  4184  		if depth == 0 {
  4185  			return iNdEx, nil
  4186  		}
  4187  	}
  4188  	return 0, io.ErrUnexpectedEOF
  4189  }
  4190  
  4191  var (
  4192  	ErrInvalidLengthCanalProtocol        = fmt.Errorf("proto: negative length found during unmarshaling")
  4193  	ErrIntOverflowCanalProtocol          = fmt.Errorf("proto: integer overflow")
  4194  	ErrUnexpectedEndOfGroupCanalProtocol = fmt.Errorf("proto: unexpected end of group")
  4195  )