diff options
Diffstat (limited to 'lib/lsg/icecast_agent.ex')
-rw-r--r-- | lib/lsg/icecast_agent.ex | 17 |
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 + |