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

Method Marshal

pkg/cortexpb/timeseries.go:119–127  ·  view source on GitHub ↗

Marshal implements proto.Marshaller.

()

Source from the content-addressed store, hash-verified

117
118// Marshal implements proto.Marshaller.
119func (bs *LabelAdapter) Marshal() ([]byte, error) {
120 size := bs.Size()
121 buf := make([]byte, size)
122 n, err := bs.MarshalToSizedBuffer(buf[:size])
123 if err != nil {
124 return nil, err
125 }
126 return buf[:n], err
127}
128
129func (bs *LabelAdapter) MarshalTo(dAtA []byte) (int, error) {
130 size := bs.Size()

Callers

nothing calls this directly

Calls 2

SizeMethod · 0.95
MarshalToSizedBufferMethod · 0.95

Tested by

no test coverage detected