From fcb2a082346054108f3f16cffe968450cf961976 Mon Sep 17 00:00:00 2001 From: href Date: Wed, 31 Jan 2018 20:36:42 +0100 Subject: import --- lib/lsg/icecast_agent.ex | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/lsg/icecast_agent.ex (limited to 'lib/lsg/icecast_agent.ex') 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 + -- cgit v1.2.3