Raxol.Core.Supervisor (Raxol v2.0.1)

View Source

Supervisor for all refactored GenServer-based modules.

This supervisor manages the lifecycle of refactored modules that have been converted from Process dictionary usage to proper OTP patterns.

Usage

Add this supervisor to your application's supervision tree:

defmodule MyApp.Application do
  use Application

  def start(_type, _args) do
    children = [
      # Other children...
      {Raxol.Core.Supervisor, []}
    ]

    opts = [strategy: :one_for_one, name: MyApp.Supervisor]
    Supervisor.start_link(children, opts)
  end
end

Configuration

You can configure the refactored modules through application config:

config :raxol,
  i18n_config: %{
    default_locale: "en",
    available_locales: ["en", "fr", "es", "ar"],
    fallback_locale: "en"
  },
  ux_refinement_config: %{
    # UX refinement configuration
  }

Summary

Functions

Returns a specification to start this module under a supervisor.

Ensures all refactored servers are running. Returns :ok if all are running, or {:error, reasons} if any failed to start.

Restart a specific refactored server.

Get the status of all refactored servers.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

ensure_all_started()

Ensures all refactored servers are running. Returns :ok if all are running, or {:error, reasons} if any failed to start.

restart_server(server_name)

Restart a specific refactored server.

start_link(opts \\ [])

status()

Get the status of all refactored servers.