dotfiles/app/lib/prymn/messaging.ex

12 lines
272 B
Elixir
Raw Normal View History

2024-02-01 15:34:26 +00:00
defmodule Prymn.Messaging do
@moduledoc """
The Prymn messaging system
"""
def agent_health_topic(agent_id), do: "health.#{agent_id}"
def subscribe_to_agent_health(agent_id) do
Phoenix.PubSub.subscribe(Prymn.PubSub, agent_health_topic(agent_id))
end
end