You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/08/01 11:04:55 UTC

[2/9] git commit: Initial app structure

Initial app structure

BugzId: 29571


Project: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/commit/63f6e9ae
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/tree/63f6e9ae
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/diff/63f6e9ae

Branch: refs/heads/windsor-merge
Commit: 63f6e9aefe9bf281e7ad0afe436c67e173ec7665
Parents: c65e074
Author: Russell Branca <ch...@gmail.com>
Authored: Wed Apr 30 14:11:28 2014 -0700
Committer: Robert Newson <rn...@apache.org>
Committed: Wed Jul 30 18:13:18 2014 +0100

----------------------------------------------------------------------
 .gitignore         |  1 +
 src/cassim.app.src | 28 ++++++++++++++++++++++++++++
 src/cassim_app.erl | 30 ++++++++++++++++++++++++++++++
 src/cassim_sup.erl | 41 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 100 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-cassim/blob/63f6e9ae/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 0c20ff0..321d5bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 .eunit
 deps
+ebin
 *.o
 *.beam
 *.plt

http://git-wip-us.apache.org/repos/asf/couchdb-cassim/blob/63f6e9ae/src/cassim.app.src
----------------------------------------------------------------------
diff --git a/src/cassim.app.src b/src/cassim.app.src
new file mode 100644
index 0000000..ad1121d
--- /dev/null
+++ b/src/cassim.app.src
@@ -0,0 +1,28 @@
+% Copyright 2014 Cloudant
+%
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+{application, cassim, [
+    {description, "Application for metadata db and auth related functions"},
+    {vsn, git},
+    {registered, []},
+    {applications, [
+        kernel,
+        stdlib,
+        config,
+        couch,
+        mem3
+    ]},
+    {mod, {cassim_app, []}},
+    {env, []}
+]}.

http://git-wip-us.apache.org/repos/asf/couchdb-cassim/blob/63f6e9ae/src/cassim_app.erl
----------------------------------------------------------------------
diff --git a/src/cassim_app.erl b/src/cassim_app.erl
new file mode 100644
index 0000000..13a4d83
--- /dev/null
+++ b/src/cassim_app.erl
@@ -0,0 +1,30 @@
+% Copyright 2014 Cloudant
+%
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+-module(cassim_app).
+
+
+-behaviour(application).
+
+
+%% Application callbacks
+-export([start/2, stop/1]).
+
+
+start(_StartType, _StartArgs) ->
+    cassim_sup:start_link().
+
+
+stop(_State) ->
+    ok.

http://git-wip-us.apache.org/repos/asf/couchdb-cassim/blob/63f6e9ae/src/cassim_sup.erl
----------------------------------------------------------------------
diff --git a/src/cassim_sup.erl b/src/cassim_sup.erl
new file mode 100644
index 0000000..a34fa70
--- /dev/null
+++ b/src/cassim_sup.erl
@@ -0,0 +1,41 @@
+% Copyright 2014 Cloudant
+%
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+
+-module(cassim_sup).
+
+
+-behaviour(supervisor).
+
+
+-export([start_link/0]).
+
+-export([init/1]).
+
+
+start_link() ->
+    supervisor:start_link({local, ?MODULE}, ?MODULE, []).
+
+
+init([]) ->
+    MetadataCache = {
+        cassim_metadata_cache,
+        {cassim_metadata_cache, start_link, []},
+        permanent,
+        100,
+        worker,
+        [cassim_metadata_cache]
+    },
+    {ok, {{one_for_one, 5, 10}, [MetadataCache]}}.
+