Skip to content

Commit c5b6fd8

Browse files
committed
Make types constants
1 parent dd7db34 commit c5b6fd8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Sources/Prometheus/MetricTypes/Counter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public class Counter<NumType: Numeric, Labels: MetricLabels>: Metric, Prometheus
44
public let name: String
55
public let help: String?
66

7-
public var _type: MetricType = .counter
7+
public let _type: MetricType = .counter
88

99
internal var value: NumType
1010

Sources/Prometheus/MetricTypes/Gauge.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public class Gauge<NumType: Numeric, Labels: MetricLabels>: Metric, PrometheusHa
44
public let name: String
55
public let help: String?
66

7-
public var _type: MetricType = .gauge
7+
public let _type: MetricType = .gauge
88

99
private var value: NumType
1010

Sources/Prometheus/MetricTypes/Histogram.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class Histogram<NumType: DoubleRepresentable, Labels: HistogramLabels>: M
1717
public let name: String
1818
public let help: String?
1919

20-
public var _type: MetricType = .histogram
20+
public let _type: MetricType = .histogram
2121

2222
private var buckets: [Counter<NumType, EmptyCodable>] = []
2323

Sources/Prometheus/MetricTypes/Summary.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class Summary<NumType: DoubleRepresentable, Labels: SummaryLabels>: Metri
1717
public let name: String
1818
public let help: String?
1919

20-
public var _type: MetricType = .summary
20+
public let _type: MetricType = .summary
2121

2222
internal private(set) var labels: Labels
2323

0 commit comments

Comments
 (0)