MCPcopy Create free account
hub / github.com/prometheus/common / Decode

Method Decode

expfmt/decode.go:210–219  ·  view source on GitHub ↗

Decode implements the Decoder interface.

(v *dto.MetricFamily)

Source from the content-addressed store, hash-verified

208
209// Decode implements the Decoder interface.
210func (d *openMetrics20Decoder) Decode(v *dto.MetricFamily) error {
211 if d.err != nil {
212 return d.err
213 }
214 if err := d.p.next(v); err != nil {
215 d.err = err
216 return err
217 }
218 return nil
219}
220
221// textDecoder implements the Decoder interface for the text protocol.
222type textDecoder struct {

Callers

nothing calls this directly

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected