MCPcopy
hub / github.com/grafana/tempo / MarshalToSizedBuffer

Method MarshalToSizedBuffer

pkg/tempopb/tempo.pb.go:4054–4106  ·  view source on GitHub ↗
(dAtA []byte)

Source from the content-addressed store, hash-verified

4052}
4053
4054func (m *TraceByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
4055 i := len(dAtA)
4056 _ = i
4057 var l int
4058 _ = l
4059 n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.RF1After, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.RF1After):])
4060 if err1 != nil {
4061 return 0, err1
4062 }
4063 i -= n1
4064 i = encodeVarintTempo(dAtA, i, uint64(n1))
4065 i--
4066 dAtA[i] = 0x3a
4067 if m.AllowPartialTrace {
4068 i--
4069 if m.AllowPartialTrace {
4070 dAtA[i] = 1
4071 } else {
4072 dAtA[i] = 0
4073 }
4074 i--
4075 dAtA[i] = 0x30
4076 }
4077 if len(m.QueryMode) > 0 {
4078 i -= len(m.QueryMode)
4079 copy(dAtA[i:], m.QueryMode)
4080 i = encodeVarintTempo(dAtA, i, uint64(len(m.QueryMode)))
4081 i--
4082 dAtA[i] = 0x2a
4083 }
4084 if len(m.BlockEnd) > 0 {
4085 i -= len(m.BlockEnd)
4086 copy(dAtA[i:], m.BlockEnd)
4087 i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockEnd)))
4088 i--
4089 dAtA[i] = 0x1a
4090 }
4091 if len(m.BlockStart) > 0 {
4092 i -= len(m.BlockStart)
4093 copy(dAtA[i:], m.BlockStart)
4094 i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockStart)))
4095 i--
4096 dAtA[i] = 0x12
4097 }
4098 if len(m.TraceID) > 0 {
4099 i -= len(m.TraceID)
4100 copy(dAtA[i:], m.TraceID)
4101 i = encodeVarintTempo(dAtA, i, uint64(len(m.TraceID)))
4102 i--
4103 dAtA[i] = 0xa
4104 }
4105 return len(dAtA) - i, nil
4106}
4107
4108func (m *TraceByIDResponse) Marshal() (dAtA []byte, err error) {
4109 size := m.Size()

Callers 3

XXX_MarshalMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 1

encodeVarintTempoFunction · 0.85

Tested by

no test coverage detected