diff --git a/go.mod b/go.mod index 9171192..9e4d7ea 100644 --- a/go.mod +++ b/go.mod @@ -5,10 +5,10 @@ require ( github.com/hashicorp/golang-lru v0.5.1 github.com/ipfs/go-log v0.0.1 github.com/libp2p/go-libp2p-blankhost v0.1.4 - github.com/libp2p/go-libp2p-core v0.2.4 + github.com/libp2p/go-libp2p-core v0.2.5 github.com/libp2p/go-libp2p-discovery v0.2.0 github.com/libp2p/go-libp2p-swarm v0.2.2 - github.com/multiformats/go-multiaddr v0.1.1 + github.com/multiformats/go-multiaddr v0.1.2 github.com/multiformats/go-multistream v0.1.0 github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee ) diff --git a/go.sum b/go.sum index 626e219..f76393e 100644 --- a/go.sum +++ b/go.sum @@ -40,7 +40,6 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -111,6 +110,8 @@ github.com/libp2p/go-eventbus v0.1.0 h1:mlawomSAjjkk97QnYiEmHsLu7E136+2oCWSHRUvM github.com/libp2p/go-eventbus v0.1.0/go.mod h1:vROgu5cs5T7cv7POWlWxBaVLxfSegC5UGQf8A2eEmx4= github.com/libp2p/go-flow-metrics v0.0.1 h1:0gxuFd2GuK7IIP5pKljLwps6TvcuYgvG7Atqi3INF5s= github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8= +github.com/libp2p/go-flow-metrics v0.0.2 h1:U5TvqfoyR6GVRM+bC15Ux1ltar1kbj6Zw6xOVR02CZs= +github.com/libp2p/go-flow-metrics v0.0.2/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= github.com/libp2p/go-libp2p-blankhost v0.1.4 h1:I96SWjR4rK9irDHcHq3XHN6hawCRTPUADzkJacgZLvk= github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= @@ -119,8 +120,8 @@ github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGc github.com/libp2p/go-libp2p-core v0.0.4/go.mod h1:jyuCQP356gzfCFtRKyvAbNkyeuxb7OlyhWZ3nls5d2I= github.com/libp2p/go-libp2p-core v0.2.0/go.mod h1:X0eyB0Gy93v0DZtSYbEM7RnMChm9Uv3j7yRXjO77xSI= github.com/libp2p/go-libp2p-core v0.2.2/go.mod h1:8fcwTbsG2B+lTgRJ1ICZtiM5GWCWZVoVrLaDRvIRng0= -github.com/libp2p/go-libp2p-core v0.2.4 h1:Et6ykkTwI6PU44tr8qUF9k43vP0aduMNniShAbUJJw8= -github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= +github.com/libp2p/go-libp2p-core v0.2.5 h1:iP1PIiIrlRrGbE1fYq2918yBc5NlCH3pFuIPSWU9hds= +github.com/libp2p/go-libp2p-core v0.2.5/go.mod h1:6+5zJmKhsf7yHn1RbmYDu08qDUpIUxGdqHuEZckmZOA= github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI= github.com/libp2p/go-libp2p-discovery v0.2.0 h1:1p3YSOq7VsgaL+xVHPi8XAmtGyas6D2J6rWBEfz/aiY= github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg= @@ -175,6 +176,7 @@ github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfj github.com/libp2p/go-yamux v1.2.2 h1:s6J6o7+ajoQMjHe7BEnq+EynOj5D2EoG8CuQgL3F2vg= github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg= @@ -209,6 +211,8 @@ github.com/multiformats/go-multiaddr v0.0.4/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lg github.com/multiformats/go-multiaddr v0.1.0/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= github.com/multiformats/go-multiaddr v0.1.1 h1:rVAztJYMhCQ7vEFr8FvxW3mS+HF2eY/oPbOMeS0ZDnE= github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= +github.com/multiformats/go-multiaddr v0.1.2 h1:HWYHNSyyllbQopmVIF5K7JKJugiah+L9/kuZKHbmNdQ= +github.com/multiformats/go-multiaddr v0.1.2/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-fmt v0.0.1/go.mod h1:aBYjqL4T/7j4Qx+R73XSv/8JsgnRFlf0w2KGLCmXl3Q= @@ -228,6 +232,8 @@ github.com/multiformats/go-multihash v0.0.8 h1:wrYcW5yxSi3dU07n5jnuS5PrNwyHy0zRH github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multistream v0.1.0 h1:UpO6jrsjqs46mqAK3n6wKRYFhugss9ArzbyUzU+4wkQ= github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= +github.com/multiformats/go-varint v0.0.1 h1:TR/0rdQtnNxuN2IhiB639xC3tWM4IUi7DkTBVTdGW/M= +github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= @@ -244,6 +250,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/smola/gocompat v0.2.0 h1:6b1oIMlUXIpz//VKEDzPVBK8KG7beVwmHIUEBIs/Pns= github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a h1:/eS3yfGjQKG+9kayBkj0ip1BGhq6zJ3eaVksphxAaek= github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0= @@ -336,6 +343,7 @@ golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20181130052023-1c3d964395ce/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/pb/rpc.pb.go b/pb/rpc.pb.go index 12bc805..0b46381 100644 --- a/pb/rpc.pb.go +++ b/pb/rpc.pb.go @@ -8,6 +8,7 @@ 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. @@ -19,7 +20,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.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type TopicDescriptor_AuthOpts_AuthMode int32 @@ -130,7 +131,7 @@ func (m *RPC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_RPC.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -192,7 +193,7 @@ func (m *RPC_SubOpts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_RPC_SubOpts.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -251,7 +252,7 @@ func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Message.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -336,7 +337,7 @@ func (m *ControlMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_ControlMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -405,7 +406,7 @@ func (m *ControlIHave) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ControlIHave.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -459,7 +460,7 @@ func (m *ControlIWant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ControlIWant.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -506,7 +507,7 @@ func (m *ControlGraft) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ControlGraft.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -553,7 +554,7 @@ func (m *ControlPrune) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ControlPrune.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -602,7 +603,7 @@ func (m *TopicDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_TopicDescriptor.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -664,7 +665,7 @@ func (m *TopicDescriptor_AuthOpts) XXX_Marshal(b []byte, deterministic bool) ([] return xxx_messageInfo_TopicDescriptor_AuthOpts.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -719,7 +720,7 @@ func (m *TopicDescriptor_EncOpts) XXX_Marshal(b []byte, deterministic bool) ([]b return xxx_messageInfo_TopicDescriptor_EncOpts.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -815,7 +816,7 @@ var fileDescriptor_77a6da22d6a3feb1 = []byte{ func (m *RPC) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -823,54 +824,66 @@ func (m *RPC) Marshal() (dAtA []byte, err error) { } func (m *RPC) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RPC) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Subscriptions) > 0 { - for _, msg := range m.Subscriptions { - dAtA[i] = 0xa - i++ - i = encodeVarintRpc(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Publish) > 0 { - for _, msg := range m.Publish { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpc(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 -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Control != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRpc(dAtA, i, uint64(m.Control.Size())) - n1, err := m.Control.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Control.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpc(dAtA, i, uint64(size)) } - i += n1 + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Publish) > 0 { + for iNdEx := len(m.Publish) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Publish[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - return i, nil + if len(m.Subscriptions) > 0 { + for iNdEx := len(m.Subscriptions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Subscriptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } func (m *RPC_SubOpts) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -878,36 +891,43 @@ func (m *RPC_SubOpts) Marshal() (dAtA []byte, err error) { } func (m *RPC_SubOpts) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RPC_SubOpts) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Topicid != nil { + i -= len(*m.Topicid) + copy(dAtA[i:], *m.Topicid) + i = encodeVarintRpc(dAtA, i, uint64(len(*m.Topicid))) + i-- + dAtA[i] = 0x12 + } if m.Subscribe != nil { - dAtA[i] = 0x8 - i++ + i-- if *m.Subscribe { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x8 } - if m.Topicid != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpc(dAtA, i, uint64(len(*m.Topicid))) - i += copy(dAtA[i:], *m.Topicid) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *Message) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -915,65 +935,70 @@ func (m *Message) Marshal() (dAtA []byte, err error) { } func (m *Message) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.From != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpc(dAtA, i, uint64(len(m.From))) - i += copy(dAtA[i:], m.From) - } - if m.Data != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpc(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) - } - if m.Seqno != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRpc(dAtA, i, uint64(len(m.Seqno))) - i += copy(dAtA[i:], m.Seqno) - } - if len(m.TopicIDs) > 0 { - for _, s := range m.TopicIDs { - dAtA[i] = 0x22 - 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.Signature != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintRpc(dAtA, i, uint64(len(m.Signature))) - i += copy(dAtA[i:], m.Signature) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Key != nil { - dAtA[i] = 0x32 - i++ + i -= len(m.Key) + copy(dAtA[i:], m.Key) i = encodeVarintRpc(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + i-- + dAtA[i] = 0x32 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Signature != nil { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintRpc(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x2a } - return i, nil + if len(m.TopicIDs) > 0 { + for iNdEx := len(m.TopicIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TopicIDs[iNdEx]) + copy(dAtA[i:], m.TopicIDs[iNdEx]) + i = encodeVarintRpc(dAtA, i, uint64(len(m.TopicIDs[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if m.Seqno != nil { + i -= len(m.Seqno) + copy(dAtA[i:], m.Seqno) + i = encodeVarintRpc(dAtA, i, uint64(len(m.Seqno))) + i-- + dAtA[i] = 0x1a + } + if m.Data != nil { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintRpc(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if m.From != nil { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintRpc(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ControlMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -981,68 +1006,82 @@ func (m *ControlMessage) Marshal() (dAtA []byte, err error) { } func (m *ControlMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ControlMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Ihave) > 0 { - for _, msg := range m.Ihave { - dAtA[i] = 0xa - i++ - i = encodeVarintRpc(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 -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Iwant) > 0 { - for _, msg := range m.Iwant { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpc(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + 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 = encodeVarintRpc(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x22 } } if len(m.Graft) > 0 { - for _, msg := range m.Graft { + 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 = encodeVarintRpc(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x1a - i++ - i = encodeVarintRpc(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 = encodeVarintRpc(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + 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 = encodeVarintRpc(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + 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 = encodeVarintRpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *ControlIHave) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1050,41 +1089,42 @@ func (m *ControlIHave) Marshal() (dAtA []byte, err error) { } func (m *ControlIHave) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ControlIHave) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TopicID != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpc(dAtA, i, uint64(len(*m.TopicID))) - i += copy(dAtA[i:], *m.TopicID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.MessageIDs) > 0 { - for _, s := range m.MessageIDs { + for iNdEx := len(m.MessageIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MessageIDs[iNdEx]) + copy(dAtA[i:], m.MessageIDs[iNdEx]) + i = encodeVarintRpc(dAtA, i, uint64(len(m.MessageIDs[iNdEx]))) + i-- 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.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.TopicID != nil { + i -= len(*m.TopicID) + copy(dAtA[i:], *m.TopicID) + i = encodeVarintRpc(dAtA, i, uint64(len(*m.TopicID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ControlIWant) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1092,35 +1132,35 @@ func (m *ControlIWant) Marshal() (dAtA []byte, err error) { } func (m *ControlIWant) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ControlIWant) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.MessageIDs) > 0 { - for _, s := range m.MessageIDs { + for iNdEx := len(m.MessageIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MessageIDs[iNdEx]) + copy(dAtA[i:], m.MessageIDs[iNdEx]) + i = encodeVarintRpc(dAtA, i, uint64(len(m.MessageIDs[iNdEx]))) + i-- dAtA[i] = 0xa - 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.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ControlGraft) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1128,26 +1168,33 @@ func (m *ControlGraft) Marshal() (dAtA []byte, err error) { } func (m *ControlGraft) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ControlGraft) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TopicID != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpc(dAtA, i, uint64(len(*m.TopicID))) - i += copy(dAtA[i:], *m.TopicID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.TopicID != nil { + i -= len(*m.TopicID) + copy(dAtA[i:], *m.TopicID) + i = encodeVarintRpc(dAtA, i, uint64(len(*m.TopicID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ControlPrune) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1155,26 +1202,33 @@ func (m *ControlPrune) Marshal() (dAtA []byte, err error) { } func (m *ControlPrune) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ControlPrune) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TopicID != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpc(dAtA, i, uint64(len(*m.TopicID))) - i += copy(dAtA[i:], *m.TopicID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.TopicID != nil { + i -= len(*m.TopicID) + copy(dAtA[i:], *m.TopicID) + i = encodeVarintRpc(dAtA, i, uint64(len(*m.TopicID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TopicDescriptor) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1182,46 +1236,57 @@ func (m *TopicDescriptor) Marshal() (dAtA []byte, err error) { } func (m *TopicDescriptor) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TopicDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Name != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpc(dAtA, i, uint64(len(*m.Name))) - i += copy(dAtA[i:], *m.Name) - } - if m.Auth != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpc(dAtA, i, uint64(m.Auth.Size())) - n2, err := m.Auth.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Enc != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRpc(dAtA, i, uint64(m.Enc.Size())) - n3, err := m.Enc.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Enc.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpc(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Auth != nil { + { + size, err := m.Auth.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - return i, nil + if m.Name != nil { + i -= len(*m.Name) + copy(dAtA[i:], *m.Name) + i = encodeVarintRpc(dAtA, i, uint64(len(*m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TopicDescriptor_AuthOpts) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1229,33 +1294,40 @@ func (m *TopicDescriptor_AuthOpts) Marshal() (dAtA []byte, err error) { } func (m *TopicDescriptor_AuthOpts) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TopicDescriptor_AuthOpts) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Mode != nil { - dAtA[i] = 0x8 - i++ - i = encodeVarintRpc(dAtA, i, uint64(*m.Mode)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Keys) > 0 { - for _, b := range m.Keys { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = encodeVarintRpc(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintRpc(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Mode != nil { + i = encodeVarintRpc(dAtA, i, uint64(*m.Mode)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *TopicDescriptor_EncOpts) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1263,37 +1335,46 @@ func (m *TopicDescriptor_EncOpts) Marshal() (dAtA []byte, err error) { } func (m *TopicDescriptor_EncOpts) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TopicDescriptor_EncOpts) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Mode != nil { - dAtA[i] = 0x8 - i++ - i = encodeVarintRpc(dAtA, i, uint64(*m.Mode)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.KeyHashes) > 0 { - for _, b := range m.KeyHashes { + for iNdEx := len(m.KeyHashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.KeyHashes[iNdEx]) + copy(dAtA[i:], m.KeyHashes[iNdEx]) + i = encodeVarintRpc(dAtA, i, uint64(len(m.KeyHashes[iNdEx]))) + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintRpc(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Mode != nil { + i = encodeVarintRpc(dAtA, i, uint64(*m.Mode)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintRpc(dAtA []byte, offset int, v uint64) int { + offset -= sovRpc(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *RPC) Size() (n int) { if m == nil { @@ -1555,14 +1636,7 @@ func (m *TopicDescriptor_EncOpts) Size() (n int) { } func sovRpc(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRpc(x uint64) (n int) { return sovRpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -3032,6 +3106,7 @@ func (m *TopicDescriptor_EncOpts) Unmarshal(dAtA []byte) error { func skipRpc(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 { @@ -3063,10 +3138,8 @@ func skipRpc(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 { @@ -3090,52 +3163,27 @@ func skipRpc(dAtA []byte) (n int, err error) { if iNdEx < 0 { return 0, ErrInvalidLengthRpc } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRpc - } - 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 := skipRpc(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthRpc - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRpc + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRpc = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRpc = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRpc = fmt.Errorf("proto: unexpected end of group") ) diff --git a/pb/trace.pb.go b/pb/trace.pb.go index 009d03d..d6158ff 100644 --- a/pb/trace.pb.go +++ b/pb/trace.pb.go @@ -8,6 +8,7 @@ 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. @@ -19,7 +20,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.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type TraceEvent_Type int32 @@ -130,7 +131,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -283,7 +284,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -339,7 +340,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -401,7 +402,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -455,7 +456,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -503,7 +504,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -557,7 +558,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -605,7 +606,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -660,7 +661,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -715,7 +716,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -769,7 +770,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -816,7 +817,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -864,7 +865,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -919,7 +920,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -975,7 +976,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1037,7 +1038,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1092,7 +1093,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1149,7 +1150,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1218,7 +1219,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1272,7 +1273,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1319,7 +1320,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1366,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1413,7 +1414,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.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1469,69 +1470,75 @@ func init() { func init() { proto.RegisterFile("trace.proto", fileDescriptor_0571941a1d628a80) } var fileDescriptor_0571941a1d628a80 = []byte{ - // 889 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xd1, 0x6e, 0xe2, 0x46, - 0x14, 0x86, 0xeb, 0x80, 0x63, 0x7c, 0x30, 0x8e, 0x99, 0x36, 0x95, 0xe5, 0xb6, 0x11, 0x9b, 0x5d, - 0x45, 0xa8, 0x2b, 0xa1, 0x2a, 0xdb, 0x55, 0xa5, 0xb6, 0x17, 0x25, 0x78, 0x92, 0x10, 0x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a, 0x68, 0x0f, 0xea, 0x2e, 0xbe, 0xbc, 0xbe, 0xc5, 0xe2, 0x40, - 0x66, 0x3f, 0xbb, 0xb8, 0x77, 0x7b, 0xe7, 0x3a, 0x3d, 0x63, 0x97, 0xed, 0x86, 0xf8, 0xca, 0xe6, - 0x3b, 0x85, 0xed, 0x6c, 0xf7, 0xda, 0xe1, 0xbb, 0x1a, 0xaa, 0x41, 0xf5, 0xe2, 0xba, 0x7f, 0x65, - 0xa8, 0x48, 0x05, 0x79, 0x80, 0xbb, 0xb7, 0xd8, 0x00, 0xb6, 0x3c, 0x73, 0xbb, 0xa7, 0x23, 0xa3, - 0xce, 0x96, 0x8e, 0x7b, 0x73, 0x85, 0x0d, 0xed, 0xf0, 0x07, 0xd8, 0x5b, 0xdd, 0xca, 0x89, 0x47, - 0xfd, 0x7b, 0xf4, 0x0a, 0xe4, 0x31, 0x5b, 0x2c, 0x5d, 0xb6, 0x5f, 0x7a, 0x81, 0x27, 0xda, 0x9f, - 0x0f, 0x07, 0xd2, 0xdf, 0x0f, 0x07, 0xd2, 0x3f, 0x0f, 0x07, 0xd2, 0xbf, 0x01, 0x00, 0x00, 0xff, - 0xff, 0xa3, 0xb7, 0xeb, 0x75, 0x4b, 0x09, 0x00, 0x00, + // 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, 0x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0x53, 0x65, 0x72, 0x84, 0x7c, 0xe5, 0xd1, 0x1f, 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, } func (m *TraceEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1539,168 +1546,201 @@ func (m *TraceEvent) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != nil { - dAtA[i] = 0x8 - i++ - i = encodeVarintTrace(dAtA, i, uint64(*m.Type)) - } - if m.PeerID != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) - i += copy(dAtA[i:], m.PeerID) - } - if m.Timestamp != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintTrace(dAtA, i, uint64(*m.Timestamp)) - } - if m.PublishMessage != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.PublishMessage.Size())) - n1, err := m.PublishMessage.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.RejectMessage != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.RejectMessage.Size())) - n2, err := m.RejectMessage.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.DuplicateMessage != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.DuplicateMessage.Size())) - n3, err := m.DuplicateMessage.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.DeliverMessage != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.DeliverMessage.Size())) - n4, err := m.DeliverMessage.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.AddPeer != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.AddPeer.Size())) - n5, err := m.AddPeer.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.RemovePeer != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.RemovePeer.Size())) - n6, err := m.RemovePeer.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.RecvRPC != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.RecvRPC.Size())) - n7, err := m.RecvRPC.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.SendRPC != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.SendRPC.Size())) - n8, err := m.SendRPC.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.DropRPC != nil { - dAtA[i] = 0x62 - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.DropRPC.Size())) - n9, err := m.DropRPC.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if m.Join != nil { - dAtA[i] = 0x6a - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.Join.Size())) - n10, err := m.Join.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.Leave != nil { - dAtA[i] = 0x72 - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.Leave.Size())) - n11, err := m.Leave.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - if m.Graft != nil { - dAtA[i] = 0x7a - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.Graft.Size())) - n12, err := m.Graft.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Prune != nil { - dAtA[i] = 0x82 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.Prune.Size())) - n13, err := m.Prune.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Prune.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) } - i += n13 + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + 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 } - return i, nil + 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.PeerID != nil { + i -= len(m.PeerID) + copy(dAtA[i:], m.PeerID) + i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) + i-- + dAtA[i] = 0x12 + } + if m.Type != nil { + i = encodeVarintTrace(dAtA, i, uint64(*m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *TraceEvent_PublishMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1708,41 +1748,42 @@ func (m *TraceEvent_PublishMessage) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_PublishMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_PublishMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.MessageID != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) - i += copy(dAtA[i:], m.MessageID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Topics) > 0 { - for _, s := range m.Topics { + 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-- 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.XXX_unrecognized != nil { - i += 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 } - return i, nil + return len(dAtA) - i, nil } func (m *TraceEvent_RejectMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1750,38 +1791,47 @@ func (m *TraceEvent_RejectMessage) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_RejectMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_RejectMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - 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 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.ReceivedFrom))) - i += copy(dAtA[i:], m.ReceivedFrom) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Reason != nil { - dAtA[i] = 0x1a - i++ + i -= len(*m.Reason) + copy(dAtA[i:], *m.Reason) i = encodeVarintTrace(dAtA, i, uint64(len(*m.Reason))) - i += copy(dAtA[i:], *m.Reason) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + 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 } - return i, nil + 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 + } + return len(dAtA) - i, nil } func (m *TraceEvent_DuplicateMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1789,32 +1839,40 @@ func (m *TraceEvent_DuplicateMessage) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_DuplicateMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_DuplicateMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.MessageID != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) - i += copy(dAtA[i:], m.MessageID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.ReceivedFrom != nil { - dAtA[i] = 0x12 - i++ + i -= len(m.ReceivedFrom) + copy(dAtA[i:], m.ReceivedFrom) i = encodeVarintTrace(dAtA, i, uint64(len(m.ReceivedFrom))) - i += copy(dAtA[i:], m.ReceivedFrom) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += 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 } - return i, nil + return len(dAtA) - i, nil } func (m *TraceEvent_DeliverMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1822,26 +1880,33 @@ func (m *TraceEvent_DeliverMessage) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_DeliverMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_DeliverMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.MessageID != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) - i += copy(dAtA[i:], m.MessageID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + 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 + } + return len(dAtA) - i, nil } func (m *TraceEvent_AddPeer) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1849,32 +1914,40 @@ func (m *TraceEvent_AddPeer) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_AddPeer) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_AddPeer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.PeerID != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) - i += copy(dAtA[i:], m.PeerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Proto != nil { - dAtA[i] = 0x12 - i++ + i -= len(*m.Proto) + copy(dAtA[i:], *m.Proto) i = encodeVarintTrace(dAtA, i, uint64(len(*m.Proto))) - i += copy(dAtA[i:], *m.Proto) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += 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 } - return i, nil + return len(dAtA) - i, nil } func (m *TraceEvent_RemovePeer) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1882,26 +1955,33 @@ func (m *TraceEvent_RemovePeer) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_RemovePeer) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_RemovePeer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.PeerID != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) - i += copy(dAtA[i:], m.PeerID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + 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 + } + return len(dAtA) - i, nil } func (m *TraceEvent_RecvRPC) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1909,36 +1989,45 @@ func (m *TraceEvent_RecvRPC) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_RecvRPC) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_RecvRPC) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ReceivedFrom != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.ReceivedFrom))) - i += copy(dAtA[i:], m.ReceivedFrom) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Meta != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.Meta.Size())) - n14, err := m.Meta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) } - i += n14 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + 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 } - return i, nil + return len(dAtA) - i, nil } func (m *TraceEvent_SendRPC) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1946,36 +2035,45 @@ func (m *TraceEvent_SendRPC) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_SendRPC) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_SendRPC) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.SendTo != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.SendTo))) - i += copy(dAtA[i:], m.SendTo) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Meta != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.Meta.Size())) - n15, err := m.Meta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) } - i += n15 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + 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 } - return i, nil + return len(dAtA) - i, nil } func (m *TraceEvent_DropRPC) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1983,36 +2081,45 @@ func (m *TraceEvent_DropRPC) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_DropRPC) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_DropRPC) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.SendTo != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.SendTo))) - i += copy(dAtA[i:], m.SendTo) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Meta != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.Meta.Size())) - n16, err := m.Meta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) } - i += n16 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + 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 } - return i, nil + return len(dAtA) - i, nil } func (m *TraceEvent_Join) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2020,26 +2127,33 @@ func (m *TraceEvent_Join) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_Join) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_Join) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Topic != nil { - dAtA[i] = 0xa - 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) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + 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 + } + return len(dAtA) - i, nil } func (m *TraceEvent_Leave) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2047,26 +2161,33 @@ func (m *TraceEvent_Leave) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_Leave) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_Leave) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - 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) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + 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 + } + return len(dAtA) - i, nil } func (m *TraceEvent_Graft) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2074,32 +2195,40 @@ func (m *TraceEvent_Graft) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_Graft) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_Graft) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.PeerID != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) - i += copy(dAtA[i:], m.PeerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Topic != nil { - dAtA[i] = 0x12 - i++ + i -= len(*m.Topic) + copy(dAtA[i:], *m.Topic) i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) - i += copy(dAtA[i:], *m.Topic) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += 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 } - return i, nil + return len(dAtA) - i, nil } func (m *TraceEvent_Prune) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2107,32 +2236,40 @@ func (m *TraceEvent_Prune) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_Prune) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_Prune) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.PeerID != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.PeerID))) - i += copy(dAtA[i:], m.PeerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Topic != nil { - dAtA[i] = 0x12 - i++ + i -= len(*m.Topic) + copy(dAtA[i:], *m.Topic) i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) - i += copy(dAtA[i:], *m.Topic) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += 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 } - return i, nil + return len(dAtA) - i, nil } func (m *TraceEvent_RPCMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2140,54 +2277,66 @@ func (m *TraceEvent_RPCMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_RPCMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_RPCMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - 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 += n - } - } - if len(m.Subscription) > 0 { - for _, msg := range m.Subscription { - dAtA[i] = 0x12 - 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 -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Control != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintTrace(dAtA, i, uint64(m.Control.Size())) - n17, err := m.Control.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Control.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) } - i += n17 + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + 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-- + dAtA[i] = 0x12 + } } - return i, nil + 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-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } func (m *TraceEvent_MessageMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2195,41 +2344,42 @@ func (m *TraceEvent_MessageMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_MessageMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_MessageMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.MessageID != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(m.MessageID))) - i += copy(dAtA[i:], m.MessageID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Topics) > 0 { - for _, s := range m.Topics { + 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-- 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.XXX_unrecognized != nil { - i += 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 } - return i, nil + return len(dAtA) - i, nil } func (m *TraceEvent_SubMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2237,36 +2387,43 @@ func (m *TraceEvent_SubMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_SubMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_SubMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.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 { - dAtA[i] = 0x8 - i++ + i-- if *m.Subscribe { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x8 } - 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 + return len(dAtA) - i, nil } func (m *TraceEvent_ControlMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2274,68 +2431,82 @@ func (m *TraceEvent_ControlMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_ControlMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_ControlMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - 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 += n - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Iwant) > 0 { - for _, msg := range m.Iwant { - dAtA[i] = 0x12 - i++ - i = encodeVarintTrace(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + 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)) } - i += n + i-- + dAtA[i] = 0x22 } } if len(m.Graft) > 0 { - for _, msg := range m.Graft { + 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++ - 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 + 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 += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + 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-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *TraceEvent_ControlIHaveMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2343,34 +2514,42 @@ func (m *TraceEvent_ControlIHaveMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_ControlIHaveMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_ControlIHaveMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Topic != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTrace(dAtA, i, uint64(len(*m.Topic))) - i += copy(dAtA[i:], *m.Topic) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.MessageIDs) > 0 { - for _, b := range m.MessageIDs { + 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-- 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) + 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 } - return i, nil + return len(dAtA) - i, nil } func (m *TraceEvent_ControlIWantMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2378,28 +2557,35 @@ func (m *TraceEvent_ControlIWantMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_ControlIWantMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_ControlIWantMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.MessageIDs) > 0 { - for _, b := range m.MessageIDs { + 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-- dAtA[i] = 0xa - 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 + return len(dAtA) - i, nil } func (m *TraceEvent_ControlGraftMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2407,26 +2593,33 @@ func (m *TraceEvent_ControlGraftMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_ControlGraftMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_ControlGraftMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Topic != nil { - dAtA[i] = 0xa - 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) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + 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 + } + return len(dAtA) - i, nil } func (m *TraceEvent_ControlPruneMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2434,26 +2627,33 @@ func (m *TraceEvent_ControlPruneMeta) Marshal() (dAtA []byte, err error) { } func (m *TraceEvent_ControlPruneMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEvent_ControlPruneMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Topic != nil { - dAtA[i] = 0xa - 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) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + 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 + } + return len(dAtA) - i, nil } func (m *TraceEventBatch) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2461,36 +2661,46 @@ func (m *TraceEventBatch) Marshal() (dAtA []byte, err error) { } func (m *TraceEventBatch) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceEventBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Batch) > 0 { - 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 + 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 += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - 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 offset + 1 + return base } func (m *TraceEvent) Size() (n int) { if m == nil { @@ -3012,14 +3222,7 @@ func (m *TraceEventBatch) Size() (n int) { } func sovTrace(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTrace(x uint64) (n int) { return sovTrace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -6148,6 +6351,7 @@ 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 { @@ -6179,10 +6383,8 @@ 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 { @@ -6206,52 +6408,27 @@ func skipTrace(dAtA []byte) (n int, err error) { if iNdEx < 0 { return 0, ErrInvalidLengthTrace } - return iNdEx, nil case 3: - 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 - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTrace + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthTrace = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTrace = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthTrace = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTrace = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTrace = fmt.Errorf("proto: unexpected end of group") )