Packages
gen_amqp
0.6.6
7.0.0
6.0.0
5.0.6
5.0.5
5.0.4
5.0.3
5.0.2
5.0.1
5.0.0
4.5.1
4.5.0
4.4.1
4.4.0
4.3.2
4.3.1
4.3.0
4.2.1
4.2.0
4.1.0
4.0.1
4.0.0
3.6.3
3.6.2
3.6.1
3.6.0
3.5.1
3.5.0
3.4.0
3.3.1
3.3.0
3.2.1
3.2.0
3.1.0
3.0.0
2.8.0
2.7.0
2.6.0
2.5.0
2.4.0
2.3.0
2.2.0
2.1.0
2.0.4
2.0.2
2.0.0
1.0.0
0.7.1
0.7.0
0.6.6
0.6.5
0.6.0
GenAMQP is a set of utilities to make microservices using the worker pattern
Current section
Files
Jump to
Current section
Files
lib/gen_amqp.ex
defmodule GenAMQP do
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
conn_name = Application.get_env(:gen_amqp, :conn_name)
static_sup_name = Application.get_env(:gen_amqp, :static_sup_name)
dynamic_sup_name = Application.get_env(:gen_amqp, :dynamic_sup_name)
sup_name = static_sup_name || dynamic_sup_name
# Define supervisors and child supervisors to be supervised
children = [
supervisor(GenAMQP.ConnSupervisor, [sup_name, conn_name]),
]
opts = [strategy: :one_for_one, name: GenAMQP.AppSupervisor]
Supervisor.start_link(children, opts)
end
end