aboutsummaryrefslogtreecommitdiffstats
path: root/src/mysqlerl_sup.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mysqlerl_sup.erl')
-rw-r--r--src/mysqlerl_sup.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mysqlerl_sup.erl b/src/mysqlerl_sup.erl
new file mode 100644
index 0000000..1ebfbf2
--- /dev/null
+++ b/src/mysqlerl_sup.erl
@@ -0,0 +1,16 @@
+-module(mysqlerl_sup).
+-author('bjc@kublai.com').
+
+-behavior(supervisor).
+
+-export([start_link/0, init/1]).
+
+start_link() ->
+ supervisor:start_link({local, ?MODULE}, ?MODULE, []).
+
+init([]) ->
+ ConnectionSup = {mysqlerl_connection_sup,
+ {mysqlerl_connection_sup, start_link, []},
+ permanent, infinity, supervisor,
+ [mysqlerl_connection_sup]},
+ {ok, {{one_for_one, 10, 5}, [ConnectionSup]}}.