couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [02/23] couchdb-setup git commit: add bootstrap
Date Fri, 07 Nov 2014 14:46:26 GMT
add bootstrap


Project: http://git-wip-us.apache.org/repos/asf/couchdb-setup/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-setup/commit/3621725d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-setup/tree/3621725d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-setup/diff/3621725d

Branch: refs/heads/master
Commit: 3621725d7c3761bbede21945821aa13508c26d82
Parents: f28d896
Author: Jan Lehnardt <jan@apache.org>
Authored: Fri Oct 31 15:41:27 2014 +0100
Committer: Jan Lehnardt <jan@apache.org>
Committed: Fri Oct 31 15:41:27 2014 +0100

----------------------------------------------------------------------
 src/setup.app.src | 12 ++++++++++++
 src/setup_app.erl | 16 ++++++++++++++++
 src/setup_sup.erl | 27 +++++++++++++++++++++++++++
 3 files changed, 55 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/3621725d/src/setup.app.src
----------------------------------------------------------------------
diff --git a/src/setup.app.src b/src/setup.app.src
new file mode 100644
index 0000000..d79e4b4
--- /dev/null
+++ b/src/setup.app.src
@@ -0,0 +1,12 @@
+{application, setup,
+ [
+  {description, ""},
+  {vsn, "1"},
+  {registered, []},
+  {applications, [
+                  kernel,
+                  stdlib
+                 ]},
+  {mod, { setup_app, []}},
+  {env, []}
+ ]}.

http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/3621725d/src/setup_app.erl
----------------------------------------------------------------------
diff --git a/src/setup_app.erl b/src/setup_app.erl
new file mode 100644
index 0000000..0d43a50
--- /dev/null
+++ b/src/setup_app.erl
@@ -0,0 +1,16 @@
+-module(setup_app).
+
+-behaviour(application).
+
+%% Application callbacks
+-export([start/2, stop/1]).
+
+%% ===================================================================
+%% Application callbacks
+%% ===================================================================
+
+start(_StartType, _StartArgs) ->
+    setup_sup:start_link().
+
+stop(_State) ->
+    ok.

http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/3621725d/src/setup_sup.erl
----------------------------------------------------------------------
diff --git a/src/setup_sup.erl b/src/setup_sup.erl
new file mode 100644
index 0000000..eae0eae
--- /dev/null
+++ b/src/setup_sup.erl
@@ -0,0 +1,27 @@
+-module(setup_sup).
+
+-behaviour(supervisor).
+
+%% API
+-export([start_link/0]).
+
+%% Supervisor callbacks
+-export([init/1]).
+
+%% Helper macro for declaring children of supervisor
+-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
+
+%% ===================================================================
+%% API functions
+%% ===================================================================
+
+start_link() ->
+    supervisor:start_link({local, ?MODULE}, ?MODULE, []).
+
+%% ===================================================================
+%% Supervisor callbacks
+%% ===================================================================
+
+init([]) ->
+    {ok, { {one_for_one, 5, 10}, []} }.
+


Mime
View raw message