summaryrefslogtreecommitdiff
path: root/lib/lsg/icecast_agent.ex
diff options
context:
space:
mode:
authorhref <href@random.sh>2018-01-31 20:36:42 +0100
committerhref <href@random.sh>2018-01-31 20:36:42 +0100
commitfcb2a082346054108f3f16cffe968450cf961976 (patch)
tree8e7d2eb9eeebf854e62e08c29b147f34dfeb1881 /lib/lsg/icecast_agent.ex
import
Diffstat (limited to 'lib/lsg/icecast_agent.ex')
-rw-r--r--lib/lsg/icecast_agent.ex17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/lsg/icecast_agent.ex b/lib/lsg/icecast_agent.ex
new file mode 100644
index 0000000..8f8a86a
--- /dev/null
+++ b/lib/lsg/icecast_agent.ex
@@ -0,0 +1,17 @@
+defmodule LSG.IcecastAgent do
+ use Agent
+
+ def start_link() do
+ Agent.start_link(fn -> nil end, name: __MODULE__)
+ end
+
+ def update(stats) do
+ Agent.update(__MODULE__, fn(_old) -> stats end)
+ end
+
+ def get do
+ Agent.get(__MODULE__, fn(stats) -> stats end)
+ end
+
+end
+