From 2e7cdebf3428299356ff2c1d2245ee16cd3ed5a0 Mon Sep 17 00:00:00 2001 From: vyzo Date: Sat, 23 Nov 2019 17:08:05 +0200 Subject: [PATCH] trace peer exchange --- pb/trace.pb.go | 1488 ++++++++++++++++++++++-------------------------- pb/trace.proto | 1 + trace.go | 5 + 3 files changed, 692 insertions(+), 802 deletions(-) diff --git a/pb/trace.pb.go b/pb/trace.pb.go index d6158ff..b728314 100644 --- a/pb/trace.pb.go +++ b/pb/trace.pb.go @@ -8,7 +8,6 @@ import ( proto "github.com/gogo/protobuf/proto" io "io" math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -20,7 +19,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type TraceEvent_Type int32 @@ -131,7 +130,7 @@ func (m *TraceEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TraceEvent.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -284,7 +283,7 @@ func (m *TraceEvent_PublishMessage) XXX_Marshal(b []byte, deterministic bool) ([ return xxx_messageInfo_TraceEvent_PublishMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -340,7 +339,7 @@ func (m *TraceEvent_RejectMessage) XXX_Marshal(b []byte, deterministic bool) ([] return xxx_messageInfo_TraceEvent_RejectMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -402,7 +401,7 @@ func (m *TraceEvent_DuplicateMessage) XXX_Marshal(b []byte, deterministic bool) return xxx_messageInfo_TraceEvent_DuplicateMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -456,7 +455,7 @@ func (m *TraceEvent_DeliverMessage) XXX_Marshal(b []byte, deterministic bool) ([ return xxx_messageInfo_TraceEvent_DeliverMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -504,7 +503,7 @@ func (m *TraceEvent_AddPeer) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_TraceEvent_AddPeer.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -558,7 +557,7 @@ func (m *TraceEvent_RemovePeer) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_TraceEvent_RemovePeer.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -606,7 +605,7 @@ func (m *TraceEvent_RecvRPC) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_TraceEvent_RecvRPC.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -661,7 +660,7 @@ func (m *TraceEvent_SendRPC) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_TraceEvent_SendRPC.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -716,7 +715,7 @@ func (m *TraceEvent_DropRPC) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_TraceEvent_DropRPC.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -770,7 +769,7 @@ func (m *TraceEvent_Join) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_TraceEvent_Join.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -817,7 +816,7 @@ func (m *TraceEvent_Leave) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_TraceEvent_Leave.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -865,7 +864,7 @@ func (m *TraceEvent_Graft) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_TraceEvent_Graft.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -920,7 +919,7 @@ func (m *TraceEvent_Prune) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_TraceEvent_Prune.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -976,7 +975,7 @@ func (m *TraceEvent_RPCMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_TraceEvent_RPCMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1038,7 +1037,7 @@ func (m *TraceEvent_MessageMeta) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_TraceEvent_MessageMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1093,7 +1092,7 @@ func (m *TraceEvent_SubMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_TraceEvent_SubMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1150,7 +1149,7 @@ func (m *TraceEvent_ControlMeta) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_TraceEvent_ControlMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1219,7 +1218,7 @@ func (m *TraceEvent_ControlIHaveMeta) XXX_Marshal(b []byte, deterministic bool) return xxx_messageInfo_TraceEvent_ControlIHaveMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1273,7 +1272,7 @@ func (m *TraceEvent_ControlIWantMeta) XXX_Marshal(b []byte, deterministic bool) return xxx_messageInfo_TraceEvent_ControlIWantMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1320,7 +1319,7 @@ func (m *TraceEvent_ControlGraftMeta) XXX_Marshal(b []byte, deterministic bool) return xxx_messageInfo_TraceEvent_ControlGraftMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1348,6 +1347,7 @@ func (m *TraceEvent_ControlGraftMeta) GetTopic() string { type TraceEvent_ControlPruneMeta struct { Topic *string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"` + Peers [][]byte `protobuf:"bytes,2,rep,name=peers" json:"peers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1367,7 +1367,7 @@ func (m *TraceEvent_ControlPruneMeta) XXX_Marshal(b []byte, deterministic bool) return xxx_messageInfo_TraceEvent_ControlPruneMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1393,6 +1393,13 @@ func (m *TraceEvent_ControlPruneMeta) GetTopic() string { return "" } +func (m *TraceEvent_ControlPruneMeta) GetPeers() [][]byte { + if m != nil { + return m.Peers + } + return nil +} + type TraceEventBatch struct { Batch []*TraceEvent `protobuf:"bytes,1,rep,name=batch" json:"batch,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1414,7 +1421,7 @@ func (m *TraceEventBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_TraceEventBatch.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1470,75 +1477,76 @@ func init() { func init() { proto.RegisterFile("trace.proto", fileDescriptor_0571941a1d628a80) } var fileDescriptor_0571941a1d628a80 = []byte{ - // 983 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xdd, 0x6e, 0xe2, 0x46, - 0x14, 0xc7, 0xeb, 0x00, 0x01, 0x0e, 0x84, 0xb8, 0xd3, 0xa6, 0xb2, 0xdc, 0xdd, 0x88, 0xa6, 0xab, - 0x15, 0x52, 0x25, 0xa4, 0x8d, 0x54, 0xed, 0x45, 0x77, 0xab, 0x12, 0xec, 0x24, 0x44, 0x24, 0xb1, - 0x0e, 0x24, 0xbd, 0x4c, 0x0d, 0x4c, 0x37, 0x5e, 0x81, 0x6d, 0xd9, 0x03, 0xd5, 0x3e, 0x40, 0xdf, - 0x6d, 0xef, 0xda, 0x47, 0xa8, 0x72, 0xd5, 0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0x0a, - 0x94, 0xf9, 0x8f, 0x1e, 0xf9, 0x02, 0xf6, 0xad, 0x9b, 0x93, 0xe1, 0x60, 0x74, 0x7e, 0x77, 0x69, - 0x8e, 0x46, 0xbd, 0x33, 0x53, 0xfd, 0x8c, 0x10, 0x68, 0xa1, 0x79, 0x61, 0xf6, 0xc7, 0xc9, 0x98, - 0x42, 0x0e, 0xe0, 0x73, 0xe3, 0xc6, 0x1a, 0x0e, 0xfa, 0xbd, 0xb1, 0x99, 0x0c, 0xef, 0x70, 0xde, - 0x30, 0x87, 0x83, 0x5b, 0x13, 0x93, 0xc1, 0x12, 0x69, 0x42, 0xad, 0x67, 0x18, 0x77, 0x96, 0x69, - 0xa2, 0x5a, 0x26, 0xfb, 0xd0, 0x40, 0xf3, 0xf2, 0xfa, 0xd6, 0x94, 0x03, 0x15, 0x3e, 0x8d, 0x66, - 0xff, 0xf6, 0x0e, 0xad, 0xbe, 0xba, 0xcb, 0xa3, 0x91, 0x79, 0x65, 0x88, 0xa8, 0xca, 0x23, 0x03, - 0xaf, 0x2d, 0x11, 0xd5, 0x48, 0x0d, 0xca, 0x17, 0xd7, 0x83, 0x2b, 0xb5, 0x4e, 0xea, 0x50, 0x19, - 0x9a, 0xbd, 0x5b, 0x53, 0x05, 0xfe, 0x79, 0x86, 0xbd, 0xd3, 0xb1, 0xda, 0xe0, 0x9f, 0x16, 0xde, - 0x5c, 0x99, 0x6a, 0xf3, 0xe8, 0x47, 0xd8, 0x4f, 0x5f, 0xf2, 0xc4, 0x66, 0xd3, 0x7b, 0xf2, 0x1d, - 0x54, 0x26, 0xfc, 0x23, 0x2a, 0xd7, 0x83, 0xdc, 0x47, 0x47, 0xa9, 0x39, 0x69, 0xbe, 0x7f, 0x38, - 0x54, 0xfe, 0x7c, 0x38, 0x54, 0xfe, 0x7a, 0x38, 0x54, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x7f, - 0xd4, 0x26, 0xef, 0x51, 0x0b, 0x00, 0x00, + // 993 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xdb, 0x6e, 0xdb, 0x46, + 0x10, 0x86, 0x4b, 0x1d, 0x2c, 0x69, 0x24, 0xcb, 0xec, 0xb6, 0x2e, 0x08, 0x36, 0x31, 0x54, 0x37, + 0x08, 0x04, 0x14, 0x10, 0x10, 0x03, 0x45, 0x2e, 0x9a, 0x04, 0x95, 0x45, 0xda, 0x96, 0x21, 0xdb, + 0xc4, 0x48, 0x76, 0x2f, 0x5d, 0x4a, 0xda, 0xc6, 0x0c, 0x24, 0x92, 0x20, 0x57, 0x2a, 0xf2, 0x00, + 0x7d, 0xb7, 0xdc, 0xb5, 0x8f, 0x50, 0xf8, 0x41, 0x8a, 0x62, 0x77, 0x49, 0xea, 0x60, 0x92, 0x49, + 0xdd, 0xdc, 0x71, 0x96, 0xff, 0x37, 0x3b, 0xbb, 0x9c, 0x7f, 0x40, 0xa8, 0xb3, 0xc0, 0x9e, 0xd0, + 0x8e, 0x1f, 0x78, 0xcc, 0x23, 0x35, 0x7f, 0x31, 0x0e, 0x17, 0xe3, 0x8e, 0x3f, 0x3e, 0xfc, 0x67, + 0x1f, 0x60, 0xc4, 0x5f, 0x99, 0x4b, 0xea, 0x32, 0xd2, 0x81, 0x12, 0x7b, 0xef, 0x53, 0x4d, 0x69, + 0x29, 0xed, 0xe6, 0x91, 0xde, 0x49, 0x84, 0x9d, 0x95, 0xa8, 0x33, 0x7a, 0xef, 0x53, 0x14, 0x3a, + 0xf2, 0x0d, 0xec, 0xf8, 0x94, 0x06, 0x7d, 0x43, 0x2b, 0xb4, 0x94, 0x76, 0x03, 0xa3, 0x88, 0x3c, + 0x81, 0x1a, 0x73, 0xe6, 0x34, 0x64, 0xf6, 0xdc, 0xd7, 0x8a, 0x2d, 0xa5, 0x5d, 0xc4, 0xd5, 0x02, + 0x19, 0x40, 0xd3, 0x5f, 0x8c, 0x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, + 0x0f, 0xbc, 0x08, 0xee, 0x88, 0x91, 0x17, 0x17, 0x21, 0xa3, 0x47, 0x66, 0x8d, 0xcc, 0xf2, 0x39, + 0xb3, 0x3e, 0x81, 0x12, 0x37, 0x13, 0xbf, 0x51, 0xd1, 0x6f, 0x22, 0x63, 0x0d, 0x65, 0xa0, 0x3f, + 0x85, 0xb2, 0x70, 0xce, 0xea, 0x75, 0x61, 0xfd, 0xf5, 0x8f, 0x50, 0x16, 0x2e, 0xc9, 0xfb, 0x4e, + 0xe9, 0x98, 0x70, 0xca, 0x7f, 0xc4, 0x3e, 0x28, 0x50, 0x89, 0x8a, 0x27, 0xaf, 0xa1, 0x1a, 0x35, + 0x4c, 0xa8, 0x29, 0xad, 0x62, 0xbb, 0x7e, 0xf4, 0x5d, 0xfa, 0x69, 0xa3, 0x96, 0x13, 0x27, 0x4e, + 0x10, 0xd2, 0x85, 0x46, 0xb8, 0x18, 0x87, 0x93, 0xc0, 0xf1, 0x99, 0xe3, 0xb9, 0xc2, 0x71, 0xd9, + 0xb3, 0x6d, 0x31, 0x16, 0xf8, 0x06, 0x42, 0x7e, 0x82, 0xca, 0xc4, 0x73, 0x59, 0xe0, 0xcd, 0x84, + 0x89, 0x32, 0x0b, 0xe8, 0x49, 0x91, 0xc8, 0x10, 0x13, 0x7a, 0x0f, 0xea, 0x6b, 0x85, 0x3d, 0x72, + 0x30, 0xbc, 0x86, 0x4a, 0x54, 0x1a, 0x4f, 0x10, 0x15, 0x37, 0x96, 0x3f, 0x00, 0x55, 0x5c, 0x2d, + 0x64, 0x5c, 0xe7, 0x1f, 0x05, 0xa8, 0xaf, 0x15, 0x47, 0x5e, 0x41, 0xd9, 0xb9, 0xe3, 0x83, 0x54, + 0xde, 0xe7, 0xf3, 0xdc, 0xe3, 0xf4, 0xcf, 0xec, 0xa5, 0xbc, 0x54, 0x09, 0x09, 0xfa, 0x77, 0xdb, + 0x65, 0xd1, 0x55, 0x7e, 0x84, 0xfe, 0xc5, 0x76,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0x25, 0x55, 0x28, + 0x9d, 0x5f, 0xf5, 0x2f, 0xd5, 0x1a, 0xa9, 0x41, 0x79, 0x60, 0x76, 0x6f, 0x4c, 0x15, 0xf8, 0xe3, + 0x29, 0x76, 0x4f, 0x46, 0x6a, 0x9d, 0x3f, 0x5a, 0x78, 0x7d, 0x69, 0xaa, 0x8d, 0xc3, 0x37, 0xb0, + 0xb7, 0xfa, 0xbe, 0xc7, 0x36, 0x9b, 0xdc, 0x91, 0x1f, 0xa0, 0x3c, 0xe6, 0x0f, 0x51, 0x13, 0xef, + 0xa7, 0xb6, 0x02, 0x4a, 0xcd, 0x71, 0xe3, 0xc3, 0xfd, 0x81, 0xf2, 0xd7, 0xfd, 0x81, 0xf2, 0xf7, + 0xfd, 0x81, 0xf2, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x05, 0x62, 0xa3, 0xb7, 0x67, 0x0b, 0x00, + 0x00, } func (m *TraceEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1546,201 +1554,168 @@ func (m *TraceEvent) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Prune != nil { - { - size, err := m.Prune.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if m.Graft != nil { - { - size, err := m.Graft.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - } - if m.Leave != nil { - { - size, err := m.Leave.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - if m.Join != nil { - { - size, err := m.Join.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - } - if m.DropRPC != nil { - { - size, err := m.DropRPC.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - if m.SendRPC != nil { - { - size, err := m.SendRPC.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - if m.RecvRPC != nil { - { - size, err := m.RecvRPC.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.RemovePeer != nil { - { - size, err := m.RemovePeer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.AddPeer != nil { - { - size, err := m.AddPeer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.DeliverMessage != nil { - { - size, err := m.DeliverMessage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.DuplicateMessage != nil { - { - size, err := m.DuplicateMessage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.RejectMessage != nil { - { - size, err := m.RejectMessage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.PublishMessage != nil { - { - size, err := m.PublishMessage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Timestamp != nil { - i = encodeVarintTrace(dAtA, i, uint64(*m.Timestamp)) - i-- - dAtA[i] = 0x18 + if m.Type != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintTrace(dAtA, i, uint64(*m.Type)) } if m.PeerID != nil { - i -= len(m.PeerID) - copy(dAtA[i:], m.PeerID) - i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) + i += copy(dAtA[i:], m.PeerID) } - if m.Type != nil { - i = encodeVarintTrace(dAtA, i, uint64(*m.Type)) - i-- - dAtA[i] = 0x8 + if m.Timestamp != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintTrace(dAtA, i, uint64(*m.Timestamp)) } - return len(dAtA) - i, nil + if m.PublishMessage != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.PublishMessage.Size())) + n1, err1 := m.PublishMessage.MarshalTo(dAtA[i:]) + if err1 != nil { + return 0, err1 + } + i += n1 + } + if m.RejectMessage != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.RejectMessage.Size())) + n2, err2 := m.RejectMessage.MarshalTo(dAtA[i:]) + if err2 != nil { + return 0, err2 + } + i += n2 + } + if m.DuplicateMessage != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.DuplicateMessage.Size())) + n3, err3 := m.DuplicateMessage.MarshalTo(dAtA[i:]) + if err3 != nil { + return 0, err3 + } + i += n3 + } + if m.DeliverMessage != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.DeliverMessage.Size())) + n4, err4 := m.DeliverMessage.MarshalTo(dAtA[i:]) + if err4 != nil { + return 0, err4 + } + i += n4 + } + if m.AddPeer != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.AddPeer.Size())) + n5, err5 := m.AddPeer.MarshalTo(dAtA[i:]) + if err5 != nil { + return 0, err5 + } + i += n5 + } + if m.RemovePeer != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.RemovePeer.Size())) + n6, err6 := m.RemovePeer.MarshalTo(dAtA[i:]) + if err6 != nil { + return 0, err6 + } + i += n6 + } + if m.RecvRPC != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.RecvRPC.Size())) + n7, err7 := m.RecvRPC.MarshalTo(dAtA[i:]) + if err7 != nil { + return 0, err7 + } + i += n7 + } + if m.SendRPC != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.SendRPC.Size())) + n8, err8 := m.SendRPC.MarshalTo(dAtA[i:]) + if err8 != nil { + return 0, err8 + } + i += n8 + } + if m.DropRPC != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.DropRPC.Size())) + n9, err9 := m.DropRPC.MarshalTo(dAtA[i:]) + if err9 != nil { + return 0, err9 + } + i += n9 + } + if m.Join != nil { + dAtA[i] = 0x6a + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.Join.Size())) + n10, err10 := m.Join.MarshalTo(dAtA[i:]) + if err10 != nil { + return 0, err10 + } + i += n10 + } + if m.Leave != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.Leave.Size())) + n11, err11 := m.Leave.MarshalTo(dAtA[i:]) + if err11 != nil { + return 0, err11 + } + i += n11 + } + if m.Graft != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.Graft.Size())) + n12, err12 := m.Graft.MarshalTo(dAtA[i:]) + if err12 != nil { + return 0, err12 + } + i += n12 + } + if m.Prune != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.Prune.Size())) + n13, err13 := m.Prune.MarshalTo(dAtA[i:]) + if err13 != nil { + return 0, err13 + } + i += n13 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TraceEvent_PublishMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1748,42 +1723,41 @@ func (m *TraceEvent_PublishMessage) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_PublishMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_PublishMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.MessageID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) + i += copy(dAtA[i:], m.MessageID) } if len(m.Topics) > 0 { - for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Topics[iNdEx]) - copy(dAtA[i:], m.Topics[iNdEx]) - i = encodeVarintTrace(dAtA, i, uint64(len(m.Topics[iNdEx]))) - i-- + for _, s := range m.Topics { dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - if m.MessageID != nil { - i -= len(m.MessageID) - copy(dAtA[i:], m.MessageID) - i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TraceEvent_RejectMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1791,47 +1765,38 @@ func (m *TraceEvent_RejectMessage) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_RejectMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_RejectMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Reason != nil { - i -= len(*m.Reason) - copy(dAtA[i:], *m.Reason) - i = encodeVarintTrace(dAtA, i, uint64(len(*m.Reason))) - i-- - dAtA[i] = 0x1a + if m.MessageID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) + i += copy(dAtA[i:], m.MessageID) } if m.ReceivedFrom != nil { - i -= len(m.ReceivedFrom) - copy(dAtA[i:], m.ReceivedFrom) - i = encodeVarintTrace(dAtA, i, uint64(len(m.ReceivedFrom))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.ReceivedFrom))) + i += copy(dAtA[i:], m.ReceivedFrom) } - if m.MessageID != nil { - i -= len(m.MessageID) - copy(dAtA[i:], m.MessageID) - i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) - i-- - dAtA[i] = 0xa + if m.Reason != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(*m.Reason))) + i += copy(dAtA[i:], *m.Reason) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TraceEvent_DuplicateMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1839,40 +1804,32 @@ func (m *TraceEvent_DuplicateMessage) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_DuplicateMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_DuplicateMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.MessageID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) + i += copy(dAtA[i:], m.MessageID) } if m.ReceivedFrom != nil { - i -= len(m.ReceivedFrom) - copy(dAtA[i:], m.ReceivedFrom) - i = encodeVarintTrace(dAtA, i, uint64(len(m.ReceivedFrom))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.ReceivedFrom))) + i += copy(dAtA[i:], m.ReceivedFrom) } - if m.MessageID != nil { - i -= len(m.MessageID) - copy(dAtA[i:], m.MessageID) - i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TraceEvent_DeliverMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1880,33 +1837,26 @@ func (m *TraceEvent_DeliverMessage) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_DeliverMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_DeliverMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if m.MessageID != nil { - i -= len(m.MessageID) - copy(dAtA[i:], m.MessageID) - i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) + i += copy(dAtA[i:], m.MessageID) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TraceEvent_AddPeer) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1914,40 +1864,32 @@ func (m *TraceEvent_AddPeer) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_AddPeer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_AddPeer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.PeerID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) + i += copy(dAtA[i:], m.PeerID) } if m.Proto != nil { - i -= len(*m.Proto) - copy(dAtA[i:], *m.Proto) - i = encodeVarintTrace(dAtA, i, uint64(len(*m.Proto))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(*m.Proto))) + i += copy(dAtA[i:], *m.Proto) } - if m.PeerID != nil { - i -= len(m.PeerID) - copy(dAtA[i:], m.PeerID) - i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TraceEvent_RemovePeer) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1955,33 +1897,26 @@ func (m *TraceEvent_RemovePeer) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_RemovePeer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_RemovePeer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if m.PeerID != nil { - i -= len(m.PeerID) - copy(dAtA[i:], m.PeerID) - i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) + i += copy(dAtA[i:], m.PeerID) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TraceEvent_RecvRPC) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1989,45 +1924,36 @@ func (m *TraceEvent_RecvRPC) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_RecvRPC) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_RecvRPC) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.ReceivedFrom != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.ReceivedFrom))) + i += copy(dAtA[i:], m.ReceivedFrom) } if m.Meta != nil { - { - size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.Meta.Size())) + n14, err14 := m.Meta.MarshalTo(dAtA[i:]) + if err14 != nil { + return 0, err14 + } + i += n14 } - if m.ReceivedFrom != nil { - i -= len(m.ReceivedFrom) - copy(dAtA[i:], m.ReceivedFrom) - i = encodeVarintTrace(dAtA, i, uint64(len(m.ReceivedFrom))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TraceEvent_SendRPC) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2035,45 +1961,36 @@ func (m *TraceEvent_SendRPC) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_SendRPC) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_SendRPC) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.SendTo != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.SendTo))) + i += copy(dAtA[i:], m.SendTo) } if m.Meta != nil { - { - size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.Meta.Size())) + n15, err15 := m.Meta.MarshalTo(dAtA[i:]) + if err15 != nil { + return 0, err15 + } + i += n15 } - if m.SendTo != nil { - i -= len(m.SendTo) - copy(dAtA[i:], m.SendTo) - i = encodeVarintTrace(dAtA, i, uint64(len(m.SendTo))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TraceEvent_DropRPC) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2081,45 +1998,36 @@ func (m *TraceEvent_DropRPC) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_DropRPC) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_DropRPC) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.SendTo != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.SendTo))) + i += copy(dAtA[i:], m.SendTo) } if m.Meta != nil { - { - size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.Meta.Size())) + n16, err16 := m.Meta.MarshalTo(dAtA[i:]) + if err16 != nil { + return 0, err16 + } + i += n16 } - if m.SendTo != nil { - i -= len(m.SendTo) - copy(dAtA[i:], m.SendTo) - i = encodeVarintTrace(dAtA, i, uint64(len(m.SendTo))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TraceEvent_Join) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2127,33 +2035,26 @@ func (m *TraceEvent_Join) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_Join) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_Join) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if m.Topic != nil { - i -= len(*m.Topic) - copy(dAtA[i:], *m.Topic) - i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) + i += copy(dAtA[i:], *m.Topic) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TraceEvent_Leave) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2161,33 +2062,26 @@ func (m *TraceEvent_Leave) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_Leave) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_Leave) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if m.Topic != nil { - i -= len(*m.Topic) - copy(dAtA[i:], *m.Topic) - i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) + i += copy(dAtA[i:], *m.Topic) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TraceEvent_Graft) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2195,40 +2089,32 @@ func (m *TraceEvent_Graft) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_Graft) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_Graft) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.PeerID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) + i += copy(dAtA[i:], m.PeerID) } if m.Topic != nil { - i -= len(*m.Topic) - copy(dAtA[i:], *m.Topic) - i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) + i += copy(dAtA[i:], *m.Topic) } - if m.PeerID != nil { - i -= len(m.PeerID) - copy(dAtA[i:], m.PeerID) - i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TraceEvent_Prune) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2236,40 +2122,32 @@ func (m *TraceEvent_Prune) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_Prune) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_Prune) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.PeerID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) + i += copy(dAtA[i:], m.PeerID) } if m.Topic != nil { - i -= len(*m.Topic) - copy(dAtA[i:], *m.Topic) - i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) + i += copy(dAtA[i:], *m.Topic) } - if m.PeerID != nil { - i -= len(m.PeerID) - copy(dAtA[i:], m.PeerID) - i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TraceEvent_RPCMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2277,66 +2155,54 @@ func (m *TraceEvent_RPCMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_RPCMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_RPCMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Control != nil { - { - size, err := m.Control.MarshalToSizedBuffer(dAtA[:i]) + if len(m.Messages) > 0 { + for _, msg := range m.Messages { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) + i += n } - i-- - dAtA[i] = 0x1a } if len(m.Subscription) > 0 { - for iNdEx := len(m.Subscription) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Subscription[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.Subscription { dAtA[i] = 0x12 - } - } - if len(m.Messages) > 0 { - for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) + i++ + i = encodeVarintTrace(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n } } - return len(dAtA) - i, nil + if m.Control != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTrace(dAtA, i, uint64(m.Control.Size())) + n17, err17 := m.Control.MarshalTo(dAtA[i:]) + if err17 != nil { + return 0, err17 + } + i += n17 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TraceEvent_MessageMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2344,42 +2210,41 @@ func (m *TraceEvent_MessageMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_MessageMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_MessageMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.MessageID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) + i += copy(dAtA[i:], m.MessageID) } if len(m.Topics) > 0 { - for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Topics[iNdEx]) - copy(dAtA[i:], m.Topics[iNdEx]) - i = encodeVarintTrace(dAtA, i, uint64(len(m.Topics[iNdEx]))) - i-- + for _, s := range m.Topics { dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - if m.MessageID != nil { - i -= len(m.MessageID) - copy(dAtA[i:], m.MessageID) - i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TraceEvent_SubMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2387,43 +2252,36 @@ func (m *TraceEvent_SubMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_SubMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_SubMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Topic != nil { - i -= len(*m.Topic) - copy(dAtA[i:], *m.Topic) - i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) - i-- - dAtA[i] = 0x12 - } if m.Subscribe != nil { - i-- + dAtA[i] = 0x8 + i++ if *m.Subscribe { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ } - return len(dAtA) - i, nil + if m.Topic != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) + i += copy(dAtA[i:], *m.Topic) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TraceEvent_ControlMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2431,82 +2289,68 @@ func (m *TraceEvent_ControlMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_ControlMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_ControlMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Prune) > 0 { - for iNdEx := len(m.Prune) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Prune[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) + if len(m.Ihave) > 0 { + for _, msg := range m.Ihave { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Graft) > 0 { - for iNdEx := len(m.Graft) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Graft[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a + i += n } } if len(m.Iwant) > 0 { - for iNdEx := len(m.Iwant) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Iwant[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.Iwant { dAtA[i] = 0x12 - } - } - if len(m.Ihave) > 0 { - for iNdEx := len(m.Ihave) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ihave[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) + i++ + i = encodeVarintTrace(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n } } - return len(dAtA) - i, nil + if len(m.Graft) > 0 { + for _, msg := range m.Graft { + dAtA[i] = 0x1a + i++ + i = encodeVarintTrace(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Prune) > 0 { + for _, msg := range m.Prune { + dAtA[i] = 0x22 + i++ + i = encodeVarintTrace(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TraceEvent_ControlIHaveMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2514,42 +2358,34 @@ func (m *TraceEvent_ControlIHaveMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_ControlIHaveMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_ControlIHaveMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Topic != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) + i += copy(dAtA[i:], *m.Topic) } if len(m.MessageIDs) > 0 { - for iNdEx := len(m.MessageIDs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.MessageIDs[iNdEx]) - copy(dAtA[i:], m.MessageIDs[iNdEx]) - i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageIDs[iNdEx]))) - i-- + for _, b := range m.MessageIDs { dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) } } - if m.Topic != nil { - i -= len(*m.Topic) - copy(dAtA[i:], *m.Topic) - i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TraceEvent_ControlIWantMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2557,35 +2393,28 @@ func (m *TraceEvent_ControlIWantMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_ControlIWantMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_ControlIWantMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if len(m.MessageIDs) > 0 { - for iNdEx := len(m.MessageIDs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.MessageIDs[iNdEx]) - copy(dAtA[i:], m.MessageIDs[iNdEx]) - i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageIDs[iNdEx]))) - i-- + for _, b := range m.MessageIDs { dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TraceEvent_ControlGraftMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2593,33 +2422,26 @@ func (m *TraceEvent_ControlGraftMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_ControlGraftMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_ControlGraftMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if m.Topic != nil { - i -= len(*m.Topic) - copy(dAtA[i:], *m.Topic) - i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) + i += copy(dAtA[i:], *m.Topic) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TraceEvent_ControlPruneMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2627,33 +2449,34 @@ func (m *TraceEvent_ControlPruneMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_ControlPruneMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEvent_ControlPruneMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if m.Topic != nil { - i -= len(*m.Topic) - copy(dAtA[i:], *m.Topic) - i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) + i += copy(dAtA[i:], *m.Topic) } - return len(dAtA) - i, nil + if len(m.Peers) > 0 { + for _, b := range m.Peers { + dAtA[i] = 0x12 + i++ + i = encodeVarintTrace(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TraceEventBatch) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2661,46 +2484,36 @@ func (m *TraceEventBatch) Marshal() (dAtA []byte, err error) { } func (m *TraceEventBatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceEventBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if len(m.Batch) > 0 { - for iNdEx := len(m.Batch) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Batch[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.Batch { dAtA[i] = 0xa + i++ + i = encodeVarintTrace(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func encodeVarintTrace(dAtA []byte, offset int, v uint64) int { - offset -= sovTrace(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *TraceEvent) Size() (n int) { if m == nil { @@ -3197,6 +3010,12 @@ func (m *TraceEvent_ControlPruneMeta) Size() (n int) { l = len(*m.Topic) n += 1 + l + sovTrace(uint64(l)) } + if len(m.Peers) > 0 { + for _, b := range m.Peers { + l = len(b) + n += 1 + l + sovTrace(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -3222,7 +3041,14 @@ func (m *TraceEventBatch) Size() (n int) { } func sovTrace(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozTrace(x uint64) (n int) { return sovTrace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -6235,6 +6061,38 @@ func (m *TraceEvent_ControlPruneMeta) Unmarshal(dAtA []byte) error { s := string(dAtA[iNdEx:postIndex]) m.Topic = &s iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Peers", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Peers = append(m.Peers, make([]byte, postIndex-iNdEx)) + copy(m.Peers[len(m.Peers)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTrace(dAtA[iNdEx:]) @@ -6351,7 +6209,6 @@ func (m *TraceEventBatch) Unmarshal(dAtA []byte) error { func skipTrace(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 - depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -6383,8 +6240,10 @@ func skipTrace(dAtA []byte) (n int, err error) { break } } + return iNdEx, nil case 1: iNdEx += 8 + return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -6408,27 +6267,52 @@ func skipTrace(dAtA []byte) (n int, err error) { if iNdEx < 0 { return 0, ErrInvalidLengthTrace } + return iNdEx, nil case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTrace + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTrace + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipTrace(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthTrace + } } - depth-- + return iNdEx, nil + case 4: + return iNdEx, nil case 5: iNdEx += 4 + return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } - if depth == 0 { - return iNdEx, nil - } } - return 0, io.ErrUnexpectedEOF + panic("unreachable") } var ( - ErrInvalidLengthTrace = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTrace = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTrace = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthTrace = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTrace = fmt.Errorf("proto: integer overflow") ) diff --git a/pb/trace.proto b/pb/trace.proto index 1b655b0..d83939e 100644 --- a/pb/trace.proto +++ b/pb/trace.proto @@ -137,6 +137,7 @@ message TraceEvent { message ControlPruneMeta { optional string topic = 1; + repeated bytes peers = 2; } } diff --git a/trace.go b/trace.go index bfddcaf..530c614 100644 --- a/trace.go +++ b/trace.go @@ -246,8 +246,13 @@ func (t *pubsubTracer) traceRPCMeta(rpc *RPC) *pb.TraceEvent_RPCMeta { var prune []*pb.TraceEvent_ControlPruneMeta for _, ctl := range rpc.Control.Prune { + peers := make([][]byte, 0, len(ctl.Peers)) + for _, pi := range ctl.Peers { + peers = append(peers, pi.PeerID) + } prune = append(prune, &pb.TraceEvent_ControlPruneMeta{ Topic: ctl.TopicID, + Peers: peers, }) }