Parrhesia.Config (parrhesia v0.12.0)

Copy Markdown

Runtime configuration cache backed by ETS.

The application environment is copied into ETS at startup so hot-path reads do not need to traverse the application environment repeatedly.

Summary

Functions

Returns the cached top-level Parrhesia application config.

Returns a specification to start this module under a supervisor.

Reads a nested config value by path.

Starts the config cache server.

Functions

all()

@spec all() :: map() | keyword()

Returns the cached top-level Parrhesia application config.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get(path, default \\ nil)

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

Reads a nested config value by path.

The path may traverse maps or keyword lists. Missing paths return default.

start_link(init_arg \\ [])

Starts the config cache server.