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

Function setPRW2RespHeader

pkg/util/push/push.go:202–206  ·  view source on GitHub ↗
(w http.ResponseWriter, samples, histograms, exemplars int64)

Source from the content-addressed store, hash-verified

200}
201
202func setPRW2RespHeader(w http.ResponseWriter, samples, histograms, exemplars int64) {
203 w.Header().Set(rw20WrittenSamplesHeader, strconv.FormatInt(samples, 10))
204 w.Header().Set(rw20WrittenHistogramsHeader, strconv.FormatInt(histograms, 10))
205 w.Header().Set(rw20WrittenExemplarsHeader, strconv.FormatInt(exemplars, 10))
206}
207
208func convertV2RequestToV1(req *cortexpb.PreallocWriteRequestV2, enableTypeAndUnitLabels bool) (cortexpb.PreallocWriteRequest, error) {
209 var v1Req cortexpb.PreallocWriteRequest

Callers 1

HandlerFunction · 0.85

Calls 2

SetMethod · 0.65
HeaderMethod · 0.45

Tested by

no test coverage detected