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

Method MarshalToSizedBuffer

pkg/ingester/client/ingester.pb.go:4436–4464  ·  view source on GitHub ↗
(dAtA []byte)

Source from the content-addressed store, hash-verified

4434}
4435
4436func (m *Chunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
4437 i := len(dAtA)
4438 _ = i
4439 var l int
4440 _ = l
4441 if len(m.Data) > 0 {
4442 i -= len(m.Data)
4443 copy(dAtA[i:], m.Data)
4444 i = encodeVarintIngester(dAtA, i, uint64(len(m.Data)))
4445 i--
4446 dAtA[i] = 0x22
4447 }
4448 if m.Encoding != 0 {
4449 i = encodeVarintIngester(dAtA, i, uint64(m.Encoding))
4450 i--
4451 dAtA[i] = 0x18
4452 }
4453 if m.EndTimestampMs != 0 {
4454 i = encodeVarintIngester(dAtA, i, uint64(m.EndTimestampMs))
4455 i--
4456 dAtA[i] = 0x10
4457 }
4458 if m.StartTimestampMs != 0 {
4459 i = encodeVarintIngester(dAtA, i, uint64(m.StartTimestampMs))
4460 i--
4461 dAtA[i] = 0x8
4462 }
4463 return len(dAtA) - i, nil
4464}
4465
4466func (m *LabelMatchers) Marshal() (dAtA []byte, err error) {
4467 size := m.Size()

Callers 3

XXX_MarshalMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 1

encodeVarintIngesterFunction · 0.85

Tested by

no test coverage detected