Syntropy.ClusterInfo (syntropy v0.1.0)

Copy Markdown

Cluster diagnostics and node identity boundary for Syntropy.

Syntropy execution is now node-aware and coordinator-led across the cluster. This module exposes the local node identity and service health so runtime, replay, and API payloads remain inspectable across hosted deployments.

Summary

Types

agent_ref()

@type agent_ref() :: %{id: String.t(), runtime_id: String.t(), node_id: String.t()}

info()

@type info() :: %{
  enabled: boolean(),
  node_id: String.t(),
  node_name: String.t(),
  connected_nodes: [String.t()],
  services: [service_health()]
}

service_health()

@type service_health() :: %{name: String.t(), status: String.t()}

Functions

connected_nodes()

@spec connected_nodes() :: [String.t()]

enabled?()

@spec enabled?() :: boolean()

info()

@spec info() :: info()

local_agent_ref(local_id)

@spec local_agent_ref(String.t()) :: agent_ref()

node_id()

@spec node_id() :: String.t()

node_name()

@spec node_name() :: String.t()

parse_runtime_id(runtime_id)

@spec parse_runtime_id(String.t()) :: {:ok, agent_ref()} | :error

runtime_id(local_id)

@spec runtime_id(String.t()) :: String.t()

runtime_id(local_id, owner_node_id)

@spec runtime_id(String.t(), String.t() | nil) :: String.t()

sanitize_node_id(value)

@spec sanitize_node_id(String.t() | nil) :: String.t()

scoped_id(prefix, counter)

@spec scoped_id(String.t(), non_neg_integer()) :: String.t()

scoped_id(prefix, counter, node_id)

@spec scoped_id(String.t(), non_neg_integer(), String.t()) :: String.t()

service_health()

@spec service_health() :: [service_health()]