kubernetes/vendor/github.com/prometheus/common/expfmt/decode.go

type Decoder

type DecodeOptions

// ResponseFormat extracts the correct format from a HTTP response header.
// If no matching format can be found FormatUnknown is returned.
func ResponseFormat(h http.Header) Format {}

// NewDecoder returns a new decoder based on the given input format.
// If the input format does not imply otherwise, a text format decoder is returned.
func NewDecoder(r io.Reader, format Format) Decoder {}

type protoDecoder

// Decode implements the Decoder interface.
func (d *protoDecoder) Decode(v *dto.MetricFamily) error {}

type textDecoder

// Decode implements the Decoder interface.
func (d *textDecoder) Decode(v *dto.MetricFamily) error {}

type SampleDecoder

// Decode calls the Decode method of the wrapped Decoder and then extracts the
// samples from the decoded MetricFamily into the provided model.Vector.
func (sd *SampleDecoder) Decode(s *model.Vector) error {}

// ExtractSamples builds a slice of samples from the provided metric
// families. If an error occurs during sample extraction, it continues to
// extract from the remaining metric families. The returned error is the last
// error that has occurred.
func ExtractSamples(o *DecodeOptions, fams ...*dto.MetricFamily) (model.Vector, error) {}

func extractSamples(f *dto.MetricFamily, o *DecodeOptions) (model.Vector, error) {}

func extractCounter(o *DecodeOptions, f *dto.MetricFamily) model.Vector {}

func extractGauge(o *DecodeOptions, f *dto.MetricFamily) model.Vector {}

func extractUntyped(o *DecodeOptions, f *dto.MetricFamily) model.Vector {}

func extractSummary(o *DecodeOptions, f *dto.MetricFamily) model.Vector {}

func extractHistogram(o *DecodeOptions, f *dto.MetricFamily) model.Vector {}