Syntropy.ClusterInventory
(syntropy v0.1.0)
Copy Markdown
RPC-safe cluster inventory and invalidation boundary for Syntropy.
Each node remains the source of truth for its own agents and local runtime state. This module aggregates those local exports without replicating supervisor state.
Summary
Types
@type active_task_export() :: %{ task_id: String.t(), coordinator_node_id: String.t(), selected_agents: [agent_ref()], started_at: DateTime.t() }
@type agent_export() :: map()
@type cluster_export() :: %{ status: String.t(), local_node_id: String.t(), local_node_name: String.t(), nodes: [node_export()], unavailable_nodes: [map()] }
@type node_export() :: %{ node_id: String.t(), node_name: String.t(), services: [Syntropy.ClusterInfo.service_health()], agents: [agent_export()], active_tasks: [active_task_export()] }
Functions
@spec active_tasks() :: [active_task_export()]
@spec busy_runtime_ids([active_task_export()]) :: MapSet.t(String.t())
@spec cluster_agents() :: [agent_export()]
@spec cluster_export(keyword()) :: cluster_export()
@spec fetch_agent(agent_ref() | String.t()) :: agent_export() | nil
@spec find_agent(String.t()) :: agent_export() | nil
@spec local_export(keyword()) :: node_export()
@spec receive_remote_change(map()) :: :ok