Raxol.Core.Config.ConfigServer (Raxol v2.0.1)
View SourceUnified configuration management system for Raxol. Consolidates configuration from multiple specialized config modules:
- PluginConfig
- TerminalConfig
- PerformanceConfig
- SecurityConfig
- BenchmarkConfig
Summary
Functions
Returns a specification to start this module under a supervisor.
Gets configuration value from specified namespace and key.
Gets entire namespace configuration.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Loads configuration from file system.
Resets namespace to default configuration.
Saves configuration to file system.
Sets configuration value in specified namespace and key.
Sets entire namespace configuration.
Validates configuration for specified namespace.
Types
@type config_namespace() ::
:terminal | :plugins | :performance | :security | :ui | :benchmark
@type config_value() :: any()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get(GenServer.server(), config_namespace(), config_key(), any()) :: any()
Gets configuration value from specified namespace and key.
@spec get_namespace(GenServer.server(), config_namespace()) :: map()
Gets entire namespace configuration.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
@spec load_from_file(GenServer.server()) :: :ok | {:error, any()}
Loads configuration from file system.
@spec reset_namespace(GenServer.server(), config_namespace()) :: :ok
Resets namespace to default configuration.
@spec save_to_file(GenServer.server()) :: :ok | {:error, any()}
Saves configuration to file system.
@spec set( GenServer.server(), config_namespace(), config_key(), config_value() ) :: :ok | {:error, any()}
Sets configuration value in specified namespace and key.
@spec set_namespace(GenServer.server(), config_namespace(), map()) :: :ok | {:error, any()}
Sets entire namespace configuration.
@spec validate(GenServer.server(), config_namespace()) :: :ok | {:error, [String.t()]}
Validates configuration for specified namespace.