Raxol.Terminal.TerminalRegistry (Raxol v2.0.1)

View Source

Registry for managing terminal instances.

This module provides a centralized registry for all active terminal processes, enabling lookup, registration, and management of terminal instances across the system.

Summary

Functions

Returns a specification to start this module under a supervisor.

Checks if a terminal exists in the registry.

Gets metadata for a specific terminal.

Gets registry statistics.

Lists all active terminals.

Lists all terminals for a specific user.

Looks up a terminal process by ID.

Registers a terminal process with the registry.

Unregisters a terminal from the registry.

Types

terminal_id()

@type terminal_id() :: String.t()

terminal_process()

@type terminal_process() :: pid()

user_id()

@type user_id() :: String.t()

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

exists?(registry \\ __MODULE__, terminal_id)

Checks if a terminal exists in the registry.

get_metadata(registry \\ __MODULE__, terminal_id)

Gets metadata for a specific terminal.

get_statistics(registry \\ __MODULE__)

Gets registry statistics.

handle_manager_cast(msg, state)

Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.

list_all_terminals(registry \\ __MODULE__)

Lists all active terminals.

list_user_terminals(registry \\ __MODULE__, user_id)

Lists all terminals for a specific user.

lookup(registry \\ __MODULE__, terminal_id)

Looks up a terminal process by ID.

register(registry \\ __MODULE__, terminal_id, process, metadata \\ %{})

Registers a terminal process with the registry.

start_link(init_opts \\ [])

unregister(registry \\ __MODULE__, terminal_id)

Unregisters a terminal from the registry.

update_metadata(registry \\ __MODULE__, terminal_id, metadata)

Updates metadata for a terminal.