comparison mod_statsd/mod_statsd.lua @ 2875:c3a039972b74

mod_statsd: Fix typo in comment [codespell]
author Kim Alvefur <zash@zash.se>
date Sun, 04 Feb 2018 16:01:37 +0100
parents 26c68a5f432f
children
comparison
equal deleted inserted replaced
2874:178b8abf8283 2875:c3a039972b74
13 13
14 -- Create UDP socket to statsd server 14 -- Create UDP socket to statsd server
15 local sock = socket.udp() 15 local sock = socket.udp()
16 sock:setpeername(options.hostname or "127.0.0.1", options.port or 8125) 16 sock:setpeername(options.hostname or "127.0.0.1", options.port or 8125)
17 17
18 -- Metrics are namespaced by ".", and seperated by newline 18 -- Metrics are namespaced by ".", and separated by newline
19 function clean(s) return (s:gsub("[%.:\n]", "_")) end 19 function clean(s) return (s:gsub("[%.:\n]", "_")) end
20 20
21 -- A 'safer' send function to expose 21 -- A 'safer' send function to expose
22 function send(s) return sock:send(s) end 22 function send(s) return sock:send(s) end
23 23