Packages

Plumtree based Process Group

Current section

Files

Jump to
ppg src ppg_sup.erl
Raw

src/ppg_sup.erl

%% Copyright (c) 2016, Takeru Ohta <phjgt308@gmail.com>
%%
%% This software is released under the MIT License.
%% See the LICENSE file in the project root for full license information.
%%
%% @doc Root Supervisor
%% @private
-module(ppg_sup).
-behaviour(supervisor).
%%----------------------------------------------------------------------------------------------------------------------
%% Exported API
%%----------------------------------------------------------------------------------------------------------------------
-export([start_link/0]).
%%----------------------------------------------------------------------------------------------------------------------
%% 'supervisor' Callback API
%%----------------------------------------------------------------------------------------------------------------------
-export([init/1]).
%%----------------------------------------------------------------------------------------------------------------------
%% Exported Functions
%%----------------------------------------------------------------------------------------------------------------------
%% @doc Starts the supervisor
-spec start_link() -> {ok, pid()} | {error, Reason::term()}.
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
%%----------------------------------------------------------------------------------------------------------------------
%% 'supervisor' Callback Functions
%%----------------------------------------------------------------------------------------------------------------------
%% @private
init([]) ->
Children =
[
#{id => group_sup, start => {ppg_group_sup, start_link, []}, type => supervisor}
],
{ok, {#{}, Children}}.