From 50f3c688a7cd4819680dbd19b9933c6cb5e62ca7 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 6 Feb 2012 19:44:47 -0500 Subject: Move most files into lib, add top-level makefile --- lib/src/mysqlerl_port_sup.erl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/src/mysqlerl_port_sup.erl (limited to 'lib/src/mysqlerl_port_sup.erl') diff --git a/lib/src/mysqlerl_port_sup.erl b/lib/src/mysqlerl_port_sup.erl new file mode 100644 index 0000000..3053cdc --- /dev/null +++ b/lib/src/mysqlerl_port_sup.erl @@ -0,0 +1,18 @@ +-module(mysqlerl_port_sup). +-author('bjc@kublai.com'). + +-behavior(supervisor). + +-export([start_link/7]). +-export([init/1]). + +start_link(Cmd, Host, Port, Database, User, Password, Options) -> + supervisor:start_link(?MODULE, [Cmd, Host, Port, Database, + User, Password, Options]). + +init([Cmd, Host, Port, Database, User, Password, Options]) -> + Ref = {mysqlerl_port, {mysqlerl_port, start_link, + [Cmd, Host, Port, Database, + User, Password, Options]}, + transient, 5, worker, [mysqlerl_port]}, + {ok, {{one_for_one, 10, 5}, [Ref]}}. -- cgit v1.2.3