Packages

Squid is a framework that helps you divide your application into multiple small contexts and/or applications called `tentacles`.

Current section

Files

Jump to
squid lib squid.ex
Raw

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