Packages

Live config supporting many different backends. **Kungfuig** (_pronounced:_ [ˌkʌŋˈfig]) provides a drastically easy way to plug live configuration into everything. It provides backends for `env` and `system` and supports custom backends.

Current section

Files

Jump to
kungfuig lib kungfuig backends env.ex
Raw

lib/kungfuig/backends/env.ex

defmodule Kungfuig.Backends.Env do
@moduledoc false
use Kungfuig.Backend
@impl Kungfuig.Backend
def get(meta) do
{:ok,
meta
|> Keyword.get(:for, [:kungfuig])
|> Enum.reduce(%{}, &Map.put(&2, &1, Application.get_all_env(&1)))}
end
end