Backward-compatible configuration server.
This module maintains the original API but delegates to the pure functional
Raxol.Core.Config module and ETS-backed Raxol.Core.Config.Store.
Migration Note
This module is retained for backward compatibility. New code should use:
Raxol.Core.Configfor pure functional operations on config dataRaxol.Core.Config.Storefor runtime config access with ETS backing
Architecture Change
Previous: All operations serialized through GenServer mailbox Current: Reads go directly to ETS, writes coordinate through GenServer
This change improves:
- Read performance (no mailbox serialization)
- Concurrent access (ETS read_concurrency)
- Code clarity (pure functions separated from process management)
Summary
Functions
Gets configuration value from specified namespace and key.
Gets entire namespace configuration.
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.
Starts the configuration store.
Validates configuration for specified namespace.
Types
@type config_key() :: Raxol.Core.Config.key()
@type config_namespace() :: Raxol.Core.Config.namespace()
@type config_value() :: Raxol.Core.Config.value()
Functions
@spec get(GenServer.server(), config_namespace(), config_key(), any()) :: any()
Gets configuration value from specified namespace and key.
This is now a direct ETS read - fast and concurrent.
@spec get_namespace(GenServer.server(), config_namespace()) :: map()
Gets entire namespace configuration.
Direct ETS read - fast and concurrent.
@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
Sets entire namespace configuration.
Starts the configuration store.
Kept for backward compatibility - delegates to Config.Store.
@spec validate(GenServer.server(), config_namespace()) :: :ok | {:error, [String.t()]}
Validates configuration for specified namespace.