Raxol.Core.Runtime.Lifecycle (Raxol v0.4.0)

View Source

Manages the application lifecycle, including startup, shutdown, and terminal interaction.

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts and links a new Raxol application lifecycle manager.

Stops the Raxol application lifecycle manager. pid_or_name can be the PID or the registered name of the Lifecycle GenServer.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(app_module, options \\ [])

Starts and links a new Raxol application lifecycle manager.

Options

  • :name - Optional name for registering the GenServer. If not provided, a name
          will be derived from `app_module`.
  • :width - Terminal width (default: 80).
  • :height - Terminal height (default: 24).
  • :debug - Enable debug mode (default: false).
  • :initial_commands - A list of Raxol.Core.Runtime.Command structs to execute on startup.
  • :plugin_manager_opts - Options to pass to the PluginManager's start_link function.
  • Other options are passed to the application module's init/1 function.

stop(pid_or_name)

Stops the Raxol application lifecycle manager. pid_or_name can be the PID or the registered name of the Lifecycle GenServer.