ElixirScope.Config (elixir_scope v0.0.1)

Configuration management for ElixirScope.

Handles loading, validation, and runtime access to ElixirScope configuration. Supports configuration from multiple sources:

  • Application environment (config.exs files)
  • Environment variables
  • Runtime configuration updates

The configuration is validated on startup and cached for fast access.

Summary

Functions

Returns a specification to start this module under a supervisor.

Gets the current configuration.

Gets a specific configuration value by path.

Starts the configuration server.

Updates configuration at runtime (for specific allowed keys).

Validates a configuration structure. Returns {:ok, config} or {:error, reasons}.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get()

Gets the current configuration.

get(path)

Gets a specific configuration value by path.

Examples

iex> ElixirScope.Config.get([:ai, :provider])
:mock

iex> ElixirScope.Config.get([:capture, :ring_buffer, :size])
1048576

start_link(opts \\ [])

Starts the configuration server.

update(path, value)

Updates configuration at runtime (for specific allowed keys).

validate(config)

Validates a configuration structure. Returns {:ok, config} or {:error, reasons}.