Lightweight ETS-backed storage for runtime configuration.
The store keeps the latest routing tables, provider definitions, CLI configs, and other hot-reloadable artifacts so they can be accessed without disk I/O.
Stored Namespaces
{:config, :routing}— CurrentRoutingTable{:config, :providers}— Map of%Definition{}structs keyed by provider id{:config, :cli_providers}— Map of%CLIProvider.Config{}structs keyed by atom name{:config, :telemetry}— Telemetry settings map{:config, :raw}— Raw merged TOML configuration
Access Patterns
Direct ETS reads (no GenServer call):
{:ok, table} = LlmCore.Config.Store.get_routing()
{:ok, providers} = LlmCore.Config.Store.fetch(:config, :providers)Writes go through the GenServer for serialisation:
:ok = LlmCore.Config.Store.put_routing(%RoutingTable{...})
:ok = LlmCore.Config.Store.put(:config, :telemetry, %{...})
Summary
Functions
Returns a specification to start this module under a supervisor.
Fetches a value previously stored with put/3.
Fetches the current routing table.
Generic helper for storing custom config namespaces.
Stores the current routing table.
Starts the config store GenServer and creates the backing ETS table.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Fetches a value previously stored with put/3.
@spec get_routing() :: {:ok, LlmCore.Router.RoutingTable.t()} | {:error, :not_found}
Fetches the current routing table.
Generic helper for storing custom config namespaces.
@spec put_routing(LlmCore.Router.RoutingTable.t()) :: :ok
Stores the current routing table.
@spec start_link(keyword()) :: GenServer.on_start()
Starts the config store GenServer and creates the backing ETS table.