diff options
Diffstat (limited to 'lib/nola/icecast_agent.ex')
-rw-r--r-- | lib/nola/icecast_agent.ex | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/nola/icecast_agent.ex b/lib/nola/icecast_agent.ex new file mode 100644 index 0000000..8a3a72b --- /dev/null +++ b/lib/nola/icecast_agent.ex @@ -0,0 +1,17 @@ +defmodule Nola.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 + |