Software /
code /
prosody
Comparison
util/openmetrics.lua @ 12590:5eaf77114fdb
compat: Use table.pack (there since Lua 5.2) over our util.table
Added in d278a770eddc avoid having to deal with its absence in Lua 5.1.
No longer needed when Lua 5.1 support is dropped.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 11 Jul 2022 19:15:24 +0200 |
parent | 12589:39ae08180c81 |
child | 12817:176fd3ea505c |
comparison
equal
deleted
inserted
replaced
12589:39ae08180c81 | 12590:5eaf77114fdb |
---|---|
24 local array = require "util.array"; | 24 local array = require "util.array"; |
25 local log = require "util.logger".init("util.openmetrics"); | 25 local log = require "util.logger".init("util.openmetrics"); |
26 local new_multitable = require "util.multitable".new; | 26 local new_multitable = require "util.multitable".new; |
27 local iter_multitable = require "util.multitable".iter; | 27 local iter_multitable = require "util.multitable".iter; |
28 local t_concat, t_insert = table.concat, table.insert; | 28 local t_concat, t_insert = table.concat, table.insert; |
29 local t_pack, t_unpack = require "util.table".pack, table.unpack; | 29 local t_pack, t_unpack = table.pack, table.unpack; |
30 | 30 |
31 -- BEGIN of Utility: "metric proxy" | 31 -- BEGIN of Utility: "metric proxy" |
32 -- This allows to wrap a MetricFamily in a proxy which only provides the | 32 -- This allows to wrap a MetricFamily in a proxy which only provides the |
33 -- `with_labels` and `with_partial_label` methods. This allows to pre-set one | 33 -- `with_labels` and `with_partial_label` methods. This allows to pre-set one |
34 -- or more labels on a metric family. This is used in particular via | 34 -- or more labels on a metric family. This is used in particular via |