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

Method MarshalToSizedBuffer

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

Source from the content-addressed store, hash-verified

2870}
2871
2872func (m *MetadataV2) MarshalToSizedBuffer(dAtA []byte) (int, error) {
2873 i := len(dAtA)
2874 _ = i
2875 var l int
2876 _ = l
2877 if m.UnitRef != 0 {
2878 i = encodeVarintCortex(dAtA, i, uint64(m.UnitRef))
2879 i--
2880 dAtA[i] = 0x20
2881 }
2882 if m.HelpRef != 0 {
2883 i = encodeVarintCortex(dAtA, i, uint64(m.HelpRef))
2884 i--
2885 dAtA[i] = 0x18
2886 }
2887 if m.Type != 0 {
2888 i = encodeVarintCortex(dAtA, i, uint64(m.Type))
2889 i--
2890 dAtA[i] = 0x8
2891 }
2892 return len(dAtA) - i, nil
2893}
2894
2895func (m *StreamWriteRequest) Marshal() (dAtA []byte, err error) {
2896 size := m.Size()

Callers 3

XXX_MarshalMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 1

encodeVarintCortexFunction · 0.85

Tested by

no test coverage detected