# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1591905774 -7200
# Node ID 0c072dd69603b911ae8965b1949169a4bbafc3ed
# Parent  dff1aebd0f2bcd50fb9bcb2b332bd34e2eb832ae
util.statsd: Update for API change

See change d75d805c852f to util.statistics

diff -r dff1aebd0f2b -r 0c072dd69603 util/statsd.lua
--- a/util/statsd.lua	Wed Jun 10 13:15:57 2020 -0500
+++ b/util/statsd.lua	Thu Jun 11 22:02:54 2020 +0200
@@ -38,13 +38,13 @@
 
 	local methods;
 	methods = {
-		amount = function (name, initial)
-			if initial then
-				send_gauge(name, initial);
+		amount = function (name, conf)
+			if conf and conf.initial then
+				send_gauge(name, conf.initial);
 			end
 			return function (new_v) send_gauge(name, new_v); end
 		end;
-		counter = function (name, initial) --luacheck: ignore 212/initial
+		counter = function (name, conf) --luacheck: ignore 212/conf
 			return function (delta)
 				send_gauge(name, delta, true);
 			end;
@@ -54,7 +54,7 @@
 				send_counter(name, 1);
 			end;
 		end;
-		distribution = function (name, unit, type) --luacheck: ignore 212/unit 212/type
+		distribution = function (name, conf) --luacheck: ignore 212/conf
 			return function (value)
 				send_histogram_sample(name, value);
 			end;