MCPcopy Create free account
hub / github.com/cortexproject/cortex / MarshalToSizedBuffer

Method MarshalToSizedBuffer

pkg/cortexpb/cortex.pb.go:3510–3526  ·  view source on GitHub ↗
(dAtA []byte)

Source from the content-addressed store, hash-verified

3508}
3509
3510func (m *BucketSpan) MarshalToSizedBuffer(dAtA []byte) (int, error) {
3511 i := len(dAtA)
3512 _ = i
3513 var l int
3514 _ = l
3515 if m.Length != 0 {
3516 i = encodeVarintCortex(dAtA, i, uint64(m.Length))
3517 i--
3518 dAtA[i] = 0x10
3519 }
3520 if m.Offset != 0 {
3521 i = encodeVarintCortex(dAtA, i, uint64((uint32(m.Offset)<<1)^uint32((m.Offset>>31))))
3522 i--
3523 dAtA[i] = 0x8
3524 }
3525 return len(dAtA) - i, nil
3526}
3527
3528func encodeVarintCortex(dAtA []byte, offset int, v uint64) int {
3529 offset -= sovCortex(v)

Callers 3

XXX_MarshalMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 1

encodeVarintCortexFunction · 0.85

Tested by

no test coverage detected