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

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: CDCPeerToPeer.proto
     3  
     4  package p2p
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	_ "github.com/gogo/protobuf/gogoproto"
    10  	proto "github.com/gogo/protobuf/proto"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  	io "io"
    15  	math "math"
    16  	math_bits "math/bits"
    17  )
    18  
    19  // Reference imports to suppress errors if they are not otherwise used.
    20  var _ = proto.Marshal
    21  var _ = fmt.Errorf
    22  var _ = math.Inf
    23  
    24  // This is a compile-time assertion to ensure that this generated file
    25  // is compatible with the proto package it is being compiled against.
    26  // A compilation error at this line likely means your copy of the
    27  // proto package needs to be updated.
    28  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    29  
    30  type ExitReason int32
    31  
    32  const (
    33  	ExitReason_UNKNOWN              ExitReason = 0
    34  	ExitReason_OK                   ExitReason = 1
    35  	ExitReason_CONGESTED            ExitReason = 2
    36  	ExitReason_CAPTURE_SUICIDE      ExitReason = 3
    37  	ExitReason_STALE_CONNECTION     ExitReason = 4
    38  	ExitReason_DUPLICATE_CONNECTION ExitReason = 5
    39  	ExitReason_CAPTURE_ID_MISMATCH  ExitReason = 6
    40  )
    41  
    42  var ExitReason_name = map[int32]string{
    43  	0: "UNKNOWN",
    44  	1: "OK",
    45  	2: "CONGESTED",
    46  	3: "CAPTURE_SUICIDE",
    47  	4: "STALE_CONNECTION",
    48  	5: "DUPLICATE_CONNECTION",
    49  	6: "CAPTURE_ID_MISMATCH",
    50  }
    51  
    52  var ExitReason_value = map[string]int32{
    53  	"UNKNOWN":              0,
    54  	"OK":                   1,
    55  	"CONGESTED":            2,
    56  	"CAPTURE_SUICIDE":      3,
    57  	"STALE_CONNECTION":     4,
    58  	"DUPLICATE_CONNECTION": 5,
    59  	"CAPTURE_ID_MISMATCH":  6,
    60  }
    61  
    62  func (x ExitReason) String() string {
    63  	return proto.EnumName(ExitReason_name, int32(x))
    64  }
    65  
    66  func (ExitReason) EnumDescriptor() ([]byte, []int) {
    67  	return fileDescriptor_6560df28dddfd2cc, []int{0}
    68  }
    69  
    70  // MessageEntry represents a single message.
    71  type MessageEntry struct {
    72  	// topic is used to separate messages into order-guaranteed logical streams.
    73  	Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
    74  	// serialized payload. The format and schema is defined by the business logic
    75  	// using the peer-to-peer mechanism.
    76  	Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
    77  	// monotonically increase.
    78  	Sequence int64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"`
    79  }
    80  
    81  func (m *MessageEntry) Reset()         { *m = MessageEntry{} }
    82  func (m *MessageEntry) String() string { return proto.CompactTextString(m) }
    83  func (*MessageEntry) ProtoMessage()    {}
    84  func (*MessageEntry) Descriptor() ([]byte, []int) {
    85  	return fileDescriptor_6560df28dddfd2cc, []int{0}
    86  }
    87  func (m *MessageEntry) XXX_Unmarshal(b []byte) error {
    88  	return m.Unmarshal(b)
    89  }
    90  func (m *MessageEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    91  	if deterministic {
    92  		return xxx_messageInfo_MessageEntry.Marshal(b, m, deterministic)
    93  	} else {
    94  		b = b[:cap(b)]
    95  		n, err := m.MarshalToSizedBuffer(b)
    96  		if err != nil {
    97  			return nil, err
    98  		}
    99  		return b[:n], nil
   100  	}
   101  }
   102  func (m *MessageEntry) XXX_Merge(src proto.Message) {
   103  	xxx_messageInfo_MessageEntry.Merge(m, src)
   104  }
   105  func (m *MessageEntry) XXX_Size() int {
   106  	return m.Size()
   107  }
   108  func (m *MessageEntry) XXX_DiscardUnknown() {
   109  	xxx_messageInfo_MessageEntry.DiscardUnknown(m)
   110  }
   111  
   112  var xxx_messageInfo_MessageEntry proto.InternalMessageInfo
   113  
   114  func (m *MessageEntry) GetTopic() string {
   115  	if m != nil {
   116  		return m.Topic
   117  	}
   118  	return ""
   119  }
   120  
   121  func (m *MessageEntry) GetContent() []byte {
   122  	if m != nil {
   123  		return m.Content
   124  	}
   125  	return nil
   126  }
   127  
   128  func (m *MessageEntry) GetSequence() int64 {
   129  	if m != nil {
   130  		return m.Sequence
   131  	}
   132  	return 0
   133  }
   134  
   135  // Metadata associated with one client-server bidirectional stream.
   136  type StreamMeta struct {
   137  	// fields required for correctness
   138  	SenderId   string `protobuf:"bytes,1,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"`
   139  	ReceiverId string `protobuf:"bytes,2,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
   140  	Epoch      int64  `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty"`
   141  	// fields required for compatibility check
   142  	ClientVersion string `protobuf:"bytes,50,opt,name=client_version,json=clientVersion,proto3" json:"client_version,omitempty"`
   143  	// fields for metrics, logging, debugging, etc.
   144  	SenderAdvertisedAddr string `protobuf:"bytes,100,opt,name=sender_advertised_addr,json=senderAdvertisedAddr,proto3" json:"sender_advertised_addr,omitempty"`
   145  }
   146  
   147  func (m *StreamMeta) Reset()         { *m = StreamMeta{} }
   148  func (m *StreamMeta) String() string { return proto.CompactTextString(m) }
   149  func (*StreamMeta) ProtoMessage()    {}
   150  func (*StreamMeta) Descriptor() ([]byte, []int) {
   151  	return fileDescriptor_6560df28dddfd2cc, []int{1}
   152  }
   153  func (m *StreamMeta) XXX_Unmarshal(b []byte) error {
   154  	return m.Unmarshal(b)
   155  }
   156  func (m *StreamMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   157  	if deterministic {
   158  		return xxx_messageInfo_StreamMeta.Marshal(b, m, deterministic)
   159  	} else {
   160  		b = b[:cap(b)]
   161  		n, err := m.MarshalToSizedBuffer(b)
   162  		if err != nil {
   163  			return nil, err
   164  		}
   165  		return b[:n], nil
   166  	}
   167  }
   168  func (m *StreamMeta) XXX_Merge(src proto.Message) {
   169  	xxx_messageInfo_StreamMeta.Merge(m, src)
   170  }
   171  func (m *StreamMeta) XXX_Size() int {
   172  	return m.Size()
   173  }
   174  func (m *StreamMeta) XXX_DiscardUnknown() {
   175  	xxx_messageInfo_StreamMeta.DiscardUnknown(m)
   176  }
   177  
   178  var xxx_messageInfo_StreamMeta proto.InternalMessageInfo
   179  
   180  func (m *StreamMeta) GetSenderId() string {
   181  	if m != nil {
   182  		return m.SenderId
   183  	}
   184  	return ""
   185  }
   186  
   187  func (m *StreamMeta) GetReceiverId() string {
   188  	if m != nil {
   189  		return m.ReceiverId
   190  	}
   191  	return ""
   192  }
   193  
   194  func (m *StreamMeta) GetEpoch() int64 {
   195  	if m != nil {
   196  		return m.Epoch
   197  	}
   198  	return 0
   199  }
   200  
   201  func (m *StreamMeta) GetClientVersion() string {
   202  	if m != nil {
   203  		return m.ClientVersion
   204  	}
   205  	return ""
   206  }
   207  
   208  func (m *StreamMeta) GetSenderAdvertisedAddr() string {
   209  	if m != nil {
   210  		return m.SenderAdvertisedAddr
   211  	}
   212  	return ""
   213  }
   214  
   215  type MessagePacket struct {
   216  	Meta *StreamMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
   217  	// multiple messages can be batched.
   218  	Entries []*MessageEntry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"`
   219  }
   220  
   221  func (m *MessagePacket) Reset()         { *m = MessagePacket{} }
   222  func (m *MessagePacket) String() string { return proto.CompactTextString(m) }
   223  func (*MessagePacket) ProtoMessage()    {}
   224  func (*MessagePacket) Descriptor() ([]byte, []int) {
   225  	return fileDescriptor_6560df28dddfd2cc, []int{2}
   226  }
   227  func (m *MessagePacket) XXX_Unmarshal(b []byte) error {
   228  	return m.Unmarshal(b)
   229  }
   230  func (m *MessagePacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   231  	if deterministic {
   232  		return xxx_messageInfo_MessagePacket.Marshal(b, m, deterministic)
   233  	} else {
   234  		b = b[:cap(b)]
   235  		n, err := m.MarshalToSizedBuffer(b)
   236  		if err != nil {
   237  			return nil, err
   238  		}
   239  		return b[:n], nil
   240  	}
   241  }
   242  func (m *MessagePacket) XXX_Merge(src proto.Message) {
   243  	xxx_messageInfo_MessagePacket.Merge(m, src)
   244  }
   245  func (m *MessagePacket) XXX_Size() int {
   246  	return m.Size()
   247  }
   248  func (m *MessagePacket) XXX_DiscardUnknown() {
   249  	xxx_messageInfo_MessagePacket.DiscardUnknown(m)
   250  }
   251  
   252  var xxx_messageInfo_MessagePacket proto.InternalMessageInfo
   253  
   254  func (m *MessagePacket) GetMeta() *StreamMeta {
   255  	if m != nil {
   256  		return m.Meta
   257  	}
   258  	return nil
   259  }
   260  
   261  func (m *MessagePacket) GetEntries() []*MessageEntry {
   262  	if m != nil {
   263  		return m.Entries
   264  	}
   265  	return nil
   266  }
   267  
   268  type Ack struct {
   269  	Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
   270  	// the sequence of an already processed message.
   271  	// Must be monotonically increasing for a given topic and two given node processes.
   272  	LastSeq int64 `protobuf:"varint,2,opt,name=last_seq,json=lastSeq,proto3" json:"last_seq,omitempty"`
   273  }
   274  
   275  func (m *Ack) Reset()         { *m = Ack{} }
   276  func (m *Ack) String() string { return proto.CompactTextString(m) }
   277  func (*Ack) ProtoMessage()    {}
   278  func (*Ack) Descriptor() ([]byte, []int) {
   279  	return fileDescriptor_6560df28dddfd2cc, []int{3}
   280  }
   281  func (m *Ack) XXX_Unmarshal(b []byte) error {
   282  	return m.Unmarshal(b)
   283  }
   284  func (m *Ack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   285  	if deterministic {
   286  		return xxx_messageInfo_Ack.Marshal(b, m, deterministic)
   287  	} else {
   288  		b = b[:cap(b)]
   289  		n, err := m.MarshalToSizedBuffer(b)
   290  		if err != nil {
   291  			return nil, err
   292  		}
   293  		return b[:n], nil
   294  	}
   295  }
   296  func (m *Ack) XXX_Merge(src proto.Message) {
   297  	xxx_messageInfo_Ack.Merge(m, src)
   298  }
   299  func (m *Ack) XXX_Size() int {
   300  	return m.Size()
   301  }
   302  func (m *Ack) XXX_DiscardUnknown() {
   303  	xxx_messageInfo_Ack.DiscardUnknown(m)
   304  }
   305  
   306  var xxx_messageInfo_Ack proto.InternalMessageInfo
   307  
   308  func (m *Ack) GetTopic() string {
   309  	if m != nil {
   310  		return m.Topic
   311  	}
   312  	return ""
   313  }
   314  
   315  func (m *Ack) GetLastSeq() int64 {
   316  	if m != nil {
   317  		return m.LastSeq
   318  	}
   319  	return 0
   320  }
   321  
   322  type SendMessageResponse struct {
   323  	Ack          []*Ack     `protobuf:"bytes,1,rep,name=ack,proto3" json:"ack,omitempty"`
   324  	ExitReason   ExitReason `protobuf:"varint,2,opt,name=exit_reason,json=exitReason,proto3,enum=p2p.ExitReason" json:"exit_reason,omitempty"`
   325  	ErrorMessage string     `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
   326  }
   327  
   328  func (m *SendMessageResponse) Reset()         { *m = SendMessageResponse{} }
   329  func (m *SendMessageResponse) String() string { return proto.CompactTextString(m) }
   330  func (*SendMessageResponse) ProtoMessage()    {}
   331  func (*SendMessageResponse) Descriptor() ([]byte, []int) {
   332  	return fileDescriptor_6560df28dddfd2cc, []int{4}
   333  }
   334  func (m *SendMessageResponse) XXX_Unmarshal(b []byte) error {
   335  	return m.Unmarshal(b)
   336  }
   337  func (m *SendMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   338  	if deterministic {
   339  		return xxx_messageInfo_SendMessageResponse.Marshal(b, m, deterministic)
   340  	} else {
   341  		b = b[:cap(b)]
   342  		n, err := m.MarshalToSizedBuffer(b)
   343  		if err != nil {
   344  			return nil, err
   345  		}
   346  		return b[:n], nil
   347  	}
   348  }
   349  func (m *SendMessageResponse) XXX_Merge(src proto.Message) {
   350  	xxx_messageInfo_SendMessageResponse.Merge(m, src)
   351  }
   352  func (m *SendMessageResponse) XXX_Size() int {
   353  	return m.Size()
   354  }
   355  func (m *SendMessageResponse) XXX_DiscardUnknown() {
   356  	xxx_messageInfo_SendMessageResponse.DiscardUnknown(m)
   357  }
   358  
   359  var xxx_messageInfo_SendMessageResponse proto.InternalMessageInfo
   360  
   361  func (m *SendMessageResponse) GetAck() []*Ack {
   362  	if m != nil {
   363  		return m.Ack
   364  	}
   365  	return nil
   366  }
   367  
   368  func (m *SendMessageResponse) GetExitReason() ExitReason {
   369  	if m != nil {
   370  		return m.ExitReason
   371  	}
   372  	return ExitReason_UNKNOWN
   373  }
   374  
   375  func (m *SendMessageResponse) GetErrorMessage() string {
   376  	if m != nil {
   377  		return m.ErrorMessage
   378  	}
   379  	return ""
   380  }
   381  
   382  func init() {
   383  	proto.RegisterEnum("p2p.ExitReason", ExitReason_name, ExitReason_value)
   384  	proto.RegisterType((*MessageEntry)(nil), "p2p.MessageEntry")
   385  	proto.RegisterType((*StreamMeta)(nil), "p2p.StreamMeta")
   386  	proto.RegisterType((*MessagePacket)(nil), "p2p.MessagePacket")
   387  	proto.RegisterType((*Ack)(nil), "p2p.Ack")
   388  	proto.RegisterType((*SendMessageResponse)(nil), "p2p.SendMessageResponse")
   389  }
   390  
   391  func init() { proto.RegisterFile("CDCPeerToPeer.proto", fileDescriptor_6560df28dddfd2cc) }
   392  
   393  var fileDescriptor_6560df28dddfd2cc = []byte{
   394  	// 578 bytes of a gzipped FileDescriptorProto
   395  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0x41, 0x6f, 0xd3, 0x30,
   396  	0x14, 0xae, 0x9b, 0x6d, 0x6d, 0x5f, 0xd7, 0x2d, 0xb8, 0x15, 0x84, 0x22, 0x95, 0xaa, 0x13, 0x52,
   397  	0x05, 0xd2, 0x98, 0x0a, 0xe2, 0x8a, 0x42, 0x1a, 0x41, 0xb4, 0x35, 0xad, 0x92, 0x14, 0x24, 0x2e,
   398  	0x51, 0x48, 0x9e, 0x46, 0xd4, 0x2d, 0xce, 0x6c, 0x33, 0x8d, 0x7f, 0xc0, 0x09, 0xf1, 0x87, 0xb8,
   399  	0x73, 0xdc, 0x91, 0x23, 0xda, 0xfe, 0x08, 0xaa, 0x93, 0x6e, 0x9d, 0x10, 0x17, 0xcb, 0xdf, 0xf7,
   400  	0x3d, 0xbf, 0xcf, 0xfe, 0x9e, 0x0c, 0x6d, 0x6b, 0x6c, 0xcd, 0x10, 0x79, 0xc0, 0x96, 0xeb, 0x7e,
   401  	0xce, 0x99, 0x64, 0x54, 0xcb, 0x47, 0x79, 0xb7, 0x73, 0xcc, 0x8e, 0x99, 0xc2, 0xcf, 0x97, 0xbb,
   402  	0x42, 0x1a, 0x7c, 0x84, 0xed, 0x09, 0x0a, 0x11, 0x1d, 0xa3, 0x9d, 0x49, 0xfe, 0x95, 0x76, 0x60,
   403  	0x53, 0xb2, 0x3c, 0x8d, 0x0d, 0xd2, 0x27, 0xc3, 0x86, 0x57, 0x00, 0x6a, 0x40, 0x2d, 0x66, 0x99,
   404  	0xc4, 0x4c, 0x1a, 0xd5, 0x3e, 0x19, 0x6e, 0x7b, 0x2b, 0x48, 0xbb, 0x50, 0x17, 0x78, 0xf6, 0x05,
   405  	0xb3, 0x18, 0x0d, 0xad, 0x4f, 0x86, 0x9a, 0x77, 0x83, 0x07, 0x3f, 0x09, 0x80, 0x2f, 0x39, 0x46,
   406  	0xa7, 0x13, 0x94, 0x11, 0x7d, 0x04, 0x0d, 0x81, 0x59, 0x82, 0x3c, 0x4c, 0x93, 0xb2, 0x7d, 0xbd,
   407  	0x20, 0x9c, 0x84, 0x3e, 0x86, 0x26, 0xc7, 0x18, 0xd3, 0xf3, 0x42, 0xae, 0x2a, 0x19, 0x56, 0x94,
   408  	0x93, 0x2c, 0x2f, 0x86, 0x39, 0x8b, 0x3f, 0x97, 0x2e, 0x05, 0xa0, 0x4f, 0x60, 0x27, 0x3e, 0x49,
   409  	0x31, 0x93, 0xe1, 0x39, 0x72, 0x91, 0xb2, 0xcc, 0x18, 0xa9, 0x93, 0xad, 0x82, 0x7d, 0x5f, 0x90,
   410  	0xf4, 0x25, 0xdc, 0x2f, 0xad, 0xa3, 0xe4, 0x1c, 0xb9, 0x4c, 0x05, 0x26, 0x61, 0x94, 0x24, 0xdc,
   411  	0x48, 0x54, 0x79, 0xa7, 0x50, 0xcd, 0x1b, 0xd1, 0x4c, 0x12, 0x3e, 0x88, 0xa0, 0x55, 0x66, 0x33,
   412  	0x8b, 0xe2, 0x05, 0x4a, 0xba, 0x07, 0x1b, 0xa7, 0x28, 0x23, 0x75, 0xf9, 0xe6, 0x68, 0x77, 0x3f,
   413  	0x1f, 0xe5, 0xfb, 0xb7, 0x0f, 0xf4, 0x94, 0x48, 0x9f, 0x41, 0x0d, 0x33, 0xc9, 0x53, 0x14, 0x46,
   414  	0xb5, 0xaf, 0x0d, 0x9b, 0xa3, 0x7b, 0xaa, 0x6e, 0x3d, 0x65, 0x6f, 0x55, 0x31, 0x78, 0x05, 0x9a,
   415  	0x19, 0x2f, 0xfe, 0x93, 0xfa, 0x43, 0xa8, 0x9f, 0x44, 0x42, 0x86, 0x02, 0xcf, 0x54, 0x20, 0x9a,
   416  	0x57, 0x5b, 0x62, 0x1f, 0xcf, 0x06, 0xdf, 0x08, 0xb4, 0x7d, 0xcc, 0x92, 0xb2, 0xab, 0x87, 0x22,
   417  	0x67, 0x99, 0x40, 0xda, 0x05, 0x2d, 0x8a, 0x17, 0x06, 0x51, 0xc6, 0x75, 0x65, 0x6c, 0xc6, 0x0b,
   418  	0x6f, 0x49, 0xd2, 0x03, 0x68, 0xe2, 0x45, 0x2a, 0x43, 0x8e, 0x91, 0x60, 0x99, 0xea, 0xb8, 0x53,
   419  	0x3e, 0xc2, 0xbe, 0x48, 0xa5, 0xa7, 0x68, 0x0f, 0xf0, 0x66, 0x4f, 0xf7, 0xa0, 0x85, 0x9c, 0x33,
   420  	0x1e, 0x9e, 0x16, 0x36, 0x2a, 0xfb, 0x86, 0xb7, 0xad, 0xc8, 0xd2, 0xfa, 0xe9, 0x77, 0x02, 0x70,
   421  	0x7b, 0x9e, 0x36, 0xa1, 0x36, 0x77, 0x0f, 0xdd, 0xe9, 0x07, 0x57, 0xaf, 0xd0, 0x2d, 0xa8, 0x4e,
   422  	0x0f, 0x75, 0x42, 0x5b, 0xd0, 0xb0, 0xa6, 0xee, 0x5b, 0xdb, 0x0f, 0xec, 0xb1, 0x5e, 0xa5, 0x6d,
   423  	0xd8, 0xb5, 0xcc, 0x59, 0x30, 0xf7, 0xec, 0xd0, 0x9f, 0x3b, 0x96, 0x33, 0xb6, 0x75, 0x8d, 0x76,
   424  	0x40, 0xf7, 0x03, 0xf3, 0xc8, 0x0e, 0xad, 0xa9, 0xeb, 0xda, 0x56, 0xe0, 0x4c, 0x5d, 0x7d, 0x83,
   425  	0x1a, 0xd0, 0x19, 0xcf, 0x67, 0x47, 0x8e, 0x65, 0x06, 0x77, 0x94, 0x4d, 0xfa, 0x00, 0xda, 0xab,
   426  	0x26, 0xce, 0x38, 0x9c, 0x38, 0xfe, 0xc4, 0x0c, 0xac, 0x77, 0xfa, 0xd6, 0x68, 0x06, 0xad, 0x3b,
   427  	0x9f, 0x80, 0xbe, 0x86, 0xe6, 0x5a, 0x56, 0x94, 0xae, 0xcf, 0xa3, 0x98, 0x6c, 0xd7, 0x28, 0x66,
   428  	0xf9, 0x6f, 0xa2, 0x43, 0x72, 0x40, 0xde, 0x18, 0xbf, 0xae, 0x7a, 0xe4, 0xf2, 0xaa, 0x47, 0xfe,
   429  	0x5c, 0xf5, 0xc8, 0x8f, 0xeb, 0x5e, 0xe5, 0xf2, 0xba, 0x57, 0xf9, 0x7d, 0xdd, 0xab, 0x7c, 0xda,
   430  	0x52, 0xbf, 0xe8, 0xc5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x85, 0x98, 0x36, 0x77, 0x03,
   431  	0x00, 0x00,
   432  }
   433  
   434  // Reference imports to suppress errors if they are not otherwise used.
   435  var _ context.Context
   436  var _ grpc.ClientConn
   437  
   438  // This is a compile-time assertion to ensure that this generated file
   439  // is compatible with the grpc package it is being compiled against.
   440  const _ = grpc.SupportPackageIsVersion4
   441  
   442  // CDCPeerToPeerClient is the client API for CDCPeerToPeer service.
   443  //
   444  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   445  type CDCPeerToPeerClient interface {
   446  	// A bidirectional stream from the sender (client) to the receiver (server)
   447  	// The send direction is used to carry the serialized payload, and the
   448  	// reply direction is used to receive ACKs (progress information) from the server.
   449  	SendMessage(ctx context.Context, opts ...grpc.CallOption) (CDCPeerToPeer_SendMessageClient, error)
   450  }
   451  
   452  type cDCPeerToPeerClient struct {
   453  	cc *grpc.ClientConn
   454  }
   455  
   456  func NewCDCPeerToPeerClient(cc *grpc.ClientConn) CDCPeerToPeerClient {
   457  	return &cDCPeerToPeerClient{cc}
   458  }
   459  
   460  func (c *cDCPeerToPeerClient) SendMessage(ctx context.Context, opts ...grpc.CallOption) (CDCPeerToPeer_SendMessageClient, error) {
   461  	stream, err := c.cc.NewStream(ctx, &_CDCPeerToPeer_serviceDesc.Streams[0], "/p2p.CDCPeerToPeer/SendMessage", opts...)
   462  	if err != nil {
   463  		return nil, err
   464  	}
   465  	x := &cDCPeerToPeerSendMessageClient{stream}
   466  	return x, nil
   467  }
   468  
   469  type CDCPeerToPeer_SendMessageClient interface {
   470  	Send(*MessagePacket) error
   471  	Recv() (*SendMessageResponse, error)
   472  	grpc.ClientStream
   473  }
   474  
   475  type cDCPeerToPeerSendMessageClient struct {
   476  	grpc.ClientStream
   477  }
   478  
   479  func (x *cDCPeerToPeerSendMessageClient) Send(m *MessagePacket) error {
   480  	return x.ClientStream.SendMsg(m)
   481  }
   482  
   483  func (x *cDCPeerToPeerSendMessageClient) Recv() (*SendMessageResponse, error) {
   484  	m := new(SendMessageResponse)
   485  	if err := x.ClientStream.RecvMsg(m); err != nil {
   486  		return nil, err
   487  	}
   488  	return m, nil
   489  }
   490  
   491  // CDCPeerToPeerServer is the server API for CDCPeerToPeer service.
   492  type CDCPeerToPeerServer interface {
   493  	// A bidirectional stream from the sender (client) to the receiver (server)
   494  	// The send direction is used to carry the serialized payload, and the
   495  	// reply direction is used to receive ACKs (progress information) from the server.
   496  	SendMessage(CDCPeerToPeer_SendMessageServer) error
   497  }
   498  
   499  // UnimplementedCDCPeerToPeerServer can be embedded to have forward compatible implementations.
   500  type UnimplementedCDCPeerToPeerServer struct {
   501  }
   502  
   503  func (*UnimplementedCDCPeerToPeerServer) SendMessage(srv CDCPeerToPeer_SendMessageServer) error {
   504  	return status.Errorf(codes.Unimplemented, "method SendMessage not implemented")
   505  }
   506  
   507  func RegisterCDCPeerToPeerServer(s *grpc.Server, srv CDCPeerToPeerServer) {
   508  	s.RegisterService(&_CDCPeerToPeer_serviceDesc, srv)
   509  }
   510  
   511  func _CDCPeerToPeer_SendMessage_Handler(srv interface{}, stream grpc.ServerStream) error {
   512  	return srv.(CDCPeerToPeerServer).SendMessage(&cDCPeerToPeerSendMessageServer{stream})
   513  }
   514  
   515  type CDCPeerToPeer_SendMessageServer interface {
   516  	Send(*SendMessageResponse) error
   517  	Recv() (*MessagePacket, error)
   518  	grpc.ServerStream
   519  }
   520  
   521  type cDCPeerToPeerSendMessageServer struct {
   522  	grpc.ServerStream
   523  }
   524  
   525  func (x *cDCPeerToPeerSendMessageServer) Send(m *SendMessageResponse) error {
   526  	return x.ServerStream.SendMsg(m)
   527  }
   528  
   529  func (x *cDCPeerToPeerSendMessageServer) Recv() (*MessagePacket, error) {
   530  	m := new(MessagePacket)
   531  	if err := x.ServerStream.RecvMsg(m); err != nil {
   532  		return nil, err
   533  	}
   534  	return m, nil
   535  }
   536  
   537  var _CDCPeerToPeer_serviceDesc = grpc.ServiceDesc{
   538  	ServiceName: "p2p.CDCPeerToPeer",
   539  	HandlerType: (*CDCPeerToPeerServer)(nil),
   540  	Methods:     []grpc.MethodDesc{},
   541  	Streams: []grpc.StreamDesc{
   542  		{
   543  			StreamName:    "SendMessage",
   544  			Handler:       _CDCPeerToPeer_SendMessage_Handler,
   545  			ServerStreams: true,
   546  			ClientStreams: true,
   547  		},
   548  	},
   549  	Metadata: "CDCPeerToPeer.proto",
   550  }
   551  
   552  func (m *MessageEntry) Marshal() (dAtA []byte, err error) {
   553  	size := m.Size()
   554  	dAtA = make([]byte, size)
   555  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   556  	if err != nil {
   557  		return nil, err
   558  	}
   559  	return dAtA[:n], nil
   560  }
   561  
   562  func (m *MessageEntry) MarshalTo(dAtA []byte) (int, error) {
   563  	size := m.Size()
   564  	return m.MarshalToSizedBuffer(dAtA[:size])
   565  }
   566  
   567  func (m *MessageEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   568  	i := len(dAtA)
   569  	_ = i
   570  	var l int
   571  	_ = l
   572  	if m.Sequence != 0 {
   573  		i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(m.Sequence))
   574  		i--
   575  		dAtA[i] = 0x18
   576  	}
   577  	if len(m.Content) > 0 {
   578  		i -= len(m.Content)
   579  		copy(dAtA[i:], m.Content)
   580  		i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(len(m.Content)))
   581  		i--
   582  		dAtA[i] = 0x12
   583  	}
   584  	if len(m.Topic) > 0 {
   585  		i -= len(m.Topic)
   586  		copy(dAtA[i:], m.Topic)
   587  		i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(len(m.Topic)))
   588  		i--
   589  		dAtA[i] = 0xa
   590  	}
   591  	return len(dAtA) - i, nil
   592  }
   593  
   594  func (m *StreamMeta) Marshal() (dAtA []byte, err error) {
   595  	size := m.Size()
   596  	dAtA = make([]byte, size)
   597  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   598  	if err != nil {
   599  		return nil, err
   600  	}
   601  	return dAtA[:n], nil
   602  }
   603  
   604  func (m *StreamMeta) MarshalTo(dAtA []byte) (int, error) {
   605  	size := m.Size()
   606  	return m.MarshalToSizedBuffer(dAtA[:size])
   607  }
   608  
   609  func (m *StreamMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   610  	i := len(dAtA)
   611  	_ = i
   612  	var l int
   613  	_ = l
   614  	if len(m.SenderAdvertisedAddr) > 0 {
   615  		i -= len(m.SenderAdvertisedAddr)
   616  		copy(dAtA[i:], m.SenderAdvertisedAddr)
   617  		i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(len(m.SenderAdvertisedAddr)))
   618  		i--
   619  		dAtA[i] = 0x6
   620  		i--
   621  		dAtA[i] = 0xa2
   622  	}
   623  	if len(m.ClientVersion) > 0 {
   624  		i -= len(m.ClientVersion)
   625  		copy(dAtA[i:], m.ClientVersion)
   626  		i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(len(m.ClientVersion)))
   627  		i--
   628  		dAtA[i] = 0x3
   629  		i--
   630  		dAtA[i] = 0x92
   631  	}
   632  	if m.Epoch != 0 {
   633  		i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(m.Epoch))
   634  		i--
   635  		dAtA[i] = 0x18
   636  	}
   637  	if len(m.ReceiverId) > 0 {
   638  		i -= len(m.ReceiverId)
   639  		copy(dAtA[i:], m.ReceiverId)
   640  		i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(len(m.ReceiverId)))
   641  		i--
   642  		dAtA[i] = 0x12
   643  	}
   644  	if len(m.SenderId) > 0 {
   645  		i -= len(m.SenderId)
   646  		copy(dAtA[i:], m.SenderId)
   647  		i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(len(m.SenderId)))
   648  		i--
   649  		dAtA[i] = 0xa
   650  	}
   651  	return len(dAtA) - i, nil
   652  }
   653  
   654  func (m *MessagePacket) Marshal() (dAtA []byte, err error) {
   655  	size := m.Size()
   656  	dAtA = make([]byte, size)
   657  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   658  	if err != nil {
   659  		return nil, err
   660  	}
   661  	return dAtA[:n], nil
   662  }
   663  
   664  func (m *MessagePacket) MarshalTo(dAtA []byte) (int, error) {
   665  	size := m.Size()
   666  	return m.MarshalToSizedBuffer(dAtA[:size])
   667  }
   668  
   669  func (m *MessagePacket) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   670  	i := len(dAtA)
   671  	_ = i
   672  	var l int
   673  	_ = l
   674  	if len(m.Entries) > 0 {
   675  		for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- {
   676  			{
   677  				size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   678  				if err != nil {
   679  					return 0, err
   680  				}
   681  				i -= size
   682  				i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(size))
   683  			}
   684  			i--
   685  			dAtA[i] = 0x12
   686  		}
   687  	}
   688  	if m.Meta != nil {
   689  		{
   690  			size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i])
   691  			if err != nil {
   692  				return 0, err
   693  			}
   694  			i -= size
   695  			i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(size))
   696  		}
   697  		i--
   698  		dAtA[i] = 0xa
   699  	}
   700  	return len(dAtA) - i, nil
   701  }
   702  
   703  func (m *Ack) Marshal() (dAtA []byte, err error) {
   704  	size := m.Size()
   705  	dAtA = make([]byte, size)
   706  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   707  	if err != nil {
   708  		return nil, err
   709  	}
   710  	return dAtA[:n], nil
   711  }
   712  
   713  func (m *Ack) MarshalTo(dAtA []byte) (int, error) {
   714  	size := m.Size()
   715  	return m.MarshalToSizedBuffer(dAtA[:size])
   716  }
   717  
   718  func (m *Ack) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   719  	i := len(dAtA)
   720  	_ = i
   721  	var l int
   722  	_ = l
   723  	if m.LastSeq != 0 {
   724  		i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(m.LastSeq))
   725  		i--
   726  		dAtA[i] = 0x10
   727  	}
   728  	if len(m.Topic) > 0 {
   729  		i -= len(m.Topic)
   730  		copy(dAtA[i:], m.Topic)
   731  		i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(len(m.Topic)))
   732  		i--
   733  		dAtA[i] = 0xa
   734  	}
   735  	return len(dAtA) - i, nil
   736  }
   737  
   738  func (m *SendMessageResponse) Marshal() (dAtA []byte, err error) {
   739  	size := m.Size()
   740  	dAtA = make([]byte, size)
   741  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   742  	if err != nil {
   743  		return nil, err
   744  	}
   745  	return dAtA[:n], nil
   746  }
   747  
   748  func (m *SendMessageResponse) MarshalTo(dAtA []byte) (int, error) {
   749  	size := m.Size()
   750  	return m.MarshalToSizedBuffer(dAtA[:size])
   751  }
   752  
   753  func (m *SendMessageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   754  	i := len(dAtA)
   755  	_ = i
   756  	var l int
   757  	_ = l
   758  	if len(m.ErrorMessage) > 0 {
   759  		i -= len(m.ErrorMessage)
   760  		copy(dAtA[i:], m.ErrorMessage)
   761  		i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(len(m.ErrorMessage)))
   762  		i--
   763  		dAtA[i] = 0x1a
   764  	}
   765  	if m.ExitReason != 0 {
   766  		i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(m.ExitReason))
   767  		i--
   768  		dAtA[i] = 0x10
   769  	}
   770  	if len(m.Ack) > 0 {
   771  		for iNdEx := len(m.Ack) - 1; iNdEx >= 0; iNdEx-- {
   772  			{
   773  				size, err := m.Ack[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   774  				if err != nil {
   775  					return 0, err
   776  				}
   777  				i -= size
   778  				i = encodeVarintCDCPeerToPeer(dAtA, i, uint64(size))
   779  			}
   780  			i--
   781  			dAtA[i] = 0xa
   782  		}
   783  	}
   784  	return len(dAtA) - i, nil
   785  }
   786  
   787  func encodeVarintCDCPeerToPeer(dAtA []byte, offset int, v uint64) int {
   788  	offset -= sovCDCPeerToPeer(v)
   789  	base := offset
   790  	for v >= 1<<7 {
   791  		dAtA[offset] = uint8(v&0x7f | 0x80)
   792  		v >>= 7
   793  		offset++
   794  	}
   795  	dAtA[offset] = uint8(v)
   796  	return base
   797  }
   798  func (m *MessageEntry) Size() (n int) {
   799  	if m == nil {
   800  		return 0
   801  	}
   802  	var l int
   803  	_ = l
   804  	l = len(m.Topic)
   805  	if l > 0 {
   806  		n += 1 + l + sovCDCPeerToPeer(uint64(l))
   807  	}
   808  	l = len(m.Content)
   809  	if l > 0 {
   810  		n += 1 + l + sovCDCPeerToPeer(uint64(l))
   811  	}
   812  	if m.Sequence != 0 {
   813  		n += 1 + sovCDCPeerToPeer(uint64(m.Sequence))
   814  	}
   815  	return n
   816  }
   817  
   818  func (m *StreamMeta) Size() (n int) {
   819  	if m == nil {
   820  		return 0
   821  	}
   822  	var l int
   823  	_ = l
   824  	l = len(m.SenderId)
   825  	if l > 0 {
   826  		n += 1 + l + sovCDCPeerToPeer(uint64(l))
   827  	}
   828  	l = len(m.ReceiverId)
   829  	if l > 0 {
   830  		n += 1 + l + sovCDCPeerToPeer(uint64(l))
   831  	}
   832  	if m.Epoch != 0 {
   833  		n += 1 + sovCDCPeerToPeer(uint64(m.Epoch))
   834  	}
   835  	l = len(m.ClientVersion)
   836  	if l > 0 {
   837  		n += 2 + l + sovCDCPeerToPeer(uint64(l))
   838  	}
   839  	l = len(m.SenderAdvertisedAddr)
   840  	if l > 0 {
   841  		n += 2 + l + sovCDCPeerToPeer(uint64(l))
   842  	}
   843  	return n
   844  }
   845  
   846  func (m *MessagePacket) Size() (n int) {
   847  	if m == nil {
   848  		return 0
   849  	}
   850  	var l int
   851  	_ = l
   852  	if m.Meta != nil {
   853  		l = m.Meta.Size()
   854  		n += 1 + l + sovCDCPeerToPeer(uint64(l))
   855  	}
   856  	if len(m.Entries) > 0 {
   857  		for _, e := range m.Entries {
   858  			l = e.Size()
   859  			n += 1 + l + sovCDCPeerToPeer(uint64(l))
   860  		}
   861  	}
   862  	return n
   863  }
   864  
   865  func (m *Ack) Size() (n int) {
   866  	if m == nil {
   867  		return 0
   868  	}
   869  	var l int
   870  	_ = l
   871  	l = len(m.Topic)
   872  	if l > 0 {
   873  		n += 1 + l + sovCDCPeerToPeer(uint64(l))
   874  	}
   875  	if m.LastSeq != 0 {
   876  		n += 1 + sovCDCPeerToPeer(uint64(m.LastSeq))
   877  	}
   878  	return n
   879  }
   880  
   881  func (m *SendMessageResponse) Size() (n int) {
   882  	if m == nil {
   883  		return 0
   884  	}
   885  	var l int
   886  	_ = l
   887  	if len(m.Ack) > 0 {
   888  		for _, e := range m.Ack {
   889  			l = e.Size()
   890  			n += 1 + l + sovCDCPeerToPeer(uint64(l))
   891  		}
   892  	}
   893  	if m.ExitReason != 0 {
   894  		n += 1 + sovCDCPeerToPeer(uint64(m.ExitReason))
   895  	}
   896  	l = len(m.ErrorMessage)
   897  	if l > 0 {
   898  		n += 1 + l + sovCDCPeerToPeer(uint64(l))
   899  	}
   900  	return n
   901  }
   902  
   903  func sovCDCPeerToPeer(x uint64) (n int) {
   904  	return (math_bits.Len64(x|1) + 6) / 7
   905  }
   906  func sozCDCPeerToPeer(x uint64) (n int) {
   907  	return sovCDCPeerToPeer(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   908  }
   909  func (m *MessageEntry) Unmarshal(dAtA []byte) error {
   910  	l := len(dAtA)
   911  	iNdEx := 0
   912  	for iNdEx < l {
   913  		preIndex := iNdEx
   914  		var wire uint64
   915  		for shift := uint(0); ; shift += 7 {
   916  			if shift >= 64 {
   917  				return ErrIntOverflowCDCPeerToPeer
   918  			}
   919  			if iNdEx >= l {
   920  				return io.ErrUnexpectedEOF
   921  			}
   922  			b := dAtA[iNdEx]
   923  			iNdEx++
   924  			wire |= uint64(b&0x7F) << shift
   925  			if b < 0x80 {
   926  				break
   927  			}
   928  		}
   929  		fieldNum := int32(wire >> 3)
   930  		wireType := int(wire & 0x7)
   931  		if wireType == 4 {
   932  			return fmt.Errorf("proto: MessageEntry: wiretype end group for non-group")
   933  		}
   934  		if fieldNum <= 0 {
   935  			return fmt.Errorf("proto: MessageEntry: illegal tag %d (wire type %d)", fieldNum, wire)
   936  		}
   937  		switch fieldNum {
   938  		case 1:
   939  			if wireType != 2 {
   940  				return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType)
   941  			}
   942  			var stringLen uint64
   943  			for shift := uint(0); ; shift += 7 {
   944  				if shift >= 64 {
   945  					return ErrIntOverflowCDCPeerToPeer
   946  				}
   947  				if iNdEx >= l {
   948  					return io.ErrUnexpectedEOF
   949  				}
   950  				b := dAtA[iNdEx]
   951  				iNdEx++
   952  				stringLen |= uint64(b&0x7F) << shift
   953  				if b < 0x80 {
   954  					break
   955  				}
   956  			}
   957  			intStringLen := int(stringLen)
   958  			if intStringLen < 0 {
   959  				return ErrInvalidLengthCDCPeerToPeer
   960  			}
   961  			postIndex := iNdEx + intStringLen
   962  			if postIndex < 0 {
   963  				return ErrInvalidLengthCDCPeerToPeer
   964  			}
   965  			if postIndex > l {
   966  				return io.ErrUnexpectedEOF
   967  			}
   968  			m.Topic = string(dAtA[iNdEx:postIndex])
   969  			iNdEx = postIndex
   970  		case 2:
   971  			if wireType != 2 {
   972  				return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType)
   973  			}
   974  			var byteLen int
   975  			for shift := uint(0); ; shift += 7 {
   976  				if shift >= 64 {
   977  					return ErrIntOverflowCDCPeerToPeer
   978  				}
   979  				if iNdEx >= l {
   980  					return io.ErrUnexpectedEOF
   981  				}
   982  				b := dAtA[iNdEx]
   983  				iNdEx++
   984  				byteLen |= int(b&0x7F) << shift
   985  				if b < 0x80 {
   986  					break
   987  				}
   988  			}
   989  			if byteLen < 0 {
   990  				return ErrInvalidLengthCDCPeerToPeer
   991  			}
   992  			postIndex := iNdEx + byteLen
   993  			if postIndex < 0 {
   994  				return ErrInvalidLengthCDCPeerToPeer
   995  			}
   996  			if postIndex > l {
   997  				return io.ErrUnexpectedEOF
   998  			}
   999  			m.Content = append(m.Content[:0], dAtA[iNdEx:postIndex]...)
  1000  			if m.Content == nil {
  1001  				m.Content = []byte{}
  1002  			}
  1003  			iNdEx = postIndex
  1004  		case 3:
  1005  			if wireType != 0 {
  1006  				return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  1007  			}
  1008  			m.Sequence = 0
  1009  			for shift := uint(0); ; shift += 7 {
  1010  				if shift >= 64 {
  1011  					return ErrIntOverflowCDCPeerToPeer
  1012  				}
  1013  				if iNdEx >= l {
  1014  					return io.ErrUnexpectedEOF
  1015  				}
  1016  				b := dAtA[iNdEx]
  1017  				iNdEx++
  1018  				m.Sequence |= int64(b&0x7F) << shift
  1019  				if b < 0x80 {
  1020  					break
  1021  				}
  1022  			}
  1023  		default:
  1024  			iNdEx = preIndex
  1025  			skippy, err := skipCDCPeerToPeer(dAtA[iNdEx:])
  1026  			if err != nil {
  1027  				return err
  1028  			}
  1029  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1030  				return ErrInvalidLengthCDCPeerToPeer
  1031  			}
  1032  			if (iNdEx + skippy) > l {
  1033  				return io.ErrUnexpectedEOF
  1034  			}
  1035  			iNdEx += skippy
  1036  		}
  1037  	}
  1038  
  1039  	if iNdEx > l {
  1040  		return io.ErrUnexpectedEOF
  1041  	}
  1042  	return nil
  1043  }
  1044  func (m *StreamMeta) Unmarshal(dAtA []byte) error {
  1045  	l := len(dAtA)
  1046  	iNdEx := 0
  1047  	for iNdEx < l {
  1048  		preIndex := iNdEx
  1049  		var wire uint64
  1050  		for shift := uint(0); ; shift += 7 {
  1051  			if shift >= 64 {
  1052  				return ErrIntOverflowCDCPeerToPeer
  1053  			}
  1054  			if iNdEx >= l {
  1055  				return io.ErrUnexpectedEOF
  1056  			}
  1057  			b := dAtA[iNdEx]
  1058  			iNdEx++
  1059  			wire |= uint64(b&0x7F) << shift
  1060  			if b < 0x80 {
  1061  				break
  1062  			}
  1063  		}
  1064  		fieldNum := int32(wire >> 3)
  1065  		wireType := int(wire & 0x7)
  1066  		if wireType == 4 {
  1067  			return fmt.Errorf("proto: StreamMeta: wiretype end group for non-group")
  1068  		}
  1069  		if fieldNum <= 0 {
  1070  			return fmt.Errorf("proto: StreamMeta: illegal tag %d (wire type %d)", fieldNum, wire)
  1071  		}
  1072  		switch fieldNum {
  1073  		case 1:
  1074  			if wireType != 2 {
  1075  				return fmt.Errorf("proto: wrong wireType = %d for field SenderId", wireType)
  1076  			}
  1077  			var stringLen uint64
  1078  			for shift := uint(0); ; shift += 7 {
  1079  				if shift >= 64 {
  1080  					return ErrIntOverflowCDCPeerToPeer
  1081  				}
  1082  				if iNdEx >= l {
  1083  					return io.ErrUnexpectedEOF
  1084  				}
  1085  				b := dAtA[iNdEx]
  1086  				iNdEx++
  1087  				stringLen |= uint64(b&0x7F) << shift
  1088  				if b < 0x80 {
  1089  					break
  1090  				}
  1091  			}
  1092  			intStringLen := int(stringLen)
  1093  			if intStringLen < 0 {
  1094  				return ErrInvalidLengthCDCPeerToPeer
  1095  			}
  1096  			postIndex := iNdEx + intStringLen
  1097  			if postIndex < 0 {
  1098  				return ErrInvalidLengthCDCPeerToPeer
  1099  			}
  1100  			if postIndex > l {
  1101  				return io.ErrUnexpectedEOF
  1102  			}
  1103  			m.SenderId = string(dAtA[iNdEx:postIndex])
  1104  			iNdEx = postIndex
  1105  		case 2:
  1106  			if wireType != 2 {
  1107  				return fmt.Errorf("proto: wrong wireType = %d for field ReceiverId", wireType)
  1108  			}
  1109  			var stringLen uint64
  1110  			for shift := uint(0); ; shift += 7 {
  1111  				if shift >= 64 {
  1112  					return ErrIntOverflowCDCPeerToPeer
  1113  				}
  1114  				if iNdEx >= l {
  1115  					return io.ErrUnexpectedEOF
  1116  				}
  1117  				b := dAtA[iNdEx]
  1118  				iNdEx++
  1119  				stringLen |= uint64(b&0x7F) << shift
  1120  				if b < 0x80 {
  1121  					break
  1122  				}
  1123  			}
  1124  			intStringLen := int(stringLen)
  1125  			if intStringLen < 0 {
  1126  				return ErrInvalidLengthCDCPeerToPeer
  1127  			}
  1128  			postIndex := iNdEx + intStringLen
  1129  			if postIndex < 0 {
  1130  				return ErrInvalidLengthCDCPeerToPeer
  1131  			}
  1132  			if postIndex > l {
  1133  				return io.ErrUnexpectedEOF
  1134  			}
  1135  			m.ReceiverId = string(dAtA[iNdEx:postIndex])
  1136  			iNdEx = postIndex
  1137  		case 3:
  1138  			if wireType != 0 {
  1139  				return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType)
  1140  			}
  1141  			m.Epoch = 0
  1142  			for shift := uint(0); ; shift += 7 {
  1143  				if shift >= 64 {
  1144  					return ErrIntOverflowCDCPeerToPeer
  1145  				}
  1146  				if iNdEx >= l {
  1147  					return io.ErrUnexpectedEOF
  1148  				}
  1149  				b := dAtA[iNdEx]
  1150  				iNdEx++
  1151  				m.Epoch |= int64(b&0x7F) << shift
  1152  				if b < 0x80 {
  1153  					break
  1154  				}
  1155  			}
  1156  		case 50:
  1157  			if wireType != 2 {
  1158  				return fmt.Errorf("proto: wrong wireType = %d for field ClientVersion", wireType)
  1159  			}
  1160  			var stringLen uint64
  1161  			for shift := uint(0); ; shift += 7 {
  1162  				if shift >= 64 {
  1163  					return ErrIntOverflowCDCPeerToPeer
  1164  				}
  1165  				if iNdEx >= l {
  1166  					return io.ErrUnexpectedEOF
  1167  				}
  1168  				b := dAtA[iNdEx]
  1169  				iNdEx++
  1170  				stringLen |= uint64(b&0x7F) << shift
  1171  				if b < 0x80 {
  1172  					break
  1173  				}
  1174  			}
  1175  			intStringLen := int(stringLen)
  1176  			if intStringLen < 0 {
  1177  				return ErrInvalidLengthCDCPeerToPeer
  1178  			}
  1179  			postIndex := iNdEx + intStringLen
  1180  			if postIndex < 0 {
  1181  				return ErrInvalidLengthCDCPeerToPeer
  1182  			}
  1183  			if postIndex > l {
  1184  				return io.ErrUnexpectedEOF
  1185  			}
  1186  			m.ClientVersion = string(dAtA[iNdEx:postIndex])
  1187  			iNdEx = postIndex
  1188  		case 100:
  1189  			if wireType != 2 {
  1190  				return fmt.Errorf("proto: wrong wireType = %d for field SenderAdvertisedAddr", wireType)
  1191  			}
  1192  			var stringLen uint64
  1193  			for shift := uint(0); ; shift += 7 {
  1194  				if shift >= 64 {
  1195  					return ErrIntOverflowCDCPeerToPeer
  1196  				}
  1197  				if iNdEx >= l {
  1198  					return io.ErrUnexpectedEOF
  1199  				}
  1200  				b := dAtA[iNdEx]
  1201  				iNdEx++
  1202  				stringLen |= uint64(b&0x7F) << shift
  1203  				if b < 0x80 {
  1204  					break
  1205  				}
  1206  			}
  1207  			intStringLen := int(stringLen)
  1208  			if intStringLen < 0 {
  1209  				return ErrInvalidLengthCDCPeerToPeer
  1210  			}
  1211  			postIndex := iNdEx + intStringLen
  1212  			if postIndex < 0 {
  1213  				return ErrInvalidLengthCDCPeerToPeer
  1214  			}
  1215  			if postIndex > l {
  1216  				return io.ErrUnexpectedEOF
  1217  			}
  1218  			m.SenderAdvertisedAddr = string(dAtA[iNdEx:postIndex])
  1219  			iNdEx = postIndex
  1220  		default:
  1221  			iNdEx = preIndex
  1222  			skippy, err := skipCDCPeerToPeer(dAtA[iNdEx:])
  1223  			if err != nil {
  1224  				return err
  1225  			}
  1226  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1227  				return ErrInvalidLengthCDCPeerToPeer
  1228  			}
  1229  			if (iNdEx + skippy) > l {
  1230  				return io.ErrUnexpectedEOF
  1231  			}
  1232  			iNdEx += skippy
  1233  		}
  1234  	}
  1235  
  1236  	if iNdEx > l {
  1237  		return io.ErrUnexpectedEOF
  1238  	}
  1239  	return nil
  1240  }
  1241  func (m *MessagePacket) Unmarshal(dAtA []byte) error {
  1242  	l := len(dAtA)
  1243  	iNdEx := 0
  1244  	for iNdEx < l {
  1245  		preIndex := iNdEx
  1246  		var wire uint64
  1247  		for shift := uint(0); ; shift += 7 {
  1248  			if shift >= 64 {
  1249  				return ErrIntOverflowCDCPeerToPeer
  1250  			}
  1251  			if iNdEx >= l {
  1252  				return io.ErrUnexpectedEOF
  1253  			}
  1254  			b := dAtA[iNdEx]
  1255  			iNdEx++
  1256  			wire |= uint64(b&0x7F) << shift
  1257  			if b < 0x80 {
  1258  				break
  1259  			}
  1260  		}
  1261  		fieldNum := int32(wire >> 3)
  1262  		wireType := int(wire & 0x7)
  1263  		if wireType == 4 {
  1264  			return fmt.Errorf("proto: MessagePacket: wiretype end group for non-group")
  1265  		}
  1266  		if fieldNum <= 0 {
  1267  			return fmt.Errorf("proto: MessagePacket: illegal tag %d (wire type %d)", fieldNum, wire)
  1268  		}
  1269  		switch fieldNum {
  1270  		case 1:
  1271  			if wireType != 2 {
  1272  				return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
  1273  			}
  1274  			var msglen int
  1275  			for shift := uint(0); ; shift += 7 {
  1276  				if shift >= 64 {
  1277  					return ErrIntOverflowCDCPeerToPeer
  1278  				}
  1279  				if iNdEx >= l {
  1280  					return io.ErrUnexpectedEOF
  1281  				}
  1282  				b := dAtA[iNdEx]
  1283  				iNdEx++
  1284  				msglen |= int(b&0x7F) << shift
  1285  				if b < 0x80 {
  1286  					break
  1287  				}
  1288  			}
  1289  			if msglen < 0 {
  1290  				return ErrInvalidLengthCDCPeerToPeer
  1291  			}
  1292  			postIndex := iNdEx + msglen
  1293  			if postIndex < 0 {
  1294  				return ErrInvalidLengthCDCPeerToPeer
  1295  			}
  1296  			if postIndex > l {
  1297  				return io.ErrUnexpectedEOF
  1298  			}
  1299  			if m.Meta == nil {
  1300  				m.Meta = &StreamMeta{}
  1301  			}
  1302  			if err := m.Meta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1303  				return err
  1304  			}
  1305  			iNdEx = postIndex
  1306  		case 2:
  1307  			if wireType != 2 {
  1308  				return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType)
  1309  			}
  1310  			var msglen int
  1311  			for shift := uint(0); ; shift += 7 {
  1312  				if shift >= 64 {
  1313  					return ErrIntOverflowCDCPeerToPeer
  1314  				}
  1315  				if iNdEx >= l {
  1316  					return io.ErrUnexpectedEOF
  1317  				}
  1318  				b := dAtA[iNdEx]
  1319  				iNdEx++
  1320  				msglen |= int(b&0x7F) << shift
  1321  				if b < 0x80 {
  1322  					break
  1323  				}
  1324  			}
  1325  			if msglen < 0 {
  1326  				return ErrInvalidLengthCDCPeerToPeer
  1327  			}
  1328  			postIndex := iNdEx + msglen
  1329  			if postIndex < 0 {
  1330  				return ErrInvalidLengthCDCPeerToPeer
  1331  			}
  1332  			if postIndex > l {
  1333  				return io.ErrUnexpectedEOF
  1334  			}
  1335  			m.Entries = append(m.Entries, &MessageEntry{})
  1336  			if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1337  				return err
  1338  			}
  1339  			iNdEx = postIndex
  1340  		default:
  1341  			iNdEx = preIndex
  1342  			skippy, err := skipCDCPeerToPeer(dAtA[iNdEx:])
  1343  			if err != nil {
  1344  				return err
  1345  			}
  1346  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1347  				return ErrInvalidLengthCDCPeerToPeer
  1348  			}
  1349  			if (iNdEx + skippy) > l {
  1350  				return io.ErrUnexpectedEOF
  1351  			}
  1352  			iNdEx += skippy
  1353  		}
  1354  	}
  1355  
  1356  	if iNdEx > l {
  1357  		return io.ErrUnexpectedEOF
  1358  	}
  1359  	return nil
  1360  }
  1361  func (m *Ack) Unmarshal(dAtA []byte) error {
  1362  	l := len(dAtA)
  1363  	iNdEx := 0
  1364  	for iNdEx < l {
  1365  		preIndex := iNdEx
  1366  		var wire uint64
  1367  		for shift := uint(0); ; shift += 7 {
  1368  			if shift >= 64 {
  1369  				return ErrIntOverflowCDCPeerToPeer
  1370  			}
  1371  			if iNdEx >= l {
  1372  				return io.ErrUnexpectedEOF
  1373  			}
  1374  			b := dAtA[iNdEx]
  1375  			iNdEx++
  1376  			wire |= uint64(b&0x7F) << shift
  1377  			if b < 0x80 {
  1378  				break
  1379  			}
  1380  		}
  1381  		fieldNum := int32(wire >> 3)
  1382  		wireType := int(wire & 0x7)
  1383  		if wireType == 4 {
  1384  			return fmt.Errorf("proto: Ack: wiretype end group for non-group")
  1385  		}
  1386  		if fieldNum <= 0 {
  1387  			return fmt.Errorf("proto: Ack: illegal tag %d (wire type %d)", fieldNum, wire)
  1388  		}
  1389  		switch fieldNum {
  1390  		case 1:
  1391  			if wireType != 2 {
  1392  				return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType)
  1393  			}
  1394  			var stringLen uint64
  1395  			for shift := uint(0); ; shift += 7 {
  1396  				if shift >= 64 {
  1397  					return ErrIntOverflowCDCPeerToPeer
  1398  				}
  1399  				if iNdEx >= l {
  1400  					return io.ErrUnexpectedEOF
  1401  				}
  1402  				b := dAtA[iNdEx]
  1403  				iNdEx++
  1404  				stringLen |= uint64(b&0x7F) << shift
  1405  				if b < 0x80 {
  1406  					break
  1407  				}
  1408  			}
  1409  			intStringLen := int(stringLen)
  1410  			if intStringLen < 0 {
  1411  				return ErrInvalidLengthCDCPeerToPeer
  1412  			}
  1413  			postIndex := iNdEx + intStringLen
  1414  			if postIndex < 0 {
  1415  				return ErrInvalidLengthCDCPeerToPeer
  1416  			}
  1417  			if postIndex > l {
  1418  				return io.ErrUnexpectedEOF
  1419  			}
  1420  			m.Topic = string(dAtA[iNdEx:postIndex])
  1421  			iNdEx = postIndex
  1422  		case 2:
  1423  			if wireType != 0 {
  1424  				return fmt.Errorf("proto: wrong wireType = %d for field LastSeq", wireType)
  1425  			}
  1426  			m.LastSeq = 0
  1427  			for shift := uint(0); ; shift += 7 {
  1428  				if shift >= 64 {
  1429  					return ErrIntOverflowCDCPeerToPeer
  1430  				}
  1431  				if iNdEx >= l {
  1432  					return io.ErrUnexpectedEOF
  1433  				}
  1434  				b := dAtA[iNdEx]
  1435  				iNdEx++
  1436  				m.LastSeq |= int64(b&0x7F) << shift
  1437  				if b < 0x80 {
  1438  					break
  1439  				}
  1440  			}
  1441  		default:
  1442  			iNdEx = preIndex
  1443  			skippy, err := skipCDCPeerToPeer(dAtA[iNdEx:])
  1444  			if err != nil {
  1445  				return err
  1446  			}
  1447  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1448  				return ErrInvalidLengthCDCPeerToPeer
  1449  			}
  1450  			if (iNdEx + skippy) > l {
  1451  				return io.ErrUnexpectedEOF
  1452  			}
  1453  			iNdEx += skippy
  1454  		}
  1455  	}
  1456  
  1457  	if iNdEx > l {
  1458  		return io.ErrUnexpectedEOF
  1459  	}
  1460  	return nil
  1461  }
  1462  func (m *SendMessageResponse) Unmarshal(dAtA []byte) error {
  1463  	l := len(dAtA)
  1464  	iNdEx := 0
  1465  	for iNdEx < l {
  1466  		preIndex := iNdEx
  1467  		var wire uint64
  1468  		for shift := uint(0); ; shift += 7 {
  1469  			if shift >= 64 {
  1470  				return ErrIntOverflowCDCPeerToPeer
  1471  			}
  1472  			if iNdEx >= l {
  1473  				return io.ErrUnexpectedEOF
  1474  			}
  1475  			b := dAtA[iNdEx]
  1476  			iNdEx++
  1477  			wire |= uint64(b&0x7F) << shift
  1478  			if b < 0x80 {
  1479  				break
  1480  			}
  1481  		}
  1482  		fieldNum := int32(wire >> 3)
  1483  		wireType := int(wire & 0x7)
  1484  		if wireType == 4 {
  1485  			return fmt.Errorf("proto: SendMessageResponse: wiretype end group for non-group")
  1486  		}
  1487  		if fieldNum <= 0 {
  1488  			return fmt.Errorf("proto: SendMessageResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1489  		}
  1490  		switch fieldNum {
  1491  		case 1:
  1492  			if wireType != 2 {
  1493  				return fmt.Errorf("proto: wrong wireType = %d for field Ack", wireType)
  1494  			}
  1495  			var msglen int
  1496  			for shift := uint(0); ; shift += 7 {
  1497  				if shift >= 64 {
  1498  					return ErrIntOverflowCDCPeerToPeer
  1499  				}
  1500  				if iNdEx >= l {
  1501  					return io.ErrUnexpectedEOF
  1502  				}
  1503  				b := dAtA[iNdEx]
  1504  				iNdEx++
  1505  				msglen |= int(b&0x7F) << shift
  1506  				if b < 0x80 {
  1507  					break
  1508  				}
  1509  			}
  1510  			if msglen < 0 {
  1511  				return ErrInvalidLengthCDCPeerToPeer
  1512  			}
  1513  			postIndex := iNdEx + msglen
  1514  			if postIndex < 0 {
  1515  				return ErrInvalidLengthCDCPeerToPeer
  1516  			}
  1517  			if postIndex > l {
  1518  				return io.ErrUnexpectedEOF
  1519  			}
  1520  			m.Ack = append(m.Ack, &Ack{})
  1521  			if err := m.Ack[len(m.Ack)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1522  				return err
  1523  			}
  1524  			iNdEx = postIndex
  1525  		case 2:
  1526  			if wireType != 0 {
  1527  				return fmt.Errorf("proto: wrong wireType = %d for field ExitReason", wireType)
  1528  			}
  1529  			m.ExitReason = 0
  1530  			for shift := uint(0); ; shift += 7 {
  1531  				if shift >= 64 {
  1532  					return ErrIntOverflowCDCPeerToPeer
  1533  				}
  1534  				if iNdEx >= l {
  1535  					return io.ErrUnexpectedEOF
  1536  				}
  1537  				b := dAtA[iNdEx]
  1538  				iNdEx++
  1539  				m.ExitReason |= ExitReason(b&0x7F) << shift
  1540  				if b < 0x80 {
  1541  					break
  1542  				}
  1543  			}
  1544  		case 3:
  1545  			if wireType != 2 {
  1546  				return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType)
  1547  			}
  1548  			var stringLen uint64
  1549  			for shift := uint(0); ; shift += 7 {
  1550  				if shift >= 64 {
  1551  					return ErrIntOverflowCDCPeerToPeer
  1552  				}
  1553  				if iNdEx >= l {
  1554  					return io.ErrUnexpectedEOF
  1555  				}
  1556  				b := dAtA[iNdEx]
  1557  				iNdEx++
  1558  				stringLen |= uint64(b&0x7F) << shift
  1559  				if b < 0x80 {
  1560  					break
  1561  				}
  1562  			}
  1563  			intStringLen := int(stringLen)
  1564  			if intStringLen < 0 {
  1565  				return ErrInvalidLengthCDCPeerToPeer
  1566  			}
  1567  			postIndex := iNdEx + intStringLen
  1568  			if postIndex < 0 {
  1569  				return ErrInvalidLengthCDCPeerToPeer
  1570  			}
  1571  			if postIndex > l {
  1572  				return io.ErrUnexpectedEOF
  1573  			}
  1574  			m.ErrorMessage = string(dAtA[iNdEx:postIndex])
  1575  			iNdEx = postIndex
  1576  		default:
  1577  			iNdEx = preIndex
  1578  			skippy, err := skipCDCPeerToPeer(dAtA[iNdEx:])
  1579  			if err != nil {
  1580  				return err
  1581  			}
  1582  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1583  				return ErrInvalidLengthCDCPeerToPeer
  1584  			}
  1585  			if (iNdEx + skippy) > l {
  1586  				return io.ErrUnexpectedEOF
  1587  			}
  1588  			iNdEx += skippy
  1589  		}
  1590  	}
  1591  
  1592  	if iNdEx > l {
  1593  		return io.ErrUnexpectedEOF
  1594  	}
  1595  	return nil
  1596  }
  1597  func skipCDCPeerToPeer(dAtA []byte) (n int, err error) {
  1598  	l := len(dAtA)
  1599  	iNdEx := 0
  1600  	depth := 0
  1601  	for iNdEx < l {
  1602  		var wire uint64
  1603  		for shift := uint(0); ; shift += 7 {
  1604  			if shift >= 64 {
  1605  				return 0, ErrIntOverflowCDCPeerToPeer
  1606  			}
  1607  			if iNdEx >= l {
  1608  				return 0, io.ErrUnexpectedEOF
  1609  			}
  1610  			b := dAtA[iNdEx]
  1611  			iNdEx++
  1612  			wire |= (uint64(b) & 0x7F) << shift
  1613  			if b < 0x80 {
  1614  				break
  1615  			}
  1616  		}
  1617  		wireType := int(wire & 0x7)
  1618  		switch wireType {
  1619  		case 0:
  1620  			for shift := uint(0); ; shift += 7 {
  1621  				if shift >= 64 {
  1622  					return 0, ErrIntOverflowCDCPeerToPeer
  1623  				}
  1624  				if iNdEx >= l {
  1625  					return 0, io.ErrUnexpectedEOF
  1626  				}
  1627  				iNdEx++
  1628  				if dAtA[iNdEx-1] < 0x80 {
  1629  					break
  1630  				}
  1631  			}
  1632  		case 1:
  1633  			iNdEx += 8
  1634  		case 2:
  1635  			var length int
  1636  			for shift := uint(0); ; shift += 7 {
  1637  				if shift >= 64 {
  1638  					return 0, ErrIntOverflowCDCPeerToPeer
  1639  				}
  1640  				if iNdEx >= l {
  1641  					return 0, io.ErrUnexpectedEOF
  1642  				}
  1643  				b := dAtA[iNdEx]
  1644  				iNdEx++
  1645  				length |= (int(b) & 0x7F) << shift
  1646  				if b < 0x80 {
  1647  					break
  1648  				}
  1649  			}
  1650  			if length < 0 {
  1651  				return 0, ErrInvalidLengthCDCPeerToPeer
  1652  			}
  1653  			iNdEx += length
  1654  		case 3:
  1655  			depth++
  1656  		case 4:
  1657  			if depth == 0 {
  1658  				return 0, ErrUnexpectedEndOfGroupCDCPeerToPeer
  1659  			}
  1660  			depth--
  1661  		case 5:
  1662  			iNdEx += 4
  1663  		default:
  1664  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1665  		}
  1666  		if iNdEx < 0 {
  1667  			return 0, ErrInvalidLengthCDCPeerToPeer
  1668  		}
  1669  		if depth == 0 {
  1670  			return iNdEx, nil
  1671  		}
  1672  	}
  1673  	return 0, io.ErrUnexpectedEOF
  1674  }
  1675  
  1676  var (
  1677  	ErrInvalidLengthCDCPeerToPeer        = fmt.Errorf("proto: negative length found during unmarshaling")
  1678  	ErrIntOverflowCDCPeerToPeer          = fmt.Errorf("proto: integer overflow")
  1679  	ErrUnexpectedEndOfGroupCDCPeerToPeer = fmt.Errorf("proto: unexpected end of group")
  1680  )