From 353fdc7893dd739f3d7b057f4fd3e13f45915b74 Mon Sep 17 00:00:00 2001 From: Annanay Date: Tue, 26 Mar 2019 18:53:23 +0530 Subject: [PATCH] Install the right proto bin versions Signed-off-by: Annanay --- model/model.pb.go | 193 ++++++++++++++++++++++++------- model/prototest/model_test.pb.go | 27 ++--- proto-gen/api_v2/collector.pb.go | 23 +++- proto-gen/api_v2/sampling.pb.go | 77 +++++++++--- 4 files changed, 243 insertions(+), 77 deletions(-) diff --git a/model/model.pb.go b/model/model.pb.go index 31b5cfc32a6..48005005910 100644 --- a/model/model.pb.go +++ b/model/model.pb.go @@ -1551,7 +1551,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1579,7 +1579,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1589,6 +1589,9 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1608,7 +1611,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VType |= (ValueType(b) & 0x7F) << shift + m.VType |= ValueType(b&0x7F) << shift if b < 0x80 { break } @@ -1627,7 +1630,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1637,6 +1640,9 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1656,7 +1662,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1676,7 +1682,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VInt64 |= (int64(b) & 0x7F) << shift + m.VInt64 |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1706,7 +1712,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1715,6 +1721,9 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1732,6 +1741,9 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1760,7 +1772,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1788,7 +1800,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1797,6 +1809,9 @@ func (m *Log) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1818,7 +1833,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1827,6 +1842,9 @@ func (m *Log) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1844,6 +1862,9 @@ func (m *Log) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1872,7 +1893,7 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1900,7 +1921,7 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1909,6 +1930,9 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1930,7 +1954,7 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1939,6 +1963,9 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1960,7 +1987,7 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RefType |= (SpanRefType(b) & 0x7F) << shift + m.RefType |= SpanRefType(b&0x7F) << shift if b < 0x80 { break } @@ -1974,6 +2001,9 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2002,7 +2032,7 @@ func (m *Process) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2030,7 +2060,7 @@ func (m *Process) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2040,6 +2070,9 @@ func (m *Process) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2059,7 +2092,7 @@ func (m *Process) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2068,6 +2101,9 @@ func (m *Process) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2085,6 +2121,9 @@ func (m *Process) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2113,7 +2152,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2141,7 +2180,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2150,6 +2189,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2171,7 +2213,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2180,6 +2222,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2201,7 +2246,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2211,6 +2256,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2230,7 +2278,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2239,6 +2287,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2261,7 +2312,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Flags |= (Flags(b) & 0x7F) << shift + m.Flags |= Flags(b&0x7F) << shift if b < 0x80 { break } @@ -2280,7 +2331,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2289,6 +2340,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2310,7 +2364,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2319,6 +2373,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2340,7 +2397,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2349,6 +2406,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2371,7 +2431,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2380,6 +2440,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2402,7 +2465,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2411,6 +2474,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2435,7 +2501,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2445,6 +2511,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2464,7 +2533,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2474,6 +2543,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2488,6 +2560,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2516,7 +2591,7 @@ func (m *Trace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2544,7 +2619,7 @@ func (m *Trace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2553,6 +2628,9 @@ func (m *Trace) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2575,7 +2653,7 @@ func (m *Trace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2584,6 +2662,9 @@ func (m *Trace) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2606,7 +2687,7 @@ func (m *Trace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2616,6 +2697,9 @@ func (m *Trace) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2630,6 +2714,9 @@ func (m *Trace) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2658,7 +2745,7 @@ func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2686,7 +2773,7 @@ func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2696,6 +2783,9 @@ func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2715,7 +2805,7 @@ func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2724,6 +2814,9 @@ func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2740,6 +2833,9 @@ func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2768,7 +2864,7 @@ func (m *Batch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2796,7 +2892,7 @@ func (m *Batch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2805,6 +2901,9 @@ func (m *Batch) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2827,7 +2926,7 @@ func (m *Batch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2836,6 +2935,9 @@ func (m *Batch) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2855,6 +2957,9 @@ func (m *Batch) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2922,10 +3027,13 @@ func skipModel(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthModel } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthModel + } return iNdEx, nil case 3: for { @@ -2954,6 +3062,9 @@ func skipModel(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthModel + } } return iNdEx, nil case 4: diff --git a/model/prototest/model_test.pb.go b/model/prototest/model_test.pb.go index 875c6f03cf2..a4c7ea3b120 100644 --- a/model/prototest/model_test.pb.go +++ b/model/prototest/model_test.pb.go @@ -3,11 +3,9 @@ package prototest -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -18,7 +16,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type SpanRefType int32 @@ -31,7 +29,6 @@ var SpanRefType_name = map[int32]string{ 0: "CHILD_OF", 1: "FOLLOWS_FROM", } - var SpanRefType_value = map[string]int32{ "CHILD_OF": 0, "FOLLOWS_FROM": 1, @@ -40,9 +37,8 @@ var SpanRefType_value = map[string]int32{ func (x SpanRefType) String() string { return proto.EnumName(SpanRefType_name, int32(x)) } - func (SpanRefType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_7d019f60590a05da, []int{0} + return fileDescriptor_model_test_74918b92027939ce, []int{0} } type SpanRef struct { @@ -58,17 +54,16 @@ func (m *SpanRef) Reset() { *m = SpanRef{} } func (m *SpanRef) String() string { return proto.CompactTextString(m) } func (*SpanRef) ProtoMessage() {} func (*SpanRef) Descriptor() ([]byte, []int) { - return fileDescriptor_7d019f60590a05da, []int{0} + return fileDescriptor_model_test_74918b92027939ce, []int{0} } - func (m *SpanRef) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SpanRef.Unmarshal(m, b) } func (m *SpanRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_SpanRef.Marshal(b, m, deterministic) } -func (m *SpanRef) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpanRef.Merge(m, src) +func (dst *SpanRef) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpanRef.Merge(dst, src) } func (m *SpanRef) XXX_Size() int { return xxx_messageInfo_SpanRef.Size(m) @@ -101,13 +96,13 @@ func (m *SpanRef) GetRefType() SpanRefType { } func init() { - proto.RegisterEnum("prototest.SpanRefType", SpanRefType_name, SpanRefType_value) proto.RegisterType((*SpanRef)(nil), "prototest.SpanRef") + proto.RegisterEnum("prototest.SpanRefType", SpanRefType_name, SpanRefType_value) } -func init() { proto.RegisterFile("model_test.proto", fileDescriptor_7d019f60590a05da) } +func init() { proto.RegisterFile("model_test.proto", fileDescriptor_model_test_74918b92027939ce) } -var fileDescriptor_7d019f60590a05da = []byte{ +var fileDescriptor_model_test_74918b92027939ce = []byte{ // 178 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc8, 0xcd, 0x4f, 0x49, 0xcd, 0x89, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x04, 0x53, diff --git a/proto-gen/api_v2/collector.pb.go b/proto-gen/api_v2/collector.pb.go index 6ef1708bd2d..7aad7a6247f 100644 --- a/proto-gen/api_v2/collector.pb.go +++ b/proto-gen/api_v2/collector.pb.go @@ -335,7 +335,7 @@ func (m *PostSpansRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -363,7 +363,7 @@ func (m *PostSpansRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -372,6 +372,9 @@ func (m *PostSpansRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthCollector } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCollector + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -388,6 +391,9 @@ func (m *PostSpansRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthCollector } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCollector + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -416,7 +422,7 @@ func (m *PostSpansResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -439,6 +445,9 @@ func (m *PostSpansResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthCollector } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthCollector + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -506,10 +515,13 @@ func skipCollector(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthCollector } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthCollector + } return iNdEx, nil case 3: for { @@ -538,6 +550,9 @@ func skipCollector(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthCollector + } } return iNdEx, nil case 4: diff --git a/proto-gen/api_v2/sampling.pb.go b/proto-gen/api_v2/sampling.pb.go index deb0f9f2ace..8f40c58c7a4 100644 --- a/proto-gen/api_v2/sampling.pb.go +++ b/proto-gen/api_v2/sampling.pb.go @@ -909,7 +909,7 @@ func (m *ProbabilisticSamplingStrategy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -943,6 +943,9 @@ func (m *ProbabilisticSamplingStrategy) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthSampling } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthSampling + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -971,7 +974,7 @@ func (m *RateLimitingSamplingStrategy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -999,7 +1002,7 @@ func (m *RateLimitingSamplingStrategy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MaxTracesPerSecond |= (int32(b) & 0x7F) << shift + m.MaxTracesPerSecond |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -1013,6 +1016,9 @@ func (m *RateLimitingSamplingStrategy) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthSampling } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthSampling + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1041,7 +1047,7 @@ func (m *OperationSamplingStrategy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1069,7 +1075,7 @@ func (m *OperationSamplingStrategy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1079,6 +1085,9 @@ func (m *OperationSamplingStrategy) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSampling } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1098,7 +1107,7 @@ func (m *OperationSamplingStrategy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1107,6 +1116,9 @@ func (m *OperationSamplingStrategy) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSampling } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1126,6 +1138,9 @@ func (m *OperationSamplingStrategy) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthSampling } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthSampling + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1154,7 +1169,7 @@ func (m *PerOperationSamplingStrategies) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1204,7 +1219,7 @@ func (m *PerOperationSamplingStrategies) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1213,6 +1228,9 @@ func (m *PerOperationSamplingStrategies) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSampling } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1241,6 +1259,9 @@ func (m *PerOperationSamplingStrategies) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthSampling } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthSampling + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1269,7 +1290,7 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1297,7 +1318,7 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StrategyType |= (SamplingStrategyType(b) & 0x7F) << shift + m.StrategyType |= SamplingStrategyType(b&0x7F) << shift if b < 0x80 { break } @@ -1316,7 +1337,7 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1325,6 +1346,9 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSampling } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1349,7 +1373,7 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1358,6 +1382,9 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSampling } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1382,7 +1409,7 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1391,6 +1418,9 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSampling } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1410,6 +1440,9 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthSampling } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthSampling + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1438,7 +1471,7 @@ func (m *SamplingStrategyParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1466,7 +1499,7 @@ func (m *SamplingStrategyParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1476,6 +1509,9 @@ func (m *SamplingStrategyParameters) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSampling } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1490,6 +1526,9 @@ func (m *SamplingStrategyParameters) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthSampling } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthSampling + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1557,10 +1596,13 @@ func skipSampling(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthSampling } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthSampling + } return iNdEx, nil case 3: for { @@ -1589,6 +1631,9 @@ func skipSampling(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthSampling + } } return iNdEx, nil case 4: