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

Method MarshalJSON

pkg/querier/tripperware/query.go:758–768  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

756}
757
758func (s *PrometheusResponseStats) MarshalJSON() ([]byte, error) {
759 stats := struct {
760 Samples *PrometheusResponseSamplesStats `json:"samples"`
761 }{
762 Samples: s.Samples,
763 }
764 if s.Samples.TotalQueryableSamplesPerStep == nil {
765 s.Samples.TotalQueryableSamplesPerStep = []*PrometheusResponseQueryableSamplesStatsPerStep{}
766 }
767 return json.Marshal(stats)
768}
769
770func SetRequestHeaders(h http.Header, defaultCodecType CodecType, compression Compression) {
771 switch compression {

Callers

nothing calls this directly

Calls 1

MarshalMethod · 0.45

Tested by

no test coverage detected