Current section
Files
Jump to
Current section
Files
lib/gen_timer/pub_sub.ex
defmodule GenTimer.PubSub do
def subscribe(topic) do
Phoenix.PubSub.subscribe(__MODULE__, topic)
end
def broadcast(topic, message) do
Phoenix.PubSub.broadcast(__MODULE__, topic, message)
end
def unsubscribe(topic) do
Phoenix.PubSub.unsubscribe(__MODULE__, topic)
end
end