mirror of
https://github.com/openfaas/faas.git
synced 2025-06-23 15:23:29 +00:00
Update vendor
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
24
gateway/vendor/github.com/prometheus/common/expfmt/encode.go
generated
vendored
24
gateway/vendor/github.com/prometheus/common/expfmt/encode.go
generated
vendored
@ -77,18 +77,18 @@ func Negotiate(h http.Header) Format {
|
||||
if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol {
|
||||
switch ac.Params["encoding"] {
|
||||
case "delimited":
|
||||
return fmtProtoDelim + escapingScheme
|
||||
return FmtProtoDelim + escapingScheme
|
||||
case "text":
|
||||
return fmtProtoText + escapingScheme
|
||||
return FmtProtoText + escapingScheme
|
||||
case "compact-text":
|
||||
return fmtProtoCompact + escapingScheme
|
||||
return FmtProtoCompact + escapingScheme
|
||||
}
|
||||
}
|
||||
if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") {
|
||||
return fmtText + escapingScheme
|
||||
return FmtText + escapingScheme
|
||||
}
|
||||
}
|
||||
return fmtText + escapingScheme
|
||||
return FmtText + escapingScheme
|
||||
}
|
||||
|
||||
// NegotiateIncludingOpenMetrics works like Negotiate but includes
|
||||
@ -110,26 +110,26 @@ func NegotiateIncludingOpenMetrics(h http.Header) Format {
|
||||
if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol {
|
||||
switch ac.Params["encoding"] {
|
||||
case "delimited":
|
||||
return fmtProtoDelim + escapingScheme
|
||||
return FmtProtoDelim + escapingScheme
|
||||
case "text":
|
||||
return fmtProtoText + escapingScheme
|
||||
return FmtProtoText + escapingScheme
|
||||
case "compact-text":
|
||||
return fmtProtoCompact + escapingScheme
|
||||
return FmtProtoCompact + escapingScheme
|
||||
}
|
||||
}
|
||||
if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") {
|
||||
return fmtText + escapingScheme
|
||||
return FmtText + escapingScheme
|
||||
}
|
||||
if ac.Type+"/"+ac.SubType == OpenMetricsType && (ver == OpenMetricsVersion_0_0_1 || ver == OpenMetricsVersion_1_0_0 || ver == "") {
|
||||
switch ver {
|
||||
case OpenMetricsVersion_1_0_0:
|
||||
return fmtOpenMetrics_1_0_0 + escapingScheme
|
||||
return FmtOpenMetrics_1_0_0 + escapingScheme
|
||||
default:
|
||||
return fmtOpenMetrics_0_0_1 + escapingScheme
|
||||
return FmtOpenMetrics_0_0_1 + escapingScheme
|
||||
}
|
||||
}
|
||||
}
|
||||
return fmtText + escapingScheme
|
||||
return FmtText + escapingScheme
|
||||
}
|
||||
|
||||
// NewEncoder returns a new encoder based on content type negotiation. All
|
||||
|
Reference in New Issue
Block a user