LemonGateway. Config
(lemon_gateway v0.1.0)
View Source
Centralized configuration for LemonGateway.
Loads configuration from the canonical Lemon TOML config (via ConfigLoader).
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns the full configuration map.
Returns the value for a specific configuration key.
Returns all configured bindings as a list of Binding structs.
Returns all configured projects as a map of project_id => Project struct.
Returns the queue configuration (cap, drop policy).
A full-replacement config map held in app env, if one is set.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get() :: map()
Returns the full configuration map.
Returns the value for a specific configuration key.
@spec get_bindings() :: [LemonCore.Binding.t()]
Returns all configured bindings as a list of Binding structs.
@spec get_projects() :: %{required(String.t()) => LemonGateway.Project.t()}
Returns all configured projects as a map of project_id => Project struct.
@spec get_queue_config() :: %{ cap: non_neg_integer() | nil, drop: :oldest | :newest | nil, mode: atom() | nil }
Returns the queue configuration (cap, drop policy).
A full-replacement config map held in app env, if one is set.
Embedders and tests can put a complete config under
config :lemon_gateway, LemonGateway.Config, %{...} to bypass the canonical
loader. Exposed for LemonCore.EngineInfoBridge, so callers outside this app
read it through the bridge instead of reaching into our app env.