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

Method MarshalToSizedBuffer

tempodb/backend/v1.pb.go:346–448  ·  view source on GitHub ↗
(dAtA []byte)

Source from the content-addressed store, hash-verified

344}
345
346func (m *BlockMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) {
347 i := len(dAtA)
348 _ = i
349 var l int
350 _ = l
351 if m.ReplicationFactor != 0 {
352 i = encodeVarintV1(dAtA, i, uint64(m.ReplicationFactor))
353 i--
354 dAtA[i] = 0x1
355 i--
356 dAtA[i] = 0x90
357 }
358 {
359 size := m.DedicatedColumns.Size()
360 i -= size
361 if _, err := m.DedicatedColumns.MarshalTo(dAtA[i:]); err != nil {
362 return 0, err
363 }
364 i = encodeVarintV1(dAtA, i, uint64(size))
365 }
366 i--
367 dAtA[i] = 0x1
368 i--
369 dAtA[i] = 0x8a
370 if m.FooterSize != 0 {
371 i = encodeVarintV1(dAtA, i, uint64(m.FooterSize))
372 i--
373 dAtA[i] = 0x1
374 i--
375 dAtA[i] = 0x80
376 }
377 if m.BloomShardCount != 0 {
378 i = encodeVarintV1(dAtA, i, uint64(m.BloomShardCount))
379 i--
380 dAtA[i] = 0x78
381 }
382 if m.TotalRecords != 0 {
383 i = encodeVarintV1(dAtA, i, uint64(m.TotalRecords))
384 i--
385 dAtA[i] = 0x68
386 }
387 if m.IndexPageSize != 0 {
388 i = encodeVarintV1(dAtA, i, uint64(m.IndexPageSize))
389 i--
390 dAtA[i] = 0x60
391 }
392 if m.CompactionLevel != 0 {
393 i = encodeVarintV1(dAtA, i, uint64(m.CompactionLevel))
394 i--
395 dAtA[i] = 0x50
396 }
397 if m.Size_ != 0 {
398 i = encodeVarintV1(dAtA, i, uint64(m.Size_))
399 i--
400 dAtA[i] = 0x48
401 }
402 if m.TotalObjects != 0 {
403 i = encodeVarintV1(dAtA, i, uint64(m.TotalObjects))

Callers 6

XXX_MarshalMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95
eventToParquetFunction · 0.45
MarshalToSizedBufferMethod · 0.45
MarshalToSizedBufferMethod · 0.45

Calls 3

encodeVarintV1Function · 0.85
SizeMethod · 0.65
MarshalToMethod · 0.65

Tested by

no test coverage detected