Raxol.Core.ServerRegistry (Raxol v2.0.1)

View Source

Centralized registry and supervisor for all Raxol GenServers.

Provides unified lifecycle management, health monitoring, and graceful shutdown coordination for all server processes in the system.

Features

  • Unified Supervision: Single supervisor for all system servers
  • Health Monitoring: Built-in health checks and recovery
  • Graceful Shutdown: Coordinated shutdown with dependency handling
  • Server Discovery: Registry for finding and communicating with servers
  • Performance Monitoring: Server performance metrics and alerts

Server Categories

  • Core Servers: State management, events, configuration
  • UI Servers: Theme management, accessibility, i18n
  • Terminal Servers: Buffer management, emulation, parsing
  • Plugin Servers: Plugin lifecycle, sandboxing, communication

Summary

Functions

Returns a specification to start this module under a supervisor.

Get a server process by name.

Gracefully shutdown all servers in dependency order.

Check if a server is healthy and responding.

Get health status of all registered servers.

Types

server_name()

@type server_name() :: atom()

server_spec()

@type server_spec() :: {module(), keyword()}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_server(server_name)

@spec get_server(server_name()) :: pid() | nil

Get a server process by name.

graceful_shutdown(timeout \\ 5000)

@spec graceful_shutdown(timeout()) :: :ok

Gracefully shutdown all servers in dependency order.

health_check(server_name)

@spec health_check(server_name()) :: :ok | :error

Check if a server is healthy and responding.

health_status()

@spec health_status() :: %{required(server_name()) => :ok | :error}

Get health status of all registered servers.

start_link(init_arg)