@@ -32,22 +32,30 @@ type Format string
32
32
// it on the wire, new content-type strings will have to be agreed upon and
33
33
// added here.
34
34
const (
35
- TextVersion = "0.0.4"
36
- ProtoType = `application/vnd.google.protobuf`
37
- ProtoProtocol = `io.prometheus.client.MetricFamily`
35
+ TextVersion = "0.0.4"
36
+ ProtoType = `application/vnd.google.protobuf`
37
+ ProtoProtocol = `io.prometheus.client.MetricFamily`
38
+ // Deprecated: Use expfmt.NewFormat(expfmt.TypeProtoCompact) instead.
38
39
ProtoFmt = ProtoType + "; proto=" + ProtoProtocol + ";"
39
40
OpenMetricsType = `application/openmetrics-text`
40
41
OpenMetricsVersion_0_0_1 = "0.0.1"
41
42
OpenMetricsVersion_1_0_0 = "1.0.0"
42
43
43
44
// The Content-Type values for the different wire protocols. Do not do direct
44
45
// comparisons to these constants, instead use the comparison functions.
45
- FmtUnknown Format = `<unknown>`
46
- FmtText Format = `text/plain; version=` + TextVersion + `; charset=utf-8`
47
- FmtProtoDelim Format = ProtoFmt + ` encoding=delimited`
48
- FmtProtoText Format = ProtoFmt + ` encoding=text`
49
- FmtProtoCompact Format = ProtoFmt + ` encoding=compact-text`
46
+ // Deprecated: Use expfmt.NewFormat(expfmt.TypeUnknown) instead.
47
+ FmtUnknown Format = `<unknown>`
48
+ // Deprecated: Use expfmt.NewFormat(expfmt.TypeTextPlain) instead.
49
+ FmtText Format = `text/plain; version=` + TextVersion + `; charset=utf-8`
50
+ // Deprecated: Use expfmt.NewFormat(expfmt.TypeProtoDelim) instead.
51
+ FmtProtoDelim Format = ProtoFmt + ` encoding=delimited`
52
+ // Deprecated: Use expfmt.NewFormat(expfmt.TypeProtoText) instead.
53
+ FmtProtoText Format = ProtoFmt + ` encoding=text`
54
+ // Deprecated: Use expfmt.NewFormat(expfmt.TypeProtoCompact) instead.
55
+ FmtProtoCompact Format = ProtoFmt + ` encoding=compact-text`
56
+ // Deprecated: Use expfmt.NewFormat(expfmt.TypeOpenMetrics) instead.
50
57
FmtOpenMetrics_1_0_0 Format = OpenMetricsType + `; version=` + OpenMetricsVersion_1_0_0 + `; charset=utf-8`
58
+ // Deprecated: Use expfmt.NewFormat(expfmt.TypeOpenMetrics) instead.
51
59
FmtOpenMetrics_0_0_1 Format = OpenMetricsType + `; version=` + OpenMetricsVersion_0_0_1 + `; charset=utf-8`
52
60
)
53
61
0 commit comments