Current section
Files
Jump to
Current section
Files
lib/squid.ex
defmodule Squid do
@doc """
Return registered routers.
"""
def registered_routers do
load_tentacles_cfg(:router)
end
defp load_tentacles_cfg(config_key) do
func = &{&1, Application.get_env(&1, :squid)[config_key]}
Application.get_env(:squid, :tentacles, [])
|> Enum.map(&func.(&1))
|> Enum.filter(&elem(&1, 1))
end
end