dotfiles/app/lib/prymn/messaging.ex
2024-02-01 17:34:26 +02:00

11 lines
272 B
Elixir

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