summaryrefslogtreecommitdiff
path: root/lib/elixir/src/elixir_sup.erl
blob: bc111dc5698fadbffce6b1cff3945c95c3a0ece3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
-module(elixir_sup).
-behaviour(supervisor).
-export([init/1, start_link/0]).

start_link() ->
  supervisor:start_link({local, ?MODULE}, ?MODULE, ok).

init(ok) ->
  Workers = [
    {
      elixir_config,
      {elixir_config, start_link, []},

      permanent,                    % Restart  = permanent | transient | temporary
      2000,                         % Shutdown = brutal_kill | int() >= 0 | infinity
      worker,                       % Type     = worker | supervisor
      [elixir_config]               % Modules  = [Module] | dynamic
    },

    {
      elixir_code_server,
      {elixir_code_server, start_link, []},

      permanent,                    % Restart  = permanent | transient | temporary
      2000,                         % Shutdown = brutal_kill | int() >= 0 | infinity
      worker,                       % Type     = worker | supervisor
      [elixir_code_server]          % Modules  = [Module] | dynamic
    }
  ],

  {ok, {{one_for_one, 3, 10}, Workers}}.