Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Update to new couch_epi API
  • Loading branch information
iilyak committed Sep 28, 2015
1 parent 07c8656 commit ae6fe1522c5b0bfd9d7a3fd61713976b1b8a6a8b
Showing 2 changed files with 53 additions and 3 deletions.
@@ -0,0 +1,51 @@
% 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(mem3_epi).

-behaviour(couch_epi_plugins).

-export([
app/0,
providers/0,
services/0,
data_subscriptions/0,
data_providers/0,
processes/0,
notify/3
]).

app() ->
mem3.

providers() ->
[
{chttpd_handlers, mem3_httpd_handlers}
].


services() ->
[
].

data_subscriptions() ->
[].

data_providers() ->
[].

processes() ->
[].

notify(_Key, _Old, _New) ->
ok.
@@ -18,13 +18,12 @@ start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).

init(_Args) ->
Children = [
Children = couch_epi:register_service(mem3_epi) ++ [
child(mem3_events),
child(mem3_nodes),
child(mem3_sync_nodes), % Order important?
child(mem3_sync),
child(mem3_shards),
chttpd_handlers:provider(mem3, mem3_httpd_handlers)
child(mem3_shards)
],
{ok, {{one_for_one,10,1}, Children}}.

0 comments on commit ae6fe15

Please sign in to comment.