Raxol.Core.Runtime.Lifecycle (Raxol v0.5.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.

Initializes the runtime environment. (Stub for test compatibility)

Starts a Raxol application (compatibility wrapper).

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.

Stops a Raxol application (compatibility wrapper).

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

handle_cleanup(context)

handle_error(error, context)

initialize_environment(options)

Initializes the runtime environment. (Stub for test compatibility)

lookup_app(app_id)

start_application(app, opts)

Starts a Raxol application (compatibility wrapper).

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.

stop_application(val)

Stops a Raxol application (compatibility wrapper).