LemonCore.GatewayConfig (lemon_core v0.1.0)

View Source

Unified gateway configuration access.

Gateway config comes from the canonical TOML [gateway] section only. In test mode (config_test_mode), a full-replacement app env layer (Application.get_env(:lemon_gateway, LemonGateway.Config)) is supported for test isolation.

Summary

Functions

Get a single key from the gateway config.

Load the gateway config map.

Functions

get(key, default \\ nil)

@spec get(atom(), term()) :: term()

Get a single key from the gateway config.

load(cwd \\ nil)

@spec load(String.t() | nil) :: map()

Load the gateway config map.

In production, reads from TOML base only. In test mode, checks for full-replacement app env first.