fix: add buckets_set function to interface

main
Jef Roosens 2023-01-28 17:32:57 +01:00
parent bf1385ee6d
commit ae2eeeb974
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
3 changed files with 4 additions and 1 deletions

View File

@ -23,6 +23,7 @@ pub interface MetricsCollector {
mut: mut:
counter_set(val u64, metric Metric) counter_set(val u64, metric Metric)
counter_increment(metric Metric) counter_increment(metric Metric)
histogram_buckets_set(name string, buckets []f64)
histogram_record(value f64, metric Metric) histogram_record(value f64, metric Metric)
gauge_set(value f64, metric Metric) gauge_set(value f64, metric Metric)
gauge_add(value f64, metric Metric) gauge_add(value f64, metric Metric)

2
null.v
View File

@ -19,6 +19,8 @@ pub fn (c &NullCollector) counters() []Metric {
return [] return []
} }
pub fn (mut c DefaultCollector) histogram_buckets_set(name string, buckets []f64) {}
pub fn (c &NullCollector) histogram_record(value f64, metric Metric) {} pub fn (c &NullCollector) histogram_record(value f64, metric Metric) {}
pub fn (c &NullCollector) histogram_get(metric Metric) ?Histogram { pub fn (c &NullCollector) histogram_get(metric Metric) ?Histogram {