diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-08-12 02:27:29 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-08-12 02:27:29 -0400 |
commit | cd2de5c1d802f6ef2122822d0294f2263d57d0ac (patch) | |
tree | 5bad6a6bcbb083685831c11a8ea4940f2fde10cc /apps/mem3/src/mem3_sup.erl | |
parent | 4d7e3604c9ed5788747334c08359af1822368d15 (diff) | |
parent | e660dd48e78f1a368010bbcf4455b576dd59d7c1 (diff) |
Add 'apps/mem3/' from commit 'e660dd48e78f1a368010bbcf4455b576dd59d7c1'
git-subtree-dir: apps/mem3
git-subtree-mainline: 4d7e3604c9ed5788747334c08359af1822368d15
git-subtree-split: e660dd48e78f1a368010bbcf4455b576dd59d7c1
Diffstat (limited to 'apps/mem3/src/mem3_sup.erl')
-rw-r--r-- | apps/mem3/src/mem3_sup.erl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/mem3/src/mem3_sup.erl b/apps/mem3/src/mem3_sup.erl new file mode 100644 index 00000000..58d0bbf5 --- /dev/null +++ b/apps/mem3/src/mem3_sup.erl @@ -0,0 +1,21 @@ +-module(mem3_sup). +-behaviour(supervisor). +-export([start_link/0, init/1]). + +start_link() -> + supervisor:start_link({local, ?MODULE}, ?MODULE, []). + +init(_Args) -> + Children = [ + child(mem3_events), + child(mem3_sync), + child(mem3_cache), + child(mem3_nodes) + ], + {ok, {{one_for_one,10,1}, Children}}. + +child(mem3_events) -> + MFA = {gen_event, start_link, [{local, mem3_events}]}, + {mem3_events, MFA, permanent, 1000, worker, dynamic}; +child(Child) -> + {Child, {Child, start_link, []}, permanent, 1000, worker, [Child]}. |